Tpbconv

来自KlniuWiki
跳转到: 导航, 搜索

目录

1 介绍

tpbconv can edit run input files in four ways.

1st. by modifying the number of steps in a run input file with options -extend, -until or -nsteps (nsteps=-1 means unlimited number of steps).

2nd. (OBSOLETE) by creating a run input file for a continuation run when your simulation has crashed due to e.g. a full disk, or by making a continuation run input file. This option is obsolete, since mdrun now writes and reads checkpoint files. Note that a frame with coordinates and velocities is needed. When pressure and/or Nose-Hoover temperature coupling is used an energy file can be supplied to get an exact continuation of the original run.

3rd. by creating a tpx file for a subset of your original tpx file, which is useful when you want to remove the solvent from your tpx file, or when you want to make e.g. a pure Ca tpx file. WARNING: this tpx file is not fully functional.

4th. by setting the charges of a specified group to zero. This is useful when doing free energy estimates using the LIE (Linear Interaction Energy) method.

2 文件

option filename type description
-s topol.tpr Input Run input file: tpr tpb tpa
-f traj.trr Input, Opt. Full precision trajectory: trr trj cpt
-e ener.edr Input, Opt. Energy file
-n index.ndx Input, Opt. Index file
-o tpxout.tpr Output Run input file: tpr tpb tpa

3 其他选项

option type default description
-[no]h gmx_bool no Print help info and quit
-[no]version gmx_bool no Print version info and quit
-nice int 0 Set the nicelevel
-extend real 0 Extend runtime by this amount (ps)
-until real 0 Extend runtime until this ending time (ps)
-nsteps int 0 Change the number of steps
-time real -1 Continue from frame at this time (ps) instead of the last frame
-[no]zeroq gmx_bool no Set the charges of a group (from the index) to zero
-[no]vel gmx_bool yes Require velocities from trajectory
-[no]cont gmx_bool yes For exact continuation, the constraints should not be applied before the first step

4 用法

使用tpbconv重启gromacs模拟在使用gromacs的mdrun进行模拟计算过程中,很多因素可以是模拟计算终止。比如突然断电,断网或者磁盘空间满,或者windows死机(^_^)等等。重启gromacs模拟计算是一件十分方便的事情,因为gromacs众多的程序里面就有一个专门(或者吧)用来修改tpr文件的,就是tpbconv。

gromacs把模拟需要的所以文件都打包成一个tpr二进制文件,里面包含了分子坐标,各个原子在给定温度下速度和能量的分布。当模拟突然终止时,只要将终止时候系统的状态,即各个原子的位置、速度、坐标等装入tpr文件即可。

制作一个重启tpr文件的参数和格式一般如下:

tpbconv -s topol.tpr -f traj.trr -e ener.edr -o newtopol.tpr

其中topol.tpr为原来的tpr文件,traj.trr为双精度坐标文件(不要用xtc文件,因为精度不够),ener.edr为系统能量输出文件,newtopol.tpr是重启模拟文件。以上的命令得到的是在计算突然终止前一个系统构象的信息。也可以在命令中加上一个"-time "参数来指定从那一个时间重新开始,如一下指定从一纳秒处重新开始模拟:

tpbconv -s topol.tpr -f traj.trr -e ener.edr -time 1000 -o newtopol.tpr

同时,如果模拟正常结束,而模拟时间让人觉得不够长时,可以使用tpbconv写一个延长模拟的tpr文件,一般格式如下:

tpbconv -s topol.tpr -f traj.trr -e ener.edr -extend 1000 -o newtopol.tpr

其中"-extend 1000"表示延长1000ps的模拟时间。呵呵,非常好用。 这样断了又开始,就会产生很多轨迹文件,分析的时候非常不方便,gromacs有其他常用的命令把坐标文件,能量文件连接成一个文件,其中比较常用的如trjcat和eneconv,格式分别如下:

trjcat -f traj1.trr traj2.trr.... -o traj_all.trr
eneconv -f ener1.edr ener2.edr... -o ener_all.edr

即使用"-f "读入所有轨迹或者能量文件,使用"-o "输出完整的轨迹和能量文件。

5 已知问题

最后说说一个tpbconv的弱点。tpbconv不能更改你原来tpr文件中并行计算的节点数,比如你原来的tpr文件是8个节点的,那么使用tpbconv得到的重启tpr文件也是8个节点的。如果想更改使用节点数,那只能用grompp重新做一个了。但是使用grompp做重启模拟文件时,就算你指定了原来的轨迹文件和能量文件,它还是会根据麦克斯韦分布重新给各个原子指定速度。

6 参考文献

个人工具
分类
化学
[×] 國學
学佛
[×] 数学
物理
生活
[×] 英语
读书
辞典
廣告