From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jan 04 2005 - 10:23:26 CST

Hi,
  You can use the "within" atom selection keyword to query the
atom ID's of waters within a given distance from a reference selection.
You can then use "same residue as" to select entire waters rather
than individual atoms. So, you selection might be something like:
  set sel [atomselect top "same residue as (within 20 of something)"
where something is distance reference point, for example.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Jan 03, 2005 at 07:19:04PM -0500, VISWANADHA SRIDHARA wrote:
> Hi Everyone,
>
> How Can I get just the molecule ID's for a certain shape in the system?
> For example, if the system is a cube of 6nm water molecules, and what
> should I do to get the molecule ID's which are in say., 2nm radius from the
> center of the system? I was able to get all the atoms in that specific
> radii, but not just the molecules which are completely there in that
> sphere.
> I hope you got me.
>
> Eg., for spc216 system
>
> 128SOL OW
> 128SOL HW1
> 128SOL HW2
> 129SOL OW
> 129SOL HW2
> 143SOL OW......
>
> If you can see, for 129SOL, HW1 is out of the sphere of 2nm radius, so is
> there any way to get a pdb file with just 128SOL, ignoring 129 and so on.
>
> Thanks in advance for your help.
>
> Vish

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078