AW: Coordinate vs. time plots

From: Norman Geist (
Date: Thu Mar 21 2013 - 01:49:37 CDT

Hi Mihaela,

Maybe you want to use xstfreq next time to write the box to a file holding
exactly what you want, during the simulation. Please also remember that the
box size won't change without a barostat being active.

As I think you already finished the simulation, you will have to get the box
out of the dcd. The easiest way is to use a little vmd tcl script. As it is
so easy, I wrote one for you, see below. You will have to load your system
first will all the dcd frames you want the box for. Afterwards "source" the
script from the vmd console like "source /path/to/getbox.tcl"

Save this to "getbox.tcl":

#script start
puts "What mol id?"
gets stdin mid
puts "What outfile name?"
gets stdin filename

mol top $mid

set out [open $filename w]
puts $out "#frame x y z angles"
 set frames [molinfo $mid get numframes]
 for {set i 0} {$i < $frames} {incr i} {
   puts "Frame $i of $frames"
   animate goto $i
   set box [pbc get]
   set box [string map {\{ \ } $box]
   set box [string map {\} \ } $box]
   puts $out "$i $box"
close $out
#script end

~Norman Geist.

> -----Ursprüngliche Nachricht-----
> Von: [] Im
> Auftrag von Mihaela Drenscko
> Gesendet: Mittwoch, 20. März 2013 23:18
> An:
> Betreff: namd-l: Coordinate vs. time plots
> Hi,
> I am running a simulation with 10 million steps for 72 DMPC molecules.
> I have to plot length of the box vs. time (and width of the box per
> time), then area per lipid vs. time. How can I get the coordinates of
> the box at each time step, then make a plot vs time?
> Thank you,
> Mihael

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:23:04 CST