How to write a new dcd.file by using Tcl

From: xiaojing gong (gongxiaojing1981_at_yahoo.com.cn)
Date: Thu Jan 25 2007 - 08:28:21 CST

Dear all.
       I want to first read from 10 to 20 frames and then to write these 10 frames in a new dcd file. BUT I can't view the new dcd file with VMD. The error is "premature end of file". I use the Tcl script to do it. The code is following
   
  proc write_dcd { { begin 10 } { end 20 } { filename 16.dcd } } {
  animate delete all
  for { set frame $begin } { $frame < $end } { incr frame } {
    animate read dcd $filename beg $frame end $frame waitfor all
 
  puts "----- frame = $frame -----"
  
  animate write dcd new.dcd beg $frame end $frame waitfor all
  
    animate delete all
}
   
  }
  Can anyone give me some suggestions about this ?
  Xiaojing

                 
---------------------------------
ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:44:19 CST