From: Justin Gullingsrud (jgulling_at_mccammon.ucsd.edu)
Date: Thu Nov 20 2003 - 12:16:35 CST

Hi,

On Fri, Nov 21, 2003 at 01:16:17AM +0800, moggces wrote:
> Dear all,
> I am a new user of VMD.
> I have some problems when trying to find out what resid in a molecule.
> (ex: one molecule has resid 1-10 11 14 15-28 ....)
>
> This is my input
> set set1 [ atomselect 0 all]
> $se1 get resid
>
> and then so many output number that I can't handle.
> Could anyone tell me what to do to limit the output into only "resid"
> (ex: 1 2 3 4 5 6 7 8 9 10 11 14 ...)

Try selecting only one atom per residue, i.e.

  set set2 [atomselect 0 "name CA"]

Another option is to use the lsort command to find all the unique
entries:
  
  set unique_resids [lsort -unique -integer [$set1 get resid]]

Cheers,
Justin