From: Brian Bennion (bennion1_at_llnl.gov)
Date: Fri Jun 22 2007 - 15:34:28 CDT

Hello,

This was a fun friday activity.
I cut and pasted the email text from below an did the atom selections.
No problems with reading the coordinates.

Main console display active (Tcl8.4.1 / Tk8.4.1)
(brian) 33 % set one [atomselect 0 "index 0"]
atomselect0
>Main< (brian) 34 % set two [atomselect 0 "index 1"]
atomselect1
>Main< (brian) 35 % $one get {xyz}
cannot find attribute 'xyz': in atomsel: get:
>Main< (brian) 36 % $one get {x y z}
{2.0 2.0 0.0}
>Main< (brian) 37 % $one get {xy z}
cannot find attribute 'xy': in atomsel: get:
>Main< (brian) 38 % $one get {x y z}
{2.0 2.0 0.0}
>Main< (brian) 39 % $two get {x y z}
{0.0 2.0 0.0}
>Main< (brian) 40 %

At 12:26 PM 6/22/2007, you wrote:
>This is my pdb file (just two hydrogen atoms, with a fake residue name XXX):
>
>ATOM 1 H XXX A 1 2.00 2.00 0.00 H
>ATOM 2 H XXX A 1 0.00 2.00 0.00 H
>END
>
>
>
>John Stone wrote:
>>Hi,
>> I think you must have a misformatted file if you're getting a different
>>coordinate from the atom selection than what you see in the file.
>>The viewing transformations only affect the _display_ of the molecule,
>>and do not affect the atom selections, coordinates, or measuring parts
>>of the program at all. Please check that your PDB file is correctly
>>formatted, or else send me a copy and I'll check it for you.
>>
>>Cheers,
>> John Stone
>> vmd_at_ks.uiuc.edu
>>
>>On Fri, Jun 22, 2007 at 11:50:59AM -0700, Arneh Babakhani wrote:
>>
>>>Thanks, let me try to clarify.
>>>
>>>Assuming the pdb is formatted correctly, when I load it up and
>>>query the coordinates of say the first atom, I get this:
>>>
>>>>Main< (PracticeVMD) 67 % [atomselect top "index 0"] get {x y z}
>>>>
>>>{2.0 0.0 0.0}
>>>
>>>But this does not match up with the coordinates in the actual pdb
>>>file, where the coordinates for the first atom are {2.0 2.0 0.0},
>>>b/c of what you stated below (the viewing transformation is
>>>independent of the atom coordinates).
>>>
>>>My question is, how can I load up the pdb without such a viewing
>>>transformation? In other words, when I do 'get {x y z}', I want
>>>the result to be the exact coordinates found in the pdb file.
>>>
>>>Thanks,
>>>
>>>Arneh
>>>
>>>
>>>
>>>John Stone wrote:
>>>
>>>>Hi,
>>>> I'm not sure what you're asking here. VMD preserves the original
>>>>coordinates of the structures after they are loaded. The viewing
>>>>transformations applied for graphical scaling/rotation/translation
>>>>are completely independent from the atom coordinates. You can
>>>>query the atom coordinates using a selection to verify this for
>>>>yourself:
>>>> set sel [atomselect top all]
>>>> $sel get {x y z}
>>>>
>>>>If you're writing PDB files by hand, you need to make absolutely
>>>>sure that you've got the PDB columns lined up since it is a column
>>>>based format. If you write the coordinates into the wrong columns,
>>>>you'll get gibberish from VMD (and any other program....)
>>>>
>>>>Cheers,
>>>> John Stone
>>>> vmd_at_ks.uiuc.edu
>>>>
>>>>
>>>>On Fri, Jun 22, 2007 at 11:10:06AM -0700, Arneh Babakhani wrote:
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>I have a brief question about loading up pdb files in VMD. I
>>>>>noticed that when I load up a pdb file, one of the atoms is
>>>>>placed at the origin {0 0 0} and the rest are plotted around
>>>>>that. For instance, for the simple pdb file:
>>>>>ATOM 1 H XXX A 1 2.00 2.00 0.00 H
>>>>>ATOM 2 H XXX A 1 0.00 2.00 0.00 H
>>>>>END
>>>>>
>>>>>the fist hydrogen atom is placed at {0 0 2}, the second is
>>>>>placed at {0 0 0}. So the distance between the two atoms is
>>>>>correct, but they're coordinates are different from what
>>>>>actually appears in the pdb file.
>>>>>So my question is, how can I load up the pdb file such that the
>>>>>atoms are placed in the 'absolute' coordinates of file? And how
>>>>>can I do that
>>>> >from the TCL command line, is there an option to 'mol load pdb
>>>>>whatever.pdb' ?
>>>>>Thanks,
>>>>>
>>>>>Arneh
>>>>>
>>>>>
>>>>
>>>>
>>
>>