# vmd tcl script to create a series of files with # the time series of the backbone dihedral angles (including # the improper ones) from the different temperature simulations. # # (c) 2003 by axel.kohlmeyer@ruhr-uni-bochum.de for {set t 280} {$t < 405} {set t [expr $t + 10]} { puts "loading data for $t kelvin." set mol [mol new "monom-$t.psf" waitfor all] mol addfile "monom-$t.dcd" molid $mol waitfor all animate goto 0 set n [ molinfo $mol get numframes ] puts "processing $n frames" # create an array of selections for the sequence of atoms # the first and the last residue have to be treated differently set ia 0 for {set ir 1} {$ir < 9} { incr ir } { set a($ia) [ atomselect $mol "resid $ir and name N" ] incr ia set a($ia) [ atomselect $mol "resid $ir and name CA" ] incr ia set a($ia) [ atomselect $mol "resid $ir and name C" ] incr ia } set ie [expr $ia - 3] puts "ia: $ia / ie: $ie" set f 0 for {set i 0} {$i < $ie} {incr i} { set j $i # grab 4 atom indices $a($j) frame $f $a($j) update set v1 [lindex [$a($j) get index] 0] incr j $a($j) frame $f $a($j) update set v2 [lindex [$a($j) get index] 0] incr j $a($j) frame $f $a($j) update set v3 [lindex [$a($j) get index] 0] incr j $a($j) frame $f $a($j) update set v4 [lindex [$a($j) get index] 0] # ...and create a dihedral label from it label add Dihedrals $mol/$v1 $mol/$v2 $mol/$v3 $mol/$v4 } for {set i 0} {$i < $ie} {incr i} { label graph Dihedrals $i "bb-dihed-$t-$i.dat" } puts "cleaning up..." label delete Dihedrals all #close $fp mol delete $mol } quit