From: Arneh Babakhani (
Date: Wed Aug 15 2007 - 12:39:08 CDT


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
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
$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).