From: John Stone (
Date: Thu Oct 13 2011 - 14:32:26 CDT

If I follow your question correctly, you will want to add "same residue as"
to the front of your selection so that it picks all of the atoms that
are members of the residues that have at least one atom within Y of Z..

  John Stone

On Thu, Oct 13, 2011 at 01:48:43PM -0400, Michael LeVine wrote:
> Hi all,
> I'm currently writing a script in which I need to select all the
> residues which have AT LEAST one atom within a distance of a
> designated protein. Using the following commands:
> set sel [atomselect top "resname X and within Y of Z"]
> $sel set segname A
> This only sets the segname of the atoms within Y to A, rather than all
> the residues that have an atom within Y to A. This is probably
> obvious.
> Michael

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349       Fax: 217-244-6078