From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Aug 12 2010 - 04:52:38 CDT

can you please tell us which version of VMD you are using?

thanks,
     axel.

On Thu, Aug 12, 2010 at 4:52 AM, Cun Zhang <apzc2529_at_gmail.com> wrote:
>
> On Thu, Aug 12, 2010 at 11:01 AM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>>
>> On Wed, Aug 11, 2010 at 9:59 PM, Cun Zhang <apzc2529_at_gmail.com> wrote:
>> > Hi,all
>> > I have some problems when I deal with lammpstrj files in vmd.
>>
>> please explain what the problem with lammpstrj is,
>> you only show fragments from .pdb files below.
>>
> I'm trying deal with lammpstrj file with vmd script, but can't obtain the
> right data( e.g. obtain the center of "index 0 to 23").
> And I checked my script,it's ok. Finally, I found "index 0 to 23" isn't the
> same as atoms in the initial data file. The Index of Atoms
> are re-ordered as the order of the data.Here is a example:
>
> ITEM: TIMESTEP
> 5000
> ITEM: NUMBER OF ATOMS
> 234
> ITEM: BOX BOUNDS
> -99.9998 99.9998
> -99.9993 99.9993
> -0.0103184 400.01
> ITEM: ATOMS id type xs ys zs
> 23 1 0.486681 0.494531 0.00251958
> 24 1 0.489859 0.489456 0.00418073
> 25 1 0.493987 0.484196 0.0026156
> 36 1 0.486359 0.495119 0.00966315
> ....
> 1 1 0.51566 0.5 0
> .... (and so on)
>
> This is a lammpstrj fragments. ATOM index 23  is the first ATOM data:
> 23 1 0.486681 0.494531 0.00251958
> After loading this lammpstrj file, the index of this atom will become 1.
> You can verify it through the following commands:
> vmd > measure center [atomselect top "index 0"]
> -2.6637954711914063 -1.0937881469726563 0.9975647926330566
> vmd > expr 99.9998*2*0.486681-99.9998
> -2.6637946724000017
> vmd> expr 99.9998*2*0.494531-99.9998
> -1.093797812399983
>
>> > I found the index of atoms will change to the line number of atoms
>> > when the line number of atoms are not same as the index of atoms.
>> > e.g.
>>
>> that is not correct. the .pdb reader simply ignores the atom
>> index on reading, since this is not a global index but only
>> within a segment. your file isn't really a standard conforming
>> .pdb file. the ATOM record is reserved for know standard
>> residues.
>
> I hope to verify whether vmd really ignore the ATOM Index column and whether
> this problem is from the kernel code of vmd or just the lammpstrj plugin. So
> I disorder the ATOM index.
> It's likely that it did. See the coords of ATOM 2 and ATOM 3, they exchanged
> to each other.
> THIS IS JUST A TEST.
>
>> > a sequence from a pdb file as following:
>> > ATOM      1  C   UNK     1     102.970  86.780  51.730  1.00  0.00
>> > C
>> > ATOM      3  C   UNK     1     102.580  91.020  51.730  1.00  0.00
>> > C
>> > ATOM      2  C   UNK     1     102.930  88.200  51.730  1.00  0.00
>> > C
>> > ATOM      4  C   UNK     1     102.280  92.400  51.730  1.00  0.00
>> > C
>> >
>> > when I import it into vmd, it will change to
>> >
>> > ATOM      1  C   UNK     1     102.970  86.780  51.730  1.00  0.00
>> > C
>> > ATOM      2  C   UNK     1     102.580  91.020  51.730  1.00  0.00
>> > C
>> > ATOM      3  C   UNK     1     102.930  88.200  51.730  1.00  0.00
>> > C
>> > ATOM      4  C   UNK     1     102.280  92.400  51.730  1.00  0.00
>> > C
>>
>> it is the common convention to consider two .pdb files
>> to be the same, if the atoms are the same and in the same
>> order.
>>
>> > I test pdb file and lammpstrj file, return the same result.
>>
>> lammps dump files will be written in unspecified order
>> when written by a parallel version of LAMMPS, so sorting
>> atoms upon reading by the atom tag is a necessity to
>> maintain consistency within a single file and between
>> multiple files.
>>
>
> Yes. ATOM data is disordered, but ATOM indexes are still stored in dump
> file,
> say, in the top lammpstrj file, ATOM Index 23 is output in the first line of
> these data,
> but the index number is same in all frames. So I hope The index of this atom
> will be
> indexed to 23, not 1.  Is there any way to fix it ?
>
> Thank you!
>
> Cun Zhang
>
>> > Except Re-ordering the pdb file, is there any way to fix it?
>>
>> fix what? to what? and for which format?
>>
>> axrel.
>>
>> > Thank you!
>> >
>> > Cun Zhang
>> >
>> > --
>> > Blog: http://www.edwardpku.com/cun
>> >
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
>> http://sites.google.com/site/akohlmey/
>>
>> Institute for Computational Molecular Science
>> Temple University, Philadelphia PA, USA.
>
>
>
> --
> Blog: http://www.edwardpku.com/cun
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
http://sites.google.com/site/akohlmey/
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.