VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu May 24 2012 - 09:13:04 CDT
- Next message: John Stone: "Re: Regarding the Use of STL Files as Boundary Features"
- Previous message: peter.schmidtke_at_fr.netgrs.com: "TR: VMD atomselect with cartesian reference"
- In reply to: peter.schmidtke_at_fr.netgrs.com: "TR: VMD atomselect with cartesian reference"
- Next in thread: Paweł Kędzierski: "Re: TR: VMD atomselect with cartesian reference"
- Reply: Paweł Kędzierski: "Re: TR: VMD atomselect with cartesian reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Thu, May 24, 2012 at 9:16 AM, <peter.schmidtke_at_fr.netgrs.com> wrote:
> Dear VMD users/developers,
>
>
>
> I’d like to create a selection of atoms that is within a given distance from
> a point in 3D cartesian space (not a molecular object, atom or whatsoever).
>
>
>
> How can this be achieved in VMD/tcl? I’ve been searching around for
> documentation but was fairly unsuccessful.
>
> Basically I’d like to do something like :
>
> atomselect top “protein within 20.0 of {-1 1 0}”
>
>
>
> Where {-1 1 0} is the cartesian coordinate from which I’d like to do the
> measure.
nope. you can't do this. "within X of Y" requires
Y to be a selection of atoms. please see the
documentation. computer software is brutally literal.
it doesn't know how to do "the reasonable thing(tm)".
what you *can* do is math with the coordinates.
for example you can try this (untested):
atomselect top "protein and ( ((x+1.0)*(x+1.0)+(y-1.0)*(y-1.0) + z*z) < 400.0)"
cheers,
axel.
>
>
>
> Thanks in advance for your help.
>
>
>
> Best regards.
>
>
>
> Peter Schmidtke
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science and Technology Temple University, Philadelphia PA, USA.
- Next message: John Stone: "Re: Regarding the Use of STL Files as Boundary Features"
- Previous message: peter.schmidtke_at_fr.netgrs.com: "TR: VMD atomselect with cartesian reference"
- In reply to: peter.schmidtke_at_fr.netgrs.com: "TR: VMD atomselect with cartesian reference"
- Next in thread: Paweł Kędzierski: "Re: TR: VMD atomselect with cartesian reference"
- Reply: Paweł Kędzierski: "Re: TR: VMD atomselect with cartesian reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]