From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Feb 07 2012 - 16:15:55 CST

On Tue, Feb 7, 2012 at 4:16 PM, Brian Kim <bnk25_at_cornell.edu> wrote:
> Hi all,
>
>  I am sort of new to this vmd and tcl script so forgive me if this question
> is way too easy for this mailing list.
>
> I am trying to use atomselect with a variable in lipid bilayer simulation.
> The center of mass for membrane that I produced is changing over time and I
> would like to count how many lipids are on each leaflet of membrane in every
> frame of the simulation by comparing their z location to z coordinate of
> COM.
>
> For example,
>
> # calculate z coordinate of COM
> set COM [atomselect [molinfo top] {name ROH or name PO4}]
> set x [measure center $COM]
> foreach {xmass ymass zmass} $x { break }
>
> # atomselect PPCS lipids that is located below zmass.
> set sel1 [atomselect [molinfo top] {name PO4 and resname PPCS and z <
> $zmass}]
>
>
>
> However, it doesn't work. It's always 0 even though zmass is correct in each
> frame.

best you check your selection string manually using two representations.

you know that you use two different selection strings for compute
"zmass" and to compare against it. also the logic is different (logical
"or" and logical "and")

how should that work?

axel.

>
> Can anyone give me some help? Thank you very much in advance!
>
> regards,
>
> Brian
>
> --
> Brian N. Kim
> Ph.D Candidate
> Graduate Field of Biophysics
> Cornell University, Ithaca, NY 14853
> Phone: 607 - 255 - 0632

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science and Technology
Temple University, Philadelphia PA, USA.