From: Ana Celia Vila Verde (
Date: Tue May 08 2012 - 09:31:23 CDT

Hi Erik,

To get the number of atoms of type Csp3 you can do:

# select the atoms you want
set sel [atomselect top "type Csp3"]

# have a look at for the
explanation of the command
set numAtoms [$sel num]
puts " the number of Csp3 atoms is $numAtoms"

# you should always delete selections to save memory
$sel delete



On 5/8/12 3:37 PM, winardi, erik wrote:
> Hi VMD users,
> Is there any command to count a specific atom types ?
> For example if the system has two types of C (Csp3 as type 1 and Csp2
> as type 2)
> How can I count the number of atom for each type carbon ?
> Thanks,
> Erik Winardi