#loads a trajectory, then calcualtes and writes out a RDF # Jennie Thomas - October 2006 #does not write the integrated values correctly # Load the system and the trajectory mol new _parms/hp_no3_7m_bulk.parm7 for {set i 9} {$i <= 10} {incr i} { mol addfile equil-press/equil-$i.crd type crdbox waitfor all } #set up the atom selections set sel1 [atomselect top "name NN1"] set sel2 [atomselect top "name O"] #calculate g(r) set gr [measure gofr $sel1 $sel2 delta .1 rmax 10 usepbc 1 selupdate 1 first 1 last 200 step 1] #set up the outfile and write out the data set outfile [open gofr.dat w] set r [lindex $gr 0] set gr2 [lindex $gr 1] set igr [lindex $gr 2] set i 0 foreach j $r k $gr2 l $igr { puts $outfile "$j $k $l" } close $outfile #exit vmd exit