From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Jun 07 2006 - 10:59:49 CDT

Hi Gustavo,
you can do this by writing a small tcl script to do what you need, and
then invoking vmd with
vmd -e script.tcl -dispdev text

So, for example, you could have a script like

mol new myfile
set sel [atomselect top "water and same residue as within 3 of protein"]
$sel writepdb outwaters.pdb
quit

And then use that as the script.tcl in the command line above. Is this
helpful?

Peter

Gustavo Seabra wrote:
> Hi,
>
> I was wondering if any of you experts could help me with a simple
> command.
>
> I'd like to be able to get, from an Amber restart file, all the waters
> within a distance (say, 3A) from a central molecule. I know how to do
> thins in the GUI, byt using, for example, "same residue as within..."
> .But, ideally, I want to do this without raising the whole VMD: maybe
> just a shell script or even a one liner that can print out the residue
> numbers to a separate file. Is that possible?
>
> Thanks.
>