From: Andrew Dalke (dalke_at_dalkescientific.com)
Date: Thu Feb 12 2004 - 08:41:46 CST

Tim Isgro:
> Also, use 'resname' instead of 'residue'. VMD doesn't complain about
> something like 'residue ASP', even though it should since 'residue'
> arguments are numbers, not 3-letter codes. As far as I can tell
> 'residue
> xxx' simply selects the first residue in the protein chain, as opposed
> to
> spitting out an error message. This should be fixed.

VMD numbers residues starting at 0, so 'residue 0' is the first residue
it
finds, 'residue 1' the second, etc. That's a numeric field assigned by
Python and is different for each residue. It does not depend on anyone
else's numbering system.

The reason for the 'residue' property is so you can say
   "same residue as within 5 of name FE"
which gives you all atoms within 5Å of any iron atom, as well as all
the atoms covalently bound to those atoms which are in the same residue.

The 'resname' is the residue name. You may have many ALA residues.

The 'resid' is the residue identifier from the PDB file. This is an
external
numbering system. These numbers may make special sense to the user so
VMD
doesn't attempt to change them.

VMD's atom selections use an automatic type conversion system taken from
Perl. Strings are converted to integers when the field is an integer
field.
This means a string like "ALA" is converted into an integer. Since ALA
isn't
an integer, the value returned it, as I recall, 0. Since the residue
with
value 0 is the first one, it selects the first residue.

I chose a weak type system because some fields should be interpreted as
a
string for some structures, and as integers for other structures. For
example,
a virus structure has many copies of the same protomers, and the
segment names
may be 1, 2, 3, 4 for the first copy, 5, 6, 7, 8 for the second, etc.
Then I
can turn on all copies of the first protomer with "segname % 4 == 1".
On the
other hand, in some cases the protomers may be labeled "VP1", "VP2",
"VP3",
etc., or there may be some segments which are numbered and others which
have
text.

Historically yours,

                                        Andrew
                                        dalke_at_dalkescientific.com