Re: Timestep in restart output

From: Tim Isgro (timisgro_at_ks.uiuc.edu)
Date: Thu Feb 26 2004 - 21:01:21 CST

Hi Sichun,

This little piece of script was handed down to me, so I hand it to you.
It will automatically grab the last time step of your previous run from
the xsc file.

if {1} {
# procedure to get the first time step for the new simulation
# from the old simulation whether it be a completed sim or one
# to be restarted
proc get_first_ts { xscfile } {
  set fd [open $xscfile r]
  gets $fd
  gets $fd
  gets $fd line
  set ts [lindex $line 0]
  close $fd
  return $ts
}
if [file exists $inputname.xsc] {
set firsttime [get_first_ts $inputname.xsc]
firsttimestep $firsttime
} else {
set firsttime [get_first_ts $inputname.restart.xsc]
firsttimestep $firsttime
}

} else {
firsttimestep 0
}

If you don't want to grab the last time step, just change the 0 to 1.
Also, make sure you have $inputname defined as your previous run file
name (prefix).

Tim

On Thu, 26 Feb 2004, Brian Bennion wrote:

> The command is
>
> firsttimestep XXX
>
> xxx would be your last step from the previous simulation.
> comment out the number of steps and use the command
>
> run YYYYY
>
> at the end of your namd config.
>
> Brian
>
>
> On Thu, 26 Feb 2004, Sichun Yang wrote:
>
> >
> > Dear Namd users,
> >
> > I restart the simulations from the previous run.
> > However, the timestep starts to count from 0 again in the new output file.
> > I am wondering whethere there is an option to change it. Thanks,
> >
>
> *****************************************************************
> **Brian Bennion, Ph.D. **
> **Computational and Systems Biology Division **
> **Biology and Biotechnology Research Program **
> **Lawrence Livermore National Laboratory **
> **P.O. Box 808, L-448 bennion1_at_llnl.gov **
> **7000 East Avenue phone: (925) 422-5722 **
> **Livermore, CA 94550 fax: (925) 424-6605 **
> *****************************************************************
>

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:38:27 CST