Skip to main content »

Trinity College Dublin

MOLDY Analysis Tools

Membrane Forcefield Parameters

The following are CHARMM27 force field paramters for DPPC and PDPC. They have been generated from POPC, PCGL and DHA, all of which are defined in the current CHARMM forcefield.

VMD Scripts

These tcl scripts can be used in the VMD TK Console but first sourcing them (i.e. source /filelocation/center.tcl) and then calling them with the requisite parameters.

Center a Selection


## This takes a selection averages the z-coordinate and then
## moves the entire simulation box to the center.
##
## Need input of selection and molid
##
## i.e "center_z 0 myselection"
##
## J.Taylor   May 2007

proc center_z { molid something } {

        set n [molinfo $molid get numframes]

        for { set i 0 } { $i < $n } { incr i } {

                set start 0
                set center 0
                $something frame $i

                foreach coord [$something get {z}] {
                        set start [expr ($start+$coord)]
                }

                set center [expr (-1.0/[$something num])*$start]
                set zoffset [list 0 0 $center]
                puts "$i $zoffset"
                set mysys [atomselect $molid all frame $i]
                $mysys moveby $zoffset
        }
}

Membrane Width


## This takes a selection of top and bottom atoms and
## calculates the average memebrane width.
##
## Need input of molid, atom name to use for distance calc (i.e. P1),
## midpoint of the memebrane (i.e. 0) and output filename.
##
## i.e "membrane_width 0 P1 0 P_to_Pwidth"
##
## J.Taylor   April 2007


proc membrane_width { molid P_name z_divide outfile } {

        set filename [open $outfile "w"]
        set mytop [atomselect $molid "name $P_name and z>$z_divide"]
        set mybot [atomselect $molid "name $P_name and z<$z_divide"]
        set n [molinfo $molid get numframes]
        
        for { set i 0 } { $i < $n } { incr i } {
                set starttop 0
                set startbot 0
                
                $mytop frame $i
                $mybot frame $i
                
                foreach coord [$mytop get {z}] {
                        set starttop [expr ($starttop+$coord)]
                }
                
                foreach coord2 [$mybot get {z}] {
                        set startbot [expr ($startbot+$coord2)]
                }
                
                puts "$i [expr ((1.0/[$mytop num])*$starttop)-((1.0/[$mybot num])*$startbot)]"
                puts -nonewline $filename "$i [expr ((1.0/[$mytop num])*$starttop)-((1.0/[$mybot num])*$startbot)] \n "
        }
        
        close $filename
}

Last updated 01 Jul 2010Contact TCHPC: info | support.