From: Axel Kohlmeyer (
Date: Fri Nov 25 2011 - 14:52:32 CST

On Fri, Nov 25, 2011 at 2:51 PM, Thomas Evangelidis <> wrote:
> Shouldn't it be "water within 3 of..."?
> Also $sel contains the _atom_ indices of all the waters you have selected,
> therefore the number you print is 3x the number of waters. To get the actual
> number of waters use the keyword "oxygen". There will probably be no
> difference in the results in your case, but I prefer using "same residue as"
> instead of "same fragment as" to select water. Therefore I would use the
> following atomselection string:

same fragment is the best choice. the fragment id is determined by VMD
upon loading/guessing the molecule structure information and depends
on nothing by the bond information. the residue number still depends on
the residue numbering pattern and that may be wrong, even though it is
better than resid.


Dr. Axel Kohlmeyer
College of Science and Technology
Temple University, Philadelphia PA, USA.