From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jul 13 2006 - 10:46:37 CDT

Vlad,
  An even easier way is to use add "same residue as", like this:
set sel [atomselect top "same residue as (name O and resname WAT HOH and within 5 of resname GLU ARG)"]

  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Jul 13, 2006 at 11:44:31AM +0200, Vlad Cojocaru wrote:
> Hi guys,
>
> Sorry it was a stupid question ... I got it:
>
> set sel [atomselect 0 {name O and resname WAT HOH and within 5 of
> resname GLU ARG}]
> set resids [$sel get resid]
> set waters [atomselect 0 "resid $resids"]
>
> This does it well!!
>
> sorry
> vlad
>
> Vlad Cojocaru wrote:
>
> >Dear vmd users,
> >
> >A short question (maybe its a stupid one - but for some reason I didnt
> >figure it out yet) about selection. I would like to select alll waters
> >that are lets say within 5A of certain protein residues, but I would
> >like to have only those waters that have each of its atoms within that
> >distance. In other words, I would like to avoid getting incomplete water
> >molecules under my selection. If I use "water within 5 A of protein",
> >some of the waters contain only O atom or only H1 or H2....
> >
> >Is there a way to do that?
> >
> >Thanks
> >vlad
> >
> >
> >
>
> --
> Dr. Vlad Cojocaru
> EML Research gGmbH
> Molecular and Cellular Modeling Group
> Schloss-Wolfsbrunnenweg 33
> 69118 Heidelberg, Germany
> Phone: +49-6221-533266
> Fax: +49-6221-533298
> e-mail: Vlad.Cojocaru_at_eml-r.villa-bosch.de
> http://projects.villa-bosch.de/mcm/people/cojocaru/
>

-- 
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