From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Jul 22 2008 - 11:45:54 CDT

On Tue, 22 Jul 2008, Ignacio Fernández Galván wrote:

IFG> Hi all,
IFG>

IFG> I have a system consisting of an aromatic molecule and number of
IFG> solvent molecules. I'd like to select the solvent molecules which
IFG> are more or less solvating both sides of the benzene ring, that is,
IFG> located perpendicular to the plane of the ring and at a distance of
IFG> say 4Ĺ at most.

IFG> Just using the "within" keyword is not enough, because it selects
IFG> based on a spherical cutoff, and I want a kind of cylindrical
IFG> region. I got more or less what I want by using "(within 4 of C1)
IFG> and (within 4 of C3) and (within 4 of C5)", where C1, C3 and C5 are
IFG> the atoms in the benzene ring, this somewhat limits adequately the
IFG> region, but this region gets narrower the farther from the ring it
IFG> is, and that's not quite it.

ignacio,

what i would do is to add a dummy atom to your system and assign
it the center of mass coordinates of the benzene ring carbons.

we've recently done studies of self-assembly of peptide octamer
rings in our group and this route allowed us to conveniently determine
the ring stacking. i'd expect that it would work similarly for your
problem (you can still use as within selection since the "non-side"
position are already taken by the ring carbons). for starters you
can look at the g(r) of the benzene COM.

if you need some help in the required scripting, just let me know.
i should still have some relevant script segments somewhere (it
is pretty straightforward anyways).

cheers,
   axel.

IFG> So, I decided to take it the hard way and play with the
IFG> coordinates, thinking I could select all atoms whose distance to C1
IFG> is smaller than to H1, to C2 smaller than to H2, etc. But now the
IFG> problem is... how can I reference the coordinates of specific atoms
IFG> dynamically (they should be updated each frame)? If that's not
IFG> possible, I'd have to store the coordinates in variables, which I
IFG> did with "set xA [[atomselect 0 "index 0"] get x]", for instance,
IFG> and then use $xA in the selection... but I must be doing something
IFG> wrong, because it does not work: it behaves as if $xA = 0, although
IFG> "puts $xA" says otherwise.
IFG>
IFG> I must be doing something wrong now, I'd be grateful for any help.
IFG>
IFG> Thanks,
IFG> Ignacio
IFG>
IFG>
IFG> __________________________________________________________
IFG> Not happy with your email address?.
IFG> Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
IFG>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.