10
18

More than 5 years have passed since last update.

Gromacs コマンド

Last updated at Posted at 2016-11-08

延長して走らせたいとき(リスタート)

次のrunのtprファイルを、前のrunのtprファイルから作る。

tpbconv_mpi_d -s md1.tpr -f md1.cpt -o md2.tpr -until 100000

-until 100000:以前のrunからの合計が100000ps(100ns)になるように設定する。
-extend 100000:以前のrunから100ns延長する。
-r:前のrunのチェックポイントファイルを指定。

途中で終了したrunの再開

mdrun -deffnm md1 -cpi md1_prev.cpt

md1_prev.cpt(チェックポイントファイル)は、MD計算の一定間隔で状態を記録・updateしている。したがって,リスターとすると,このチェックポイントファイルの状態からスタートする。
gmxcheck -f md1_prev.cptで,どのstepか確認できる。

周期境界から出た分子の修正

trjconv -f ../md1.trr -s ../md1.tpr -o zzz.xtc -pbc nojump -center

-pbc nojump:初期状態から周期境界をどの分子もjumpしない。
-center:特定のグループでcenteringする。

xtcファイルを指定することで,軽量なtrajectoryファイルをつくることができる。
小数点以下3桁の座標情報を解析する程度であれば,このファイルでも問題ない。

複雑な系の修正

複合体のMDをやっていると分子間の距離が離れているために,一度にうまく修正できない場合がある。
そのようなときは,以下のように3段階でやるとよい。

  1. -pbc nojumpをかます
  2. -centerで注目したい分子をcenteringする
  3. -ur rectで周期境界のboxに戻す。-pbc molで水分子等の修正。
trjconv_d -f yourmd.xtc -s yourmd.tpr -pbc nojump -o yourmd_nojump.xtc 
trjconv_d -f yourmd_nojump.xtc -s yourmd.tpr -center -o yourmd_nojump_center.xtc 
trjconv_d -f yourmd_nojump_center.xtc -s yourmd.tpr -pbc mol -ur rect -o yourmd_nojump_center_rect.xtc 

tprファイルからgroファイルへの変換

editconf -f MD3.tpr -o MD3_ini_0.gro

pdbファイルへの変換

trjconv -f MD3.trr -s form3.pdb -skip 100 -o MD3_100fm_0.pdb -center -pbc whole

-sオプションにtemplateとなるpdbファイルを指定すると,そのファイル内のchain ID等を反映してくれる。したがって,pymol等の分子ビューアに優しい,pdb形式のtrajectoryファイルが作成できる。

mdrunするときにstep数を指定

mdrun -deffnm md1.tpr -nsteps 1000

速度テストしたいから、強制的に1000stepで修了したいとき。

トラジェクトリファイルの結合

trjcat -f non_helix.trr non_helix2.trr -o non_helix_cat.trr -settime

-settime:それぞれのファイルのスタート時間をinteractiveに決める。

回転半径(Radius of gyration)の計算

g_gyrate -s non_helix2.tpr -f non_helix2.trr -o non_helix2_gyr.xvg

interactiveに対象のグループを選択できる。

2原子間の距離(2グループの重心間距離)を測定

g_dist -f non_helix2.trr -n endtoend.ndx -s non_helix2.tpr

ndxファイルには別々のグループに記述する必要がある。

インデックスファイルの作成

make_ndx -f non_helix2.tpr -o endtoend.ndx

DSSP:2次構造の計算

do_dssp -s MD3_ini_0.gro -f MD3_100fm_0.xtc -tu ns
xpm2ps -f ss.xpm
xmgrace -nxy scount.xvg

xpm2psでxpmファイルをepsファイルに変換できる。

2つのグループ間の最近接距離を出す(mindist.xvg)

echo 28 29 |g_mindist -f $trj_fn -s $tpr_fn -n $ndx_fn -on -d 1.3 -group 

-on:コンタクト数を出す(numcont.xvg)。
-d:1.3で1.3 nm以内にあるものをコンタクトとみなす。
-group:グループ2の原子がグループ1の原子と複数のコンタクトしている原子がある場合は、1コンタクトとしてカウントする。

make positional restraint

genrestr -f conf.gro -o posre.itp

make a tpr file from a gro file

trjconv -f scion_no23_md2_ini_dna.gro -s scion_no23_md2_ini_dna.gro -o scion_no23_md2_ini_dna.pdb
pdb2gmx -f scion_no23_md2_ini_dna.pdb -p scion_no23_md2_ini_dna -ff amber99sb -water tip3p -merge all -ignh
grompp -f IONS.mdp -c scion_no23_md2_ini_dna.gro -p scion_no23_md2_ini_dna.top -o dna.tpr

_prev.cptと.cptファイルについて

http://comments.gmane.org/gmane.science.biology.gromacs.user/58103
http://www.gromacs.org/Documentation/How-tos/Doing_Restarts#Version_4.x
Note that mdrun will write state.cpt and state_prev.cpt files. As you can see from their time stamps, one was written approximately at the checkpoint interval before the other (15 mins by default). Or you can use gmxcheck to see what is in them.

10
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
18