From: Axel Kohlmeyer (akohlmey_at_vitae.cmm.upenn.edu)
Date: Sat Apr 15 2006 - 20:31:11 CDT

On Sat, 15 Apr 2006, Margaret Shun Cheung wrote:

MC>
MC> Dear VMD wizards,

MC> I am struggling with the tcl syntax (VMD tkconsole).
MC> I'd like to select water molecules between two residues in a trajectory
MC> (eg 100 frames).
MC>
MC> The "within 5 of protein" seems to only select waters around proteins. But
MC> how could I identify water molecules that are enclosed between two or more
MC> residues?

you can easily combine multiple conditions, e.g.:

water and ((within 5.0 of residue 4 5) and (within 5.0 of residue 20))

please see the user's guide for more details on the selection syntax.
remember to activate 'Update selection' or it will stick to the first
selection and also please note the subtle difference between 'residue'
- which is unique but always renumbered starting from 0 - and 'resid'
which is the number from the initial structure (e.g. pdb / psf file)
- which which can be useful if you have multiple peptides with the
same sequence in your system.

best regards,
   axel.

MC> Thank you very much for your help!
MC> Sincerely,
MC>
MC> Margaret S. Cheung,
MC> Ph. D. Postdoctoral Fellow,
MC>
MC> ------------------------------------------------------------
MC> Room 2117 Tel: (301) 405-4892
MC> Inst. for Phys. Sci. & Tech. Fax: (301) 314-9404
MC> University of Maryland http://glue.umd.edu/~mscheung
MC> College Park, MD 20742-2431 email: mscheung_at_ipst.umd.edu
MC> ------------------------------------------------------------
MC>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.