From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Sun Feb 11 2007 - 12:11:09 CST

In this case it should be llength [lsort -unique [$sel get residue]] to
avoid double counting, unless you've used a selection with exactly one
atom per residue.
Peter

Leonardo Trabuco wrote:
> On Sun, Feb 11, 2007 at 01:35:17PM +0100, namd vmd wrote:
>
>> How to get the number of residues selected from a atomselect command
>> in vmd ?
>>
>
> You can do something like: llength [$sel get residue]
>
> Best,
> Leo
>
>