From: Axel Kohlmeyer (
Date: Tue Sep 06 2011 - 05:31:23 CDT

On Sep 6, 2011, at 6:20 AM, Hitesh Patel <> wrote:

Hello Filip,
use "or" instead of "and" between two residues X and Y.. like..
*water and within 3 of (residue X or residue Y)*

no. That will select the water atoms that are within 3 of either residue,
not within 3 of both.

See my other post for a proper selection example.


because there will be no intersection of residue X and Y.

Hitesh Patel

On Tue, Sep 6, 2011 at 10:08 AM, Filip Persson <>wrote:

> Hello,
> I am trying to define a cavity in a protein using the atom selection
> command in VMD. I tried using
> *water and within 3 of (residue X and residue Y)*
> in the 'selected atoms-field' in the graphical representations window, but
> nothing happens. Changing the distance does not help, so obviously I must be
> doing something wrong here. Is it possible to define cavities in a way
> similar to the command above, or should I use any other type of selection
> command?
> Thanks!
> Best,
> Filip