Hi,

I have a couple of quick notes about your specific application:

This works well when bilayers are flat. So, it works well for small bilayers
and it works well at the beginning of a simulation. For medium to large
bilayers, undulations throughout the simulation will cause this algorithm to
break.

Here are some other things that don't work:

 - selecting all lipids where atom X is higher than atom Y. In longer
simulations, lipids wiggle around enough that the heads can tilt and the
tails can even be higher than the heads.

 - same as above, but looking at the center of mass of the head vs. the COM
of the tail. This fails for the same reason. It turns out that lipids really
wiggle a lot.

 - etc.

These are easy errors to miss because the algorithms work well at the
beginning of the simulation, so even a quick visual examination won't show
the problems.

In my experience, the easiest thing to do is to use your method on the first
frame of a simulation, inspect the selection visually, and then write it out
explicitly for use in subsequent frames.

You probably know all of this, but I thought I'd mention it in case someone
was tempted to just take your code and apply it individually to each frame
of a simulation without really thinking about it. Unfortunately, I've seen
people make this particular error a few times (in both VMD and C), and
usually you can't tell they're making it just by reading their Methods
section :(.

Cheers,

-michael

On Wed, Mar 4, 2009 at 6:04 AM, Höfling Martin <martin.hoefl...@gmx.de>wrote:

>
> Am 04.03.2009 um 06:46 schrieb Warren DeLano:
>
> Hey Warren,
>
> It is remarkable that a question like this hasn't come up before, but it
> reveals a rather large whole in PyMOL's selection language:  though we have
> some proximity operators, we are not currently able to select atoms based on
> absolute or relative coordinate vector relationships.
>
> So the present answer to your question appears to be "no".  Sorry about
> that!
>
>
> Just to give the application to my question: If you wanna select the upper
> leaflet of a bilayer - an easy method - shown to me in VMD is to select "by
> residue" all Phosphor atoms with e.g. z > 40...
>
> Well I scripted a bit around it which worked in my case:
>
> def leafletIndex():
>     '''
>     Create leaflet indices for upper and lower bilayer, based on Phosphor
> atoms
>     '''
>
>
>     cmd.delete("Phosphor")
>     cmd.delete("UpperLeaflet")
>     cmd.delete("LowerLeaflet")
>
>
>
>
>     cmd.select("Phosphor","name P*")
>     ext=cmd.get_extent("Phosphor")
>     lower=ext[0][2]
>     upper=ext[1][2]
>     middle=upper-lower
>     atoms = cmd.get_model("Phosphor")
>
>     cmd.select("UpperLeaflet",None)
>     cmd.select("LowerLeaflet",None)
>
>     for at in atoms.atom:
>         if at.coord[2] > middle:
>             cmd.select("UpperLeaflet","UpperLeaflet or index %d"%at.index)
>         else:
>             cmd.select("LowerLeaflet","LowerLeaflet or index %d"%at.index)
>
>
>     cmd.select("UpperLeaflet","byres UpperLeaflet")
>     cmd.select("LowerLeaflet","byres LowerLeaflet")
>     cmd.deselect()
>
>
> Best
> Martin
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>


-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)

Reply via email to