VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Jun 27 2008 - 12:51:26 CDT
- Next message: Yasser Almeida Hernández: "mutate by D-residues..."
- Previous message: Axel Kohlmeyer: "Re: Compiling from source on Mac OS X 10.5"
- In reply to: dimka: "select cylindrical slab"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Fri, 27 Jun 2008, dimka wrote:
DK> Hi VMD list, can you please tell me how to select a cylindrical volume?
DK>
DK> i've tried something like this but it doesn't work
DK>
DK> "within 10 of (x==0 and y==0)"
DK>
DK> supposedly this command should select a cylindrical slab in the Z
who said that it should?
DK> direction... but it doesn't.
of course it does not work. don't think that a computer program
does something reasonable, but you'll have to follow the logic.
(x==0 and y==0) would select only particles that have the x-coordinate
and y-coordinate to be exactly 0. that is highly unlikely
and within would select sphere around it anyways. what you need is
something like
sqrt(x*x + y*x) < 10.0
or if you want the cylinder around x=2 and y=-3:
sqrt((x-2)*(x-2) + (y+3)*(y+3)) < 10.0
think about it for a bit and it will become evident. ;-)
cheers,
axel.
DK>
-- ======================================================================= 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.
- Next message: Yasser Almeida Hernández: "mutate by D-residues..."
- Previous message: Axel Kohlmeyer: "Re: Compiling from source on Mac OS X 10.5"
- In reply to: dimka: "select cylindrical slab"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]