From: Arneh Babakhani (ababakha_at_mccammon.ucsd.edu)
Date: Fri Jun 22 2007 - 15:04:24 CDT

Ok thanks. I guess I was confused because I thought if there was
something wrong with my pdb file to begin with, it wouldn't be read in
at all.

Thanks,

Arneh

John Stone wrote:
> Yes, the whitespace in a PDB file MUST BE EXACT, that's what I meant
> when I said it was a column-based file format. Please see the PDB
> file format specifications for more details:
> http://www.wwpdb.org/documentation/format23/sect9.html#ATOM
>
> Note the specific columns that deliniate the fields within an ATOM record.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Fri, Jun 22, 2007 at 12:38:42PM -0700, Arneh Babakhani wrote:
>
>> Yes, you're right, thanks. So the amount of whitespace in a pdb file
>> must be exact? I thought most readers can parse that out? That's a
>> very important lesson! Thanks for your help,
>>
>> Arneh
>>
>> Giovanni Bellesia wrote:
>>
>>> looks like your pdb is not formatted correctly:
>>> Try this:
>>>
>>> ATOM 1 H XXX 1 2.00 2.00 0.00 H
>>> ATOM 2 H XXX 1 0.00 2.00 0.00 H
>>> END
>>>
>>> it worked for me.
>>>
>>> You also might want to take a look at this:
>>>
>>> http://www2.cs.uh.edu/~chandler/chem/PDBSpec.html
>>> (9. Coordinate Section)
>>>
>>>
>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>>
>
>