From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jan 03 2012 - 18:39:05 CST

On Tue, 2012-01-03 at 17:50 -0600, Peter C. Lai wrote:
> I have a silly question:
>
> Is there a way to get a selection to include all atoms connected to the
> resid of another selection?
>
> For example in my given structure I want to select all waters where
> z > 87, but at z near 87 if I do "z > 87 and resname SOL", it will give me
> waters with missing atoms at the cutoff interface. Is there a way to get the
> selection to include the entire resid without having to parse the return of
> $sel get resid and then construct a new selection string?
>
> This would also help with incomplete selections using the within keyword
> as well...

yes, what you are looking for is either:

same residue as (...)

or:

same fragment as (...)

the first will keep residues intact,
the latter molecules (objects that are
connected throughout with bonds). for
water molecules those two are usually
resulting in the same selection of atoms.

cheers,
    axel.

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