From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue May 08 2012 - 09:24:20 CDT

On Tue, May 8, 2012 at 9:37 AM, winardi, erik <egw24_at_yahoo.com> 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 ?

elementary:

set sel1 [atomselect top {type 1}]
set sel2 [atomselect top {type 2}]

puts "there are [$sel1 num] atoms of type 1 and [$sel2 num] atoms of type 2"

axel.

>
> Thanks,
>
> Erik Winardi

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science and Technology
Temple University, Philadelphia PA, USA.