Get periodic boundary condition of the DCD

From Computational Biophysics and Materials Science Group
Revision as of 18:41, 7 May 2014 by Kevin (Talk | contribs) (Created page with "TCL script to get periodic boundary condition of the system. ################################ ## TCL script to get periodic boundary condition of the system ## Kevin Apr ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TCL script to get periodic boundary condition of the system.

################################
## TCL script to get periodic boundary condition of the system
## Kevin Apr 2014
## Usage: vmd -dispdev text -e getpbc.tcl
## Input: pdb dcd
## Output: xyz
## Units:
## Notes: 
################################

set filename "unsym"
set dir "/nfs/disk3/cchan2242/BAR-PH/raw/unsym/"
mol new $dir/ionized.pdb type pdb waitfor all
animate delete all
mol addfile $dir/NPT-11.dcd type dcd waitfor all

set frames [ molinfo top get numframes ]

set outpbc [open $filename+pbc.xyz w]

for { set t 0 } { $t < $frames } { incr t } {
  set temp [pbc get -first $t -last $t -molid top]

  set xlength [lindex $temp 0 0]
  set ylength [lindex $temp 0 1]
  set zlength [lindex $temp 0 2]

  puts $outpbc "$xlength $ylength $zlength"
}
close $outpbc
quit