Merge branch 'master' of git://git.gromacs.org/gromacs
[gromacs/adressmacs.git] / share / html / online / trjconv.html
blobc1cb1b9f252e4290ad7a2e711097ca22ea2db4e2
1 <HTML>
2 <HEAD>
3 <TITLE>trjconv</TITLE>
4 <LINK rel=stylesheet href="style.css" type="text/css">
5 <BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990000" alink="#FF0000">
6 <TABLE WIDTH="98%" NOBORDER >
7 <TR><TD WIDTH=400>
8 <TABLE WIDTH=400 NOBORDER>
9 <TD WIDTH=116>
10 <a href="http://www.gromacs.org/"><img SRC="../images/gmxlogo_small.png"BORDER=0 </a></td>
11 <td ALIGN=LEFT VALIGN=TOP WIDTH=280><br><h2>trjconv</h2><font size=-1><A HREF="../online.html">Main Table of Contents</A></font><br><br></td>
12 </TABLE></TD><TD WIDTH="*" ALIGN=RIGHT VALIGN=BOTTOM><p><B>VERSION 4.5<br>
13 Thu 26 Aug 2010</B></td></tr></TABLE>
14 <HR>
15 <H3>Description</H3>
16 <p>
17 trjconv can convert trajectory files in many ways:<br>
18 <b>1.</b> from one format to another<br>
19 <b>2.</b> select a subset of atoms<br>
20 <b>3.</b> change the periodicity representation<br>
21 <b>4.</b> keep multimeric molecules together<br>
22 <b>5.</b> center atoms in the box<br>
23 <b>6.</b> fit atoms to reference structure<br>
24 <b>7.</b> reduce the number of frames<br>
25 <b>8.</b> change the timestamps of the frames
26 (<tt>-t0</tt> and <tt>-timestep</tt>)<br>
27 <b>9.</b> cut the trajectory in small subtrajectories according
28 to information in an index file. This allows subsequent analysis of
29 the subtrajectories that could, for example be the result of a
30 cluster analysis. Use option <tt>-sub</tt>.
31 This assumes that the entries in the index file are frame numbers and
32 dumps each group in the index file to a separate trajectory file.<br>
33 <b>10.</b> select frames within a certain range of a quantity given
34 in an <tt>.<a href="xvg.html">xvg</a></tt> file.<p>
35 The program <tt><a href="trjcat.html">trjcat</a></tt> can concatenate multiple trajectory files.
36 <p>
37 Currently seven formats are supported for input and output:
38 <tt>.<a href="xtc.html">xtc</a></tt>, <tt>.<a href="trr.html">trr</a></tt>, <tt>.<a href="trj.html">trj</a></tt>, <tt>.<a href="gro.html">gro</a></tt>, <tt>.<a href="g96.html">g96</a></tt>,
39 <tt>.<a href="pdb.html">pdb</a></tt> and <tt>.<a href="g87.html">g87</a></tt>.
40 The file formats are detected from the file extension.
41 The precision of <tt>.<a href="xtc.html">xtc</a></tt> and <tt>.<a href="gro.html">gro</a></tt> output is taken from the
42 input file for <tt>.<a href="xtc.html">xtc</a></tt>, <tt>.<a href="gro.html">gro</a></tt> and <tt>.<a href="pdb.html">pdb</a></tt>,
43 and from the <tt>-ndec</tt> option for other input formats. The precision
44 is always taken from <tt>-ndec</tt>, when this option is set.
45 All other formats have fixed precision. <tt>.<a href="trr.html">trr</a></tt> and <tt>.<a href="trj.html">trj</a></tt>
46 output can be single or double precision, depending on the precision
47 of the trjconv binary.
48 Note that velocities are only supported in
49 <tt>.<a href="trr.html">trr</a></tt>, <tt>.<a href="trj.html">trj</a></tt>, <tt>.<a href="gro.html">gro</a></tt> and <tt>.<a href="g96.html">g96</a></tt> files.<p>
50 Option <tt>-app</tt> can be used to
51 append output to an existing trajectory file.
52 No checks are performed to ensure integrity
53 of the resulting combined trajectory file.<p>
54 Option <tt>-sep</tt> can be used to write every frame to a separate
55 .<a href="gro.html">gro</a>, .<a href="g96.html">g96</a> or .<a href="pdb.html">pdb</a> file, default all frames all written to one file.
56 <tt>.<a href="pdb.html">pdb</a></tt> files with all frames concatenated can be viewed with
57 <tt>rasmol -nmrpdb</tt>.<p>
58 It is possible to select part of your trajectory and write it out
59 to a new trajectory file in order to save disk space, e.g. for leaving
60 out the water from a trajectory of a protein in water.
61 <b>ALWAYS</b> put the original trajectory on tape!
62 We recommend to use the portable <tt>.<a href="xtc.html">xtc</a></tt> format for your analysis
63 to save disk space and to have portable files.<p>
64 There are two options for fitting the trajectory to a reference
65 either for essential dynamics analysis or for whatever.
66 The first option is just plain fitting to a reference structure
67 in the structure file, the second option is a progressive fit
68 in which the first timeframe is fitted to the reference structure
69 in the structure file to obtain and each subsequent timeframe is
70 fitted to the previously fitted structure. This way a continuous
71 trajectory is generated, which might not be the case when using the
72 regular fit method, e.g. when your protein undergoes large
73 conformational transitions.<p>
74 Option <tt>-pbc</tt> sets the type of periodic boundary condition
75 treatment:<br>
76 * <tt>mol</tt> puts the center of mass of molecules in the box.<br>
77 * <tt>res</tt> puts the center of mass of residues in the box.<br>
78 * <tt>atom</tt> puts all the atoms in the box.<br>
79 * <tt>nojump</tt> checks if atoms jump across the box and then puts
80 them back. This has the effect that all molecules
81 will remain whole (provided they were whole in the initial
82 conformation), note that this ensures a continuous trajectory but
83 molecules may diffuse out of the box. The starting configuration
84 for this procedure is taken from the structure file, if one is
85 supplied, otherwise it is the first frame.<br>
86 * <tt>cluster</tt> clusters all the atoms in the selected index
87 such that they are all closest to the center of mass of the cluster
88 which is iteratively updated. Note that this will only give meaningful
89 results if you in fact have a cluster. Luckily that can be checked
90 afterwards using a trajectory viewer. Note also that if your molecules
91 are broken this will not work either.<br>
92 * <tt>whole</tt> only makes broken molecules whole.<p>
93 Option <tt>-ur</tt> sets the unit cell representation for options
94 <tt>mol</tt>, <tt>res</tt> and <tt>atom</tt> of <tt>-pbc</tt>.
95 All three options give different results for triclinic boxes and
96 identical results for rectangular boxes.
97 <tt>rect</tt> is the ordinary brick shape.
98 <tt>tric</tt> is the triclinic unit cell.
99 <tt>compact</tt> puts all atoms at the closest distance from the center
100 of the box. This can be useful for visualizing e.g. truncated
101 octahedrons. The center for options <tt>tric</tt> and <tt>compact</tt>
102 is <tt>tric</tt> (see below), unless the option <tt>-boxcenter</tt>
103 is set differently.<p>
104 Option <tt>-center</tt> centers the system in the box. The user can
105 select the group which is used to determine the geometrical center.
106 Option <tt>-boxcenter</tt> sets the location of the center of the box
107 for options <tt>-pbc</tt> and <tt>-center</tt>. The center options are:
108 <tt>tric</tt>: half of the sum of the box vectors,
109 <tt>rect</tt>: half of the box diagonal,
110 <tt>zero</tt>: zero.
111 Use option <tt>-pbc mol</tt> in addition to <tt>-center</tt> when you
112 want all molecules in the box after the centering.<p>
113 With <tt>-dt</tt> it is possible to reduce the number of
114 frames in the output. This option relies on the accuracy of the times
115 in your input trajectory, so if these are inaccurate use the
116 <tt>-timestep</tt> option to modify the time (this can be done
117 simultaneously). For making smooth movies the program <tt><a href="g_filter.html">g_filter</a></tt>
118 can reduce the number of frames while using low-pass frequency
119 filtering, this reduces aliasing of high frequency motions.<p>
120 Using <tt>-trunc</tt> trjconv can truncate <tt>.<a href="trj.html">trj</a></tt> in place, i.e.
121 without copying the file. This is useful when a run has crashed
122 during disk I/O (one more disk full), or when two contiguous
123 trajectories must be concatenated without have double frames.<p>
124 <tt><a href="trjcat.html">trjcat</a></tt> is more suitable for concatenating trajectory files.<p>
125 Option <tt>-dump</tt> can be used to extract a frame at or near
126 one specific time from your trajectory.<p>
127 Option <tt>-drop</tt> reads an <tt>.<a href="xvg.html">xvg</a></tt> file with times and values.
128 When options <tt>-dropunder</tt> and/or <tt>-dropover</tt> are set,
129 frames with a value below and above the value of the respective options
130 will not be written.
132 <H3>Files</H3>
133 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
134 <TR><TH>option</TH><TH>filename</TH><TH>type</TH><TH>description</TH></TR>
135 <TR><TD ALIGN=RIGHT> <b><tt>-f</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html"> traj.xtc</a></tt> </TD><TD> Input </TD><TD> Trajectory: <a href="xtc.html">xtc</a> <a href="trr.html">trr</a> <a href="trj.html">trj</a> <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> cpt </TD></TR>
136 <TR><TD ALIGN=RIGHT> <b><tt>-o</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html"> trajout.xtc</a></tt> </TD><TD> Output </TD><TD> Trajectory: <a href="xtc.html">xtc</a> <a href="trr.html">trr</a> <a href="trj.html">trj</a> <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> </TD></TR>
137 <TR><TD ALIGN=RIGHT> <b><tt>-s</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html"> topol.tpr</a></tt> </TD><TD> Input, Opt. </TD><TD> Structure+mass(db): <a href="tpr.html">tpr</a> <a href="tpb.html">tpb</a> <a href="tpa.html">tpa</a> <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> </TD></TR>
138 <TR><TD ALIGN=RIGHT> <b><tt>-n</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="ndx.html"> index.ndx</a></tt> </TD><TD> Input, Opt. </TD><TD> Index file </TD></TR>
139 <TR><TD ALIGN=RIGHT> <b><tt>-fr</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="ndx.html"> frames.ndx</a></tt> </TD><TD> Input, Opt. </TD><TD> Index file </TD></TR>
140 <TR><TD ALIGN=RIGHT> <b><tt>-sub</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="ndx.html"> cluster.ndx</a></tt> </TD><TD> Input, Opt. </TD><TD> Index file </TD></TR>
141 <TR><TD ALIGN=RIGHT> <b><tt>-drop</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> drop.xvg</a></tt> </TD><TD> Input, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
142 </TABLE>
144 <H3>Other options</H3>
145 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
146 <TR><TH>option</TH><TH>type</TH><TH>default</TH><TH>description</TH></TR>
147 <TR><TD ALIGN=RIGHT> <b><tt>-[no]h</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print help info and quit </TD></TD>
148 <TR><TD ALIGN=RIGHT> <b><tt>-[no]version</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print version info and quit </TD></TD>
149 <TR><TD ALIGN=RIGHT> <b><tt>-nice</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>19</tt> </TD><TD> Set the nicelevel </TD></TD>
150 <TR><TD ALIGN=RIGHT> <b><tt>-b</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> First frame (ps) to read from trajectory </TD></TD>
151 <TR><TD ALIGN=RIGHT> <b><tt>-e</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Last frame (ps) to read from trajectory </TD></TD>
152 <TR><TD ALIGN=RIGHT> <b><tt>-tu</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>ps</tt> </TD><TD> Time unit: <tt>fs</tt>, <tt>ps</tt>, <tt>ns</tt>, <tt>us</tt>, <tt>ms</tt> or <tt>s</tt> </TD></TD>
153 <TR><TD ALIGN=RIGHT> <b><tt>-[no]w</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> View output <a href="xvg.html">xvg</a>, <a href="xpm.html">xpm</a>, <a href="eps.html">eps</a> and <a href="pdb.html">pdb</a> files </TD></TD>
154 <TR><TD ALIGN=RIGHT> <b><tt>-xvg</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>xmgrace</tt> </TD><TD> <a href="xvg.html">xvg</a> plot formatting: <tt>xmgrace</tt>, <tt>xmgr</tt> or <tt>none</tt> </TD></TD>
155 <TR><TD ALIGN=RIGHT> <b><tt>-skip</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>1</tt> </TD><TD> Only write every nr-th frame </TD></TD>
156 <TR><TD ALIGN=RIGHT> <b><tt>-dt</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Only write frame when t MOD dt = first time (ps) </TD></TD>
157 <TR><TD ALIGN=RIGHT> <b><tt>-[no]round</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Round measurements to nearest picosecond </TD></TD>
158 <TR><TD ALIGN=RIGHT> <b><tt>-dump</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> Dump frame nearest specified time (ps) </TD></TD>
159 <TR><TD ALIGN=RIGHT> <b><tt>-t0</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Starting time (ps) (default: don't change) </TD></TD>
160 <TR><TD ALIGN=RIGHT> <b><tt>-timestep</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Change time step between input frames (ps) </TD></TD>
161 <TR><TD ALIGN=RIGHT> <b><tt>-pbc</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>none</tt> </TD><TD> PBC treatment (see help text for full description): <tt>none</tt>, <tt>mol</tt>, <tt>res</tt>, <tt>atom</tt>, <tt>nojump</tt>, <tt>cluster</tt> or <tt>whole</tt> </TD></TD>
162 <TR><TD ALIGN=RIGHT> <b><tt>-ur</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>rect</tt> </TD><TD> Unit-cell representation: <tt>rect</tt>, <tt>tric</tt> or <tt>compact</tt> </TD></TD>
163 <TR><TD ALIGN=RIGHT> <b><tt>-[no]center</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Center atoms in box </TD></TD>
164 <TR><TD ALIGN=RIGHT> <b><tt>-boxcenter</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>tric</tt> </TD><TD> Center for -pbc and -center: <tt>tric</tt>, <tt>rect</tt> or <tt>zero</tt> </TD></TD>
165 <TR><TD ALIGN=RIGHT> <b><tt>-box</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Size for new cubic box (default: read from input) </TD></TD>
166 <TR><TD ALIGN=RIGHT> <b><tt>-trans</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> All coordinates will be translated by trans. This can advantageously be combined with -pbc mol -ur compact. </TD></TD>
167 <TR><TD ALIGN=RIGHT> <b><tt>-shift</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> All coordinates will be shifted by framenr*shift </TD></TD>
168 <TR><TD ALIGN=RIGHT> <b><tt>-fit</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>none</tt> </TD><TD> Fit molecule to ref structure in the structure file: <tt>none</tt>, <tt>rot+trans</tt>, <tt>rotxy+transxy</tt>, <tt>translation</tt>, <tt>transxy</tt> or <tt>progressive</tt> </TD></TD>
169 <TR><TD ALIGN=RIGHT> <b><tt>-ndec</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>3</tt> </TD><TD> Precision for .<a href="xtc.html">xtc</a> and .<a href="gro.html">gro</a> writing in number of decimal places </TD></TD>
170 <TR><TD ALIGN=RIGHT> <b><tt>-[no]vel</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Read and write velocities if possible </TD></TD>
171 <TR><TD ALIGN=RIGHT> <b><tt>-[no]force</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Read and write forces if possible </TD></TD>
172 <TR><TD ALIGN=RIGHT> <b><tt>-trunc</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> Truncate input <a href="trj.html">trj</a> file after this time (ps) </TD></TD>
173 <TR><TD ALIGN=RIGHT> <b><tt>-exec</tt></b> </TD><TD ALIGN=RIGHT> string </TD><TD ALIGN=RIGHT> <tt></tt> </TD><TD> Execute command for every output frame with the frame number as argument </TD></TD>
174 <TR><TD ALIGN=RIGHT> <b><tt>-[no]app</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Append output </TD></TD>
175 <TR><TD ALIGN=RIGHT> <b><tt>-split</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Start writing new file when t MOD split = first time (ps) </TD></TD>
176 <TR><TD ALIGN=RIGHT> <b><tt>-[no]sep</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Write each frame to a separate .<a href="gro.html">gro</a>, .<a href="g96.html">g96</a> or .<a href="pdb.html">pdb</a> file </TD></TD>
177 <TR><TD ALIGN=RIGHT> <b><tt>-nzero</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Prepend file number in case you use the -sep flag with this number of zeroes </TD></TD>
178 <TR><TD ALIGN=RIGHT> <b><tt>-dropunder</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Drop all frames below this value </TD></TD>
179 <TR><TD ALIGN=RIGHT> <b><tt>-dropover</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Drop all frames above this value </TD></TD>
180 <TR><TD ALIGN=RIGHT> <b><tt>-[no]conect</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Add conect records when writing <a href="pdb.html">pdb</a> files. Useful for visualization of non-standard molecules, e.g. coarse grained ones </TD></TD>
181 </TABLE>
183 <hr>
184 <div ALIGN=RIGHT>
185 <font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
186 <font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
187 </div>
188 </BODY>