From: Eduard Schreiner (
Date: Tue Jul 10 2007 - 09:23:23 CDT

Hey Sally,

On Tuesday 10 July 2007 10:03, sally cii wrote:
> Dear all,
> I want to select the gas molecules (suppose name GAS) within a specific
> distance of one atom FE in a trajectory.
> I know if I want to select the gas molecules within a distance I can use
> "name GAS and within r of name FE", however,

"(name GAS and within r2 of name FE) and (not within r1 of name FE)"

should do the job.
Of course you have to update the selection in every frame
$sel update
in a script or
Trajectory->Update Selection Every Frame
in the Graphical Representation GUI

Hope that helps


> as I want to select those more than r1 and less than r2 of FE, and in the
> trajectory, the coordinates of FE are changing
> every frame, so I couldn't use sqr(x-a)+sqr(y-b)+sqr(z-c)>sqr(r1) and
> sqr(x-a)+sqr(y-b)+sqr(z-c)<sqr(r2). Can I ask what
> how can I select those molecules? Thank you in advance^-^
> Sally

Eduard Schreiner                     e-mail:
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-22121
Ruhr-Universitaet Bochum - NC 03/52         Fax:   ++49 (0)234/32-14045
D-44780 Bochum