From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Aug 15 2007 - 12:34:52 CDT

Hi Arneh,
in VMD, the "index" keyword is defined internally, not by the input
file, and is always a zero-indexed list of the atoms. If you want a
1-indexed list instead, try using the "serial" keyword instead.
Peter

Arneh Babakhani wrote:
> Hi
>
> I noticed that gro files (structure files from GROMACS) start with an
> atom index = 1. When you read in the gro file, vmd sets the indices
> back one, so the atom in the gro file with index=1 is now index = 0.
>
> Case in point (an excerpt from the gro file):
> Protein in water
> 99776
> 1GLN N 1 4.241 3.617 2.284 -0.6878 0.3661 -0.3811
>
>
> in the vmd tcl console:
> % set temp [atomselect top "index 0"]
> $temp get name
> N
> $temp set index 1
> atomsel object: set: data not modifiable: index
>
>
> My question is, how do you change the index values so they can match
> what's in the gro file? (This is important if you want to make
> atomselections, to define groups, to be used later with the GROMACS
> analysis scripts).
>
> Thanks,
>
> Arneh