在模拟完成后经常因为分子超出边界而导致分子不完整,那么gmx trjconv可以保持分子的完整性。
gmx trjconv也可以将模拟补数设置为ns,fs,ms等时间单位,方便观察。运行gmx trjconv -h可以查看相关设置。
用法:gmx trjconv -f product.xtc -o pbc-ns.xtc -tu ns -pbc whole
上面将我模拟后的轨迹用ns表示,并且保持分子的完整性,输出为pbc-ns.xtc。
这个命令还有很多设置,常用的是是pbc和tu参数。下面是运行帮助的结果,可以看出有很多功能。
Options to specify input and output files:
-f [<.xtc/.trr/...>] (traj.xtc) (Input)
Trajectory: xtc trr cpt trj gro g96 pdb tng
-o [<.xtc/.trr/...>] (trajout.xtc) (Output)
Trajectory: xtc trr trj gro g96 pdb tng
-s [<.tpr/.tpb/...>] (topol.tpr) (Input, Opt.)
Structure+mass(db): tpr tpb tpa gro g96 pdb brk ent
-n [<.ndx>] (index.ndx) (Input, Opt.) Index file
-fr [<.ndx>] (frames.ndx) (Input, Opt.) Index file
-sub [<.ndx>] (cluster.ndx) (Input, Opt.) Index file
-drop [<.xvg>] (drop.xvg) (Input, Opt.) xvgr/xmgr file
Other options:
-nice <int> (19) Set the nicelevel
-b <time> (0) First frame (ps) to read from trajectory
-e <time> (0) Last frame (ps) to read from trajectory
-tu <enum> (ps) Time unit: fs, ps, ns, us, ms, s
-[no]w (no) View output .xvg, .xpm, .eps and .pdb files
-xvg <enum> (xmgrace) xvg plot formatting: xmgrace, xmgr, none
-skip <int> (1) Only write every nr-th frame
-dt <time> (0) Only write frame when t MOD dt = first time (ps)
-[no]round (no) Round measurements to nearest picosecond
-dump <time> (-1) Dump frame nearest specified time (ps)
-t0 <time> (0) Starting time (ps) (default: don't change)
-timestep <time> (0) Change time step between input frames (ps)
-pbc <enum> (none)
PBC treatment (see help text for full description): none, mol, res, atom,
nojump, cluster, whole
-ur <enum> (rect) Unit-cell representation: rect, tric, compact
-[no]center (no) Center atoms in box
-boxcenter <enum> (tric) Center for -pbc and -center: tric, rect, zero
-box <vector> (0 0 0) Size for new cubic box (default: read from input)
-trans <vector> (0 0 0)
All coordinates will be translated by trans. This can advantageously be
combined with -pbc mol -ur compact.
-shift <vector> (0 0 0) All coordinates will be shifted by framenr*shift
-fit <enum> (none)
Fit molecule to ref structure in the structure file: none, rot+trans,
rotxy+transxy, translation, transxy, progressive
-ndec <int> (3)
Precision for .xtc and .gro writing in number of decimal places
-[no]vel (yes) Read and write velocities if possible
-[no]force (no) Read and write forces if possible
-trunc <time> (-1)
Truncate input trajectory file after this time (ps)
-exec <string>
Execute command for every output frame with the frame number as argument
-split <time> (0)
Start writing new file when t MOD split = first time (ps)
-[no]sep (no)
Write each frame to a separate .gro, .g96 or .pdb file
-nzero <int> (0)
If the -sep flag is set, use these many digits for the file numbers and
prepend zeros as needed
-dropunder <real> (0) Drop all frames below this value
-dropover <real> (0) Drop all frames above this value
-[no]conect (no)
Add conect records when writing .pdb files. Useful for visualization of
non-standard molecules, e.g. coarse grained ones