Topic Options
#19421 - 11/26/08 03:14 PM P-N vector orientation
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
This example illustrates computing an angle theta wrt. the bilayer normal (Z axis), and getting the probability distribution, p(theta), for each leaflet.

* the angle from the Z proj for P--N; first file @FF last file @LF
*

stream rtfprm.str ! READ RTF,PARAM
stream psfcrd.str ! READ PSF,COOR

! CHANGE FOR OTHER SIZES; LIPID COUNT, AND HALFWAY POINT
set nlpd 72
set nlph 36
! CALC SIZES FOR CORREL
calc n = 1 + @LF - @FF
calc mxa = @NLPD * 6
calc mxs = 10 + @NLPD * 2
calc mxt = 100 * @N ! 100 FRAMES PER FILE

correl maxtim @MXT maxa @MXA maxs @MXS noupdate
enter sa zero
edit sa total 360 offset 0. delta 0.5 skip 1
enter sb dupl sa

! DECLARE Z, R VECTOR COMPONENTS
set k 1
label elp
enter z@K vect z L @K N L @K P
enter r@K vect r L @K N L @K P
incr k by 1
if k le @NLPD goto elp

! OPEN FILES
set m @FF
set u 8
label tlp
open read unit @U file name dyn@M.trj
incr u by 1
incr m by 1
if m le @LF goto tlp
traj firstu 8 nunit @N

! LOOP OVER LIPIDS; LEAFLET A = 1 THRU NLPH, B > NLPH
set k 1
label clp
set inv 1.0
if k gt @NLPH set inv -1.0 ! SIGN INVERTED FOR LEAFLET B
mantim z@K ratio r@K ! NORMALIZE (DIVIDE BY LENGTH)
mantim z@K mult @INV ! LEAFLET CORRECTION
mantim z@K acos ! COMPUTE ANGLE THETA
mantim z@K hist 0. 180. 360 ! COMPUTE p(THETA); LEAFLET AVG
if k le @NLPH mantim sa add z@K
if k gt @NLPH mantim sb add z@K

incr k by 1
if k le @NLPD goto clp

! NORMALIZE SO THAT p(theta) SUMS TO 1.0
mantim sa divi @NLPH
mantim sb divi @NLPH

edit sa veccod 2 delta 0.5 skip 1 offset 0. total 360
open write unit 1 card name pn-hst@LF.dat
write sa unit 1 dumb time
* dumb
*

end
stop
_________________________
Rick Venable
computational chemist


Top
#19422 - 12/01/08 05:49 AM Re: P-N vector orientation [Re: rmv]
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
rick,

An angle of 0 corresponds to a vector aligned with the axis of reference pointing toward the aqueous phase, and an angle of 180 corresponds to a vector pointing toward the bilayer core, correct?

thank you.

Top
#19423 - 12/01/08 12:48 PM Re: P-N vector orientation [Re: beginner]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
Yes, although it is often useful to discuss 90-theta, which is 0 when parallel to the bilayer surface, and positive with an outward tilt, negative for inward.

Top
#19424 - 01/06/09 04:28 PM Re: P-N vector orientation [Re: rmv]
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
dear rick,

could you please give me a hint how could I get an average value of the angle?

thank you

Top
#19425 - 01/06/09 04:57 PM Re: P-N vector orientation [Re: beginner]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
I believe that the integral of p(theta) should give the mean, and the median value should be easy to read from a plot of p(theta).

Top
#19426 - 01/06/09 05:09 PM Re: P-N vector orientation [Re: rmv]
beginner Offline
Forum Member

Registered: 07/19/04
Posts: 165
thanks rick, it is my mistake.
I tried to get the average by modified this script and compare the result with what I did by the script that you suggested to calculate the bilayer chain tillt.

I found out that in this case we can not average the 2 monolayers (not setup set nlpd and nlph ) as we did for the bilayer chain tillt calculation

Top

Moderator:  chmgr, John Legato, petrella