From: ioana_at_pegasus.arc.nasa.gov
Date: Tue Jul 26 2005 - 20:32:08 CDT

Hi all,

I am trying to output the name/id of a simple selection througout a
trajectory file.
I read in the pdb file, set up the selection
set nb [atomselect top "protein and same residue as within 3 of resname
RC5"]
ask for the resid/resname

lsort -unique [$nb get resid]
325
lsort -unique [$nb get resname]
ASN

When I want to get that from a script and write the results in a file I
get a totally different answer:
set frame 0
animate goto $frame

set residues [lsort -unique [[atomselect top "protein and same residue as
within 3 of resname RC5" frame $frame ] get residue ]]
puts $residues
324

set rn [atomselect top "protein and resid $residues"]
set inform [lsort -unique [$rn get "resid resname"]]
{324 ALA}

The PDB file has indeed the 1-based counter while TCL when it reads the
file in renumbers the residues according to a 0-based counter. However as
long as it's one or the other the results should be the same. There should
be no mixing between the two, or else results that output into the result
file are incorrect.

However if I set up the "residues" selection as set residues [lsort
-unique [[atomselect top "protein and same residue as within 3 of resname
RC5" frame $frame ] get resid ]]
It gives the correct number
puts $residues
{325 ASN}

What is the difference when setting up the atomselect command and asking
to
get residue
versus
get resid

Why is one 0-based and the other 1-based?

THanks,
Ioana