From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Aug 27 2004 - 15:27:01 CDT

Here's a script-oriented example from the VMD User's Guide:
  http://www.ks.uiuc.edu/Research/vmd/current/ug/node177.html

The selection text used is:
  water and same residue as (within 2 of protein)

Here's a script that uses it:

set sel [atomselect top "water and same residue as (within 2 of protein)"]
set n [molinfo top get numframes]
for { set i 0 } { $i < $n } { incr i } {
  $sel frame $i
  $sel update
  $sel writepdb water_$i.pdb
}

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Aug 24, 2004 at 01:44:57AM -0700, Sekwan Oh wrote:
> Hi,
>
> There is one polypeptide molecule solvated with water molecules.
>
> I would like to select the water molecules only within certain distance
> from the polypeptide.
>
> I found that we can use 'within' command, but I couldn't make it.
>
> The manual says it can be done by the command "within <distance> of
> <molecules>", however it's not clear for me when this command should be
> used.
>
> Could someone tell me how to do this? (e.g. What should be done first,
> seconde and so on)
>
>
> Thank you.
>
> Regards,
>
> Sekwan
>
> _________________________________________________________________
> Get ready for school! Find articles, homework help and more in the Back to
> School Guide! http://special.msn.com/network/04backtoschool.armx

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