From: Axel Kohlmeyer (
Date: Wed Jan 05 2005 - 02:39:13 CST

On Wed, 5 Jan 2005 wrote:


EN> Hi all,
EN> Just a thought... this is also totally untested, but I think the required
EN> logic statement for what VS wants to do might be just:
EN> "resname SOL and (not same resid as (not within 20.0 of <center> ))"

cool. for speed reasons you would probably want to have
a 'resname SOL and ' in front of the 'not within'.
the '*name' searches are always fast (linear), but
'within' is slow (you have to go over pairs and calculate
the distance), so you want to limit the number of possible
items for 'within' as much as possible.
EN> Axel's version should also work, methinks... testing might show that one of
EN> these syntaxes is faster than the other (which could definitely be
EN> important, for a large system, if you're evaluating the selection command
EN> repeatedly).

yep. in fact, since this is a kind of common operation for data analysis
in aqueous systems, i'd be really interested to know, which version turns
out to work best (and fastest). so please let us know.


EN> -Erik
EN> C. Erik Nordgren, Ph.D.
EN> Department of Chemistry
EN> University of Pennsylvania
EN> Quoting Axel Kohlmeyer <>:
EN> >
EN> > O>>> "JS" == John Stone <> writes:
EN> > H>>> "VS" == VISWANADHA SRIDHARA <> writes:
EN> >
EN> > VS> i Axel and John,
EN> >
EN> > VS> One more quick question, Here you mentioned keeping the whole
EN> > molecule, if
EN> > VS> some of its atoms are within the range of the reference point, but
EN> > what if
EN> > VS> it is the other way, if I Want to remove the entire molecule when some
EN> > of
EN> > VS> its atoms are outside the range of the study of reference. Is it
EN> > possible
EN> > VS> just by putting not(same residue as (within 20 of something)), after
EN> > we
EN> > VS> select the pdb file.
EN> >
EN> > ok, that is a little trickier. you have to carefully check the
EN> > and/or logic, but something like following (totally untested) might work:
EN> >
EN> > '(same resid as (name OW and within 20.0 of index 0)) and not
EN> > same resid as (name HW1 HW2 and not within 20.0 of index 0)'
EN> >
EN> > axel.

Dr. Axel Kohlmeyer   e-mail:
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum
If you make something idiot-proof, the universe creates a better idiot.