|||
gmx mdrun -deffnm md_1 -cpi md_1.cpt -maxh 24 -append
经测试,如此续跑是在md_1.cpt 的基础上延长MD,输出文件在原来的输出文件上继续写,比如log文件和xtc文件。
非常适用于模拟非正常结束和集群有运行时间限制的情况!
http://www.gromacs.org/Documentation/How-tos/Extending_Simulations
It is possible to extend or continue a simulation that has completed, and even those that have crashed (see Doing Restarts). This is actually good technique for the handling of longer simulations to reduce time lost due to crashes of the computer(s) being utilised. It is only possible to continue seamlessly from a checkpoint file, or the point at which the last full precision coordinates and velocities are available for the system. Even though some coordinate file formats can contain velocities (e.g. .gro format) these are not precise enough for an exact restart. Therefore, you have to ensure that full-precision data is written at sufficiently short lengths of time (several times per day?) to avoid loss of too much time due to crashes. How to achieve this varies with the version of GROMACS you are using.
A simulation that has terminated, but not completed (e.g. because of queue limits, power failure or the use of the -maxh option of mdrun) can be continued without needing to use tpbconv (which is now called gmx convert-tpr as of version 5.0). You may or may not wish to use -append in your mdrun command in this case. Otherwise, a simulation that has completed can be extended using tpbconv, mdrun and checkpoint files (.cpt). First, the number of steps or time has to be changed in the .tpr file, then the simulation is continued from the last checkpoint with mdrun. This will produce a simulation that will be the "same" as if a continuous run was made (but see reproducibility for more discussion).
tpbconv -s previous.tpr -extend timetoextendby -o next.tpr
mdrun -s next.tpr -cpi previous.cpt
You might want to use the -append option of mdrun to append the new output to the old files. Note that this will only work when the old output files have not been modified by the user. Appending is the default behavior as of version 4.5.
If you would like to change the default filenames while running a lengthy simulation in manageable parts, then cyclically running commands such as the following will work: (with suitable values for name and time)
mdrun -deffnm ${name} -cpi ${name} -append
tpbconv -s ${name} -o ${name}_new.tpr -extend ${time}
mv ${name}_new.tpr ${name}.tpr
When running in a queuing system, it is useful to set the number of steps you want for the total simulation with grompp or tpbconv and use the -maxh option of mdrun to gracefully stop the simulation before the queue time ends. With this procedure you can simply continue by letting mdrun read checkpoint files and no other tools are required. However, if your queueing system permits job suspension, the -maxh mechanism will be unaware of the time spent suspended, and you may simulate for less wall time than you would expect.
The time can also be extended using the -until and -nsteps options with tpbconv.
A simulation can be continued without the checkpoint file, which will be non-binary identical and will have small errors that, for most situations, are negligible. The reason for the errors is that the trajectory and energy files do not store all the state variables of the thermostats and barostats. If this is the case, you must make use of the version 3.3.3 procedure below.
If you wish/need to change .mdp file options, then either
grompp -f new.mdp -c old.tpr -o new.tpr -t old.cpt mdrun -s new.tpr
or
grompp -f new.mdp -c old.tpr -o new.tpr mdrun -s new.tpr -cpi old.cpt
should work. The former is necessary under GROMACS 4.x if the thermodynamic ensemble has changed. (Someone said "If your old.cpt
is for a run that has finished, then use tpbconv -extend
after grompp and before mdrun." but mabraham disagrees. A run finishing is judged by the contents of the .cpt in the context of the .tpr. So, if the latter is changed, then the run isn't finished.)
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-22 12:53
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社