Release 4.5.6
[alexxy/gromacs.git] / man / man1 / trjconv.1
1 .TH trjconv 1 "Fri 18 Jan 2013" "" "GROMACS suite, VERSION 4.5.6"
2 .SH NAME
3 trjconv - converts and manipulates trajectory files
4
5 .B VERSION 4.5.6
6 .SH SYNOPSIS
7 \f3trjconv\fP
8 .BI "\-f" " traj.xtc "
9 .BI "\-o" " trajout.xtc "
10 .BI "\-s" " topol.tpr "
11 .BI "\-n" " index.ndx "
12 .BI "\-fr" " frames.ndx "
13 .BI "\-sub" " cluster.ndx "
14 .BI "\-drop" " drop.xvg "
15 .BI "\-[no]h" ""
16 .BI "\-[no]version" ""
17 .BI "\-nice" " int "
18 .BI "\-b" " time "
19 .BI "\-e" " time "
20 .BI "\-tu" " enum "
21 .BI "\-[no]w" ""
22 .BI "\-xvg" " enum "
23 .BI "\-skip" " int "
24 .BI "\-dt" " time "
25 .BI "\-[no]round" ""
26 .BI "\-dump" " time "
27 .BI "\-t0" " time "
28 .BI "\-timestep" " time "
29 .BI "\-pbc" " enum "
30 .BI "\-ur" " enum "
31 .BI "\-[no]center" ""
32 .BI "\-boxcenter" " enum "
33 .BI "\-box" " vector "
34 .BI "\-clustercenter" " vector "
35 .BI "\-trans" " vector "
36 .BI "\-shift" " vector "
37 .BI "\-fit" " enum "
38 .BI "\-ndec" " int "
39 .BI "\-[no]vel" ""
40 .BI "\-[no]force" ""
41 .BI "\-trunc" " time "
42 .BI "\-exec" " string "
43 .BI "\-[no]app" ""
44 .BI "\-split" " time "
45 .BI "\-[no]sep" ""
46 .BI "\-nzero" " int "
47 .BI "\-dropunder" " real "
48 .BI "\-dropover" " real "
49 .BI "\-[no]conect" ""
50 .SH DESCRIPTION
51 \&\fB trjconv\fR can convert trajectory files in many ways:
52
53 \&\fB 1.\fR from one format to another
54
55 \&\fB 2.\fR select a subset of atoms
56
57 \&\fB 3.\fR change the periodicity representation
58
59 \&\fB 4.\fR keep multimeric molecules together
60
61 \&\fB 5.\fR center atoms in the box
62
63 \&\fB 6.\fR fit atoms to reference structure
64
65 \&\fB 7.\fR reduce the number of frames
66
67 \&\fB 8.\fR change the timestamps of the frames 
68 \&(\fB \-t0\fR and \fB \-timestep\fR)
69
70 \&\fB 9.\fR cut the trajectory in small subtrajectories according
71 \&to information in an index file. This allows subsequent analysis of
72 \&the subtrajectories that could, for example, be the result of a
73 \&cluster analysis. Use option \fB \-sub\fR.
74 \&This assumes that the entries in the index file are frame numbers and
75 \&dumps each group in the index file to a separate trajectory file.
76
77 \&\fB 10.\fR select frames within a certain range of a quantity given
78 \&in an \fB .xvg\fR file.
79
80
81 \&The program \fB trjcat\fR is better suited for concatenating multiple trajectory files.
82 \&
83
84
85 \&Currently seven formats are supported for input and output:
86 \&\fB .xtc\fR, \fB .trr\fR, \fB .trj\fR, \fB .gro\fR, \fB .g96\fR,
87 \&\fB .pdb\fR and \fB .g87\fR.
88 \&The file formats are detected from the file extension.
89 \&The precision of \fB .xtc\fR and \fB .gro\fR output is taken from the
90 \&input file for \fB .xtc\fR, \fB .gro\fR and \fB .pdb\fR,
91 \&and from the \fB \-ndec\fR option for other input formats. The precision
92 \&is always taken from \fB \-ndec\fR, when this option is set.
93 \&All other formats have fixed precision. \fB .trr\fR and \fB .trj\fR
94 \&output can be single or double precision, depending on the precision
95 \&of the \fB trjconv\fR binary.
96 \&Note that velocities are only supported in
97 \&\fB .trr\fR, \fB .trj\fR, \fB .gro\fR and \fB .g96\fR files.
98
99
100 \&Option \fB \-app\fR can be used to
101 \&append output to an existing trajectory file.
102 \&No checks are performed to ensure integrity
103 \&of the resulting combined trajectory file.
104
105
106 \&Option \fB \-sep\fR can be used to write every frame to a separate
107 \&\fB .gro, .g96\fR or \fB .pdb\fR file. By default, all frames all written to one file.
108 \&\fB .pdb\fR files with all frames concatenated can be viewed with
109 \&\fB rasmol \-nmrpdb\fR.
110
111
112 \&It is possible to select part of your trajectory and write it out
113 \&to a new trajectory file in order to save disk space, e.g. for leaving
114 \&out the water from a trajectory of a protein in water.
115 \&\fB ALWAYS\fR put the original trajectory on tape!
116 \&We recommend to use the portable \fB .xtc\fR format for your analysis
117 \&to save disk space and to have portable files.
118
119
120 \&There are two options for fitting the trajectory to a reference
121 \&either for essential dynamics analysis, etc.
122 \&The first option is just plain fitting to a reference structure
123 \&in the structure file. The second option is a progressive fit
124 \&in which the first timeframe is fitted to the reference structure 
125 \&in the structure file to obtain and each subsequent timeframe is 
126 \&fitted to the previously fitted structure. This way a continuous
127 \&trajectory is generated, which might not be the case when using the
128 \&regular fit method, e.g. when your protein undergoes large
129 \&conformational transitions.
130
131
132 \&Option \fB \-pbc\fR sets the type of periodic boundary condition
133 \&treatment:
134
135 \&\fB * mol\fR puts the center of mass of molecules in the box,
136 \&and requires a run input file to be supplied with \fB \-s\fR.
137
138 \&\fB * res\fR puts the center of mass of residues in the box.
139
140 \&\fB * atom\fR puts all the atoms in the box.
141
142 \&\fB * nojump\fR checks if atoms jump across the box and then puts
143 \&them back. This has the effect that all molecules
144 \&will remain whole (provided they were whole in the initial
145 \&conformation). \fB Note\fR that this ensures a continuous trajectory but
146 \&molecules may diffuse out of the box. The starting configuration
147 \&for this procedure is taken from the structure file, if one is
148 \&supplied, otherwise it is the first frame.
149
150 \&\fB * cluster\fR clusters all the atoms in the selected index
151 \&such that they are all closest to the center of mass of the cluster,
152 \&which is iteratively updated. \fB Note\fR that this will only give meaningful
153 \&results if you in fact have a cluster. Luckily that can be checked
154 \&afterwards using a trajectory viewer. Note also that if your molecules
155 \&are broken this will not work either.
156
157 \&The separate option \fB \-clustercenter\fR can be used to specify an
158 \&approximate center for the cluster. This is useful e.g. if you have
159 \&two big vesicles, and you want to maintain their relative positions.
160
161 \&\fB * whole\fR only makes broken molecules whole.
162
163
164 \&Option \fB \-ur\fR sets the unit cell representation for options
165 \&\fB mol\fR, \fB res\fR and \fB atom\fR of \fB \-pbc\fR.
166 \&All three options give different results for triclinic boxes and
167 \&identical results for rectangular boxes.
168 \&\fB rect\fR is the ordinary brick shape.
169 \&\fB tric\fR is the triclinic unit cell.
170 \&\fB compact\fR puts all atoms at the closest distance from the center
171 \&of the box. This can be useful for visualizing e.g. truncated octahedra
172 \&or rhombic dodecahedra. The center for options \fB tric\fR and \fB compact\fR
173 \&is \fB tric\fR (see below), unless the option \fB \-boxcenter\fR
174 \&is set differently.
175
176
177 \&Option \fB \-center\fR centers the system in the box. The user can
178 \&select the group which is used to determine the geometrical center.
179 \&Option \fB \-boxcenter\fR sets the location of the center of the box
180 \&for options \fB \-pbc\fR and \fB \-center\fR. The center options are:
181 \&\fB tric\fR: half of the sum of the box vectors,
182 \&\fB rect\fR: half of the box diagonal,
183 \&\fB zero\fR: zero.
184 \&Use option \fB \-pbc mol\fR in addition to \fB \-center\fR when you
185 \&want all molecules in the box after the centering.
186
187
188 \&It is not always possible to use combinations of \fB \-pbc\fR,
189 \&\fB \-fit\fR, \fB \-ur\fR and \fB \-center\fR to do exactly what
190 \&you want in one call to \fB trjconv\fR. Consider using multiple
191 \&calls, and check out the GROMACS website for suggestions.
192
193
194 \&With \fB \-dt\fR, it is possible to reduce the number of 
195 \&frames in the output. This option relies on the accuracy of the times
196 \&in your input trajectory, so if these are inaccurate use the
197 \&\fB \-timestep\fR option to modify the time (this can be done
198 \&simultaneously). For making smooth movies, the program \fB g_filter\fR
199 \&can reduce the number of frames while using low\-pass frequency
200 \&filtering, this reduces aliasing of high frequency motions.
201
202
203 \&Using \fB \-trunc\fR \fB trjconv\fR can truncate \fB .trj\fR in place, i.e.
204 \&without copying the file. This is useful when a run has crashed
205 \&during disk I/O (i.e. full disk), or when two contiguous
206 \&trajectories must be concatenated without having double frames.
207
208
209 \&Option \fB \-dump\fR can be used to extract a frame at or near
210 \&one specific time from your trajectory.
211
212
213 \&Option \fB \-drop\fR reads an \fB .xvg\fR file with times and values.
214 \&When options \fB \-dropunder\fR and/or \fB \-dropover\fR are set,
215 \&frames with a value below and above the value of the respective options
216 \&will not be written.
217 .SH FILES
218 .BI "\-f" " traj.xtc" 
219 .B Input
220  Trajectory: xtc trr trj gro g96 pdb cpt 
221
222 .BI "\-o" " trajout.xtc" 
223 .B Output
224  Trajectory: xtc trr trj gro g96 pdb 
225
226 .BI "\-s" " topol.tpr" 
227 .B Input, Opt.
228  Structure+mass(db): tpr tpb tpa gro g96 pdb 
229
230 .BI "\-n" " index.ndx" 
231 .B Input, Opt.
232  Index file 
233
234 .BI "\-fr" " frames.ndx" 
235 .B Input, Opt.
236  Index file 
237
238 .BI "\-sub" " cluster.ndx" 
239 .B Input, Opt.
240  Index file 
241
242 .BI "\-drop" " drop.xvg" 
243 .B Input, Opt.
244  xvgr/xmgr file 
245
246 .SH OTHER OPTIONS
247 .BI "\-[no]h"  "no    "
248  Print help info and quit
249
250 .BI "\-[no]version"  "no    "
251  Print version info and quit
252
253 .BI "\-nice"  " int" " 19" 
254  Set the nicelevel
255
256 .BI "\-b"  " time" " 0     " 
257  First frame (ps) to read from trajectory
258
259 .BI "\-e"  " time" " 0     " 
260  Last frame (ps) to read from trajectory
261
262 .BI "\-tu"  " enum" " ps" 
263  Time unit: \fB fs\fR, \fB ps\fR, \fB ns\fR, \fB us\fR, \fB ms\fR or \fB s\fR
264
265 .BI "\-[no]w"  "no    "
266  View output \fB .xvg\fR, \fB .xpm\fR, \fB .eps\fR and \fB .pdb\fR files
267
268 .BI "\-xvg"  " enum" " xmgrace" 
269  xvg plot formatting: \fB xmgrace\fR, \fB xmgr\fR or \fB none\fR
270
271 .BI "\-skip"  " int" " 1" 
272  Only write every nr\-th frame
273
274 .BI "\-dt"  " time" " 0     " 
275  Only write frame when t MOD dt = first time (ps)
276
277 .BI "\-[no]round"  "no    "
278  Round measurements to nearest picosecond
279
280 .BI "\-dump"  " time" " \-1    " 
281  Dump frame nearest specified time (ps)
282
283 .BI "\-t0"  " time" " 0     " 
284  Starting time (ps) (default: don't change)
285
286 .BI "\-timestep"  " time" " 0     " 
287  Change time step between input frames (ps)
288
289 .BI "\-pbc"  " enum" " none" 
290  PBC treatment (see help text for full description): \fB none\fR, \fB mol\fR, \fB res\fR, \fB atom\fR, \fB nojump\fR, \fB cluster\fR or \fB whole\fR
291
292 .BI "\-ur"  " enum" " rect" 
293  Unit\-cell representation: \fB rect\fR, \fB tric\fR or \fB compact\fR
294
295 .BI "\-[no]center"  "no    "
296  Center atoms in box
297
298 .BI "\-boxcenter"  " enum" " tric" 
299  Center for \-pbc and \-center: \fB tric\fR, \fB rect\fR or \fB zero\fR
300
301 .BI "\-box"  " vector" " 0 0 0" 
302  Size for new cubic box (default: read from input)
303
304 .BI "\-clustercenter"  " vector" " 0 0 0" 
305  Optional starting point for pbc cluster option
306
307 .BI "\-trans"  " vector" " 0 0 0" 
308  All coordinates will be translated by trans. This can advantageously be combined with \-pbc mol \-ur compact.
309
310 .BI "\-shift"  " vector" " 0 0 0" 
311  All coordinates will be shifted by framenr*shift
312
313 .BI "\-fit"  " enum" " none" 
314  Fit molecule to ref structure in the structure file: \fB none\fR, \fB rot+trans\fR, \fB rotxy+transxy\fR, \fB translation\fR, \fB transxy\fR or \fB progressive\fR
315
316 .BI "\-ndec"  " int" " 3" 
317  Precision for .xtc and .gro writing in number of decimal places
318
319 .BI "\-[no]vel"  "yes   "
320  Read and write velocities if possible
321
322 .BI "\-[no]force"  "no    "
323  Read and write forces if possible
324
325 .BI "\-trunc"  " time" " \-1    " 
326  Truncate input trajectory file after this time (ps)
327
328 .BI "\-exec"  " string" " " 
329  Execute command for every output frame with the frame number as argument
330
331 .BI "\-[no]app"  "no    "
332  Append output
333
334 .BI "\-split"  " time" " 0     " 
335  Start writing new file when t MOD split = first time (ps)
336
337 .BI "\-[no]sep"  "no    "
338  Write each frame to a separate .gro, .g96 or .pdb file
339
340 .BI "\-nzero"  " int" " 0" 
341  If the \-sep flag is set, use these many digits for the file numbers and prepend zeros as needed
342
343 .BI "\-dropunder"  " real" " 0     " 
344  Drop all frames below this value
345
346 .BI "\-dropover"  " real" " 0     " 
347  Drop all frames above this value
348
349 .BI "\-[no]conect"  "no    "
350  Add conect records when writing \fB .pdb\fR files. Useful for visualization of non\-standard molecules, e.g. coarse grained ones
351
352 .SH SEE ALSO
353 .BR gromacs(7)
354
355 More information about \fBGROMACS\fR is available at <\fIhttp://www.gromacs.org/\fR>.