From: jeela keel (
Date: Wed Jan 25 2012 - 08:39:47 CST

Hello VMD users,

 Is possible to count how many of same atomselect is in a list or how many
times atomselect is selected? Using VMD , selected molecules that are close
to different parts of protein and selected some molecules more than once
and want to know how many times the same atomselect is been selected or how
many of them are in the list per each frame.

for example in frame 1 there are 4 of atomselect2345 (same molecule) and 5
of atomselect8509 and so on.

I have used the command llength and num before that counts how many atoms
are in a list, but this time I need to count how many times each specific
atomselect is selected in the same frame. then move to next frame where
there are different atomselect that again change with next frame.

I am trying to write a script to do the above but I am wondering if there
is a command that can be useful to use in the script . Did anybody wrote
something similar to what am trying to do or have any suggestion. Thank you
for your help and suggestions.