From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Tue Apr 24 2007 - 10:10:41 CDT

Yes, and yes:

set sel [atomselect top "x < 0 and x>-10 and y < 20 and y>10 and z<30
and z>20"]

set sel [atomselect top "sqrt(sqr(x-a) + sqr(y-b) + sqr(z-c)) < r"]
for a,b,c the center and r the radius

See
http://www.ks.uiuc.edu/Research/vmd/current/ug/node78.html#ug:topic:selections
for more atomselect fun.

Peter

Nichols A. Romero wrote:
> Hi,
>
> This is a trivial question from a newbie.
>
> Is it possible within VMD to select atoms that fall in a particular
> range of x, y, or z?
>
> This is more complicated and would probably require external scripting
> in some language.
> Is it possible to specify some center in structure and return all the
> atoms within a given
> radius of that center?
>
> Thanks,
> --
> Nichols A. Romero, Ph.D.
> 1613 Denise Dr. Apt. D
> Forest Hill, MD 21050
> 443-567-8328 (C)
> 410-306-0709 (O)