From: Eduardo (chucruz_at_ks.uiuc.edu)
Date: Wed Apr 22 2009 - 22:17:42 CDT

Hola Raul;

Probably you want to obtain the density profile along the Z axis for
your lipids. If that is the case, you can just select a given volume
and determine the mass within that region.

For instance:

# load molecule
mol load psf XYZ.psf pdb XYZ.pdb

# approximate boundaries for lipid membrane in the Z axis
set Zmin 0;
set Zmax 50

# thickness of the volume selection
set Zstride 3

# compute mass
# ===========

# mass is computed between Zfloor and Zroof

set Zfloor $Zmin

while { $Zfloor <= $Zmax } {

    set Zroof [ expr $Zfloor + $Zstride ]

   set sel1 [ atomselect top "z > $Zfloor and z < $Zroof" ]
   set mass1 [ measure sumweights $sel1 weight mass ]
   puts $mass1
   $sel1 delete

   set Zfloor $Zroof;

}

In case you load a trajectory (DCD file), you need to add an extra
loop to go over the different frames. This script still requires
work (estimate the volume, and convert from Da/A^3 into gr/cm^3, and
so on), but it should give you an idea of the process.

Regards;

Eduardo

On Apr 22, 2009, at 11:24 AM, Raul Araya wrote:

> Dear VMD users:
>
> I'm running simulations of some lipids over an SiO2 surface and I'm
> interested into obtain a density profile from my trajectories. I want
> to obtain the density of the lipids at different distances from the
> surface to observe the average orientation of the lipids over the
> membrane. Has any one developed some TCL script usable with VMD that
> can do this or something alike? Can any one help me please in making
> my own script? Any help will be appreciated
>
>
> Raúl Araya Secchi
> B.Sc Molecular Biotechnology.
> Molecular Biotechnology Engineer.
> Centre for Bioinformatics CBUC,
> Faculty of Biological Sciences, P. Universidad Catolica de Chile
> Portugal # 49 – ZIP 6513492 Santiago – Chile Phone: + 56 2 6862269;
> http://www.cbuc.cl

=====================
Eduardo Roberto Cruz Chu
=====================