From: Roman Petrenko (rpetrenko_at_gmail.com)
Date: Thu Mar 26 2009 - 15:28:00 CDT

every residue has only one CA atom, so try
set n [[atomselect top "resname HSD and name CA"] num]

On Thu, Mar 26, 2009 at 3:51 PM, Ocar Campos <ocarnorsk138_at_gmail.com> wrote:
> Hello:
>          I'm a newcomer to VMD and I have to do some things with the tk
> console, one of this is to count the number of some aminoacids in a protein,
> for example I have to count the number of histidines I have, for this I
> found I could use the following command:
>
>           set n [[atomselect top "resname HSD"] num]
>
>         But I realized this counts the number of atoms that are related to
> the Histidine, Is there a way to count the number of histidines, but not the
> atoms related to histidines?
> In my protein that command gives back a 68, and it should be a 4.
>
> Cheers.
>
> O'car Campos C.
> Bioinformatics Engineering Student.
> Universidad de Talca.
>

-- 
Roman Petrenko
Physics Department
University of Cincinnati