1GMX-TRJCONV(1) GROMACS GMX-TRJCONV(1)
2
3
4
6 gmx-trjconv - Convert and manipulates trajectory files
7
9 gmx trjconv [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
10 [-fr [<.ndx>]] [-sub [<.ndx>]] [-drop [<.xvg>]]
11 [-o [<.xtc/.trr/...>]] [-b <time>] [-e <time>]
12 [-tu <enum>] [-[no]w] [-xvg <enum>] [-skip <int>]
13 [-dt <time>] [-[no]round] [-dump <time>] [-t0 <time>]
14 [-timestep <time>] [-pbc <enum>] [-ur <enum>]
15 [-[no]center] [-boxcenter <enum>] [-box <vector>]
16 [-trans <vector>] [-shift <vector>] [-fit <enum>]
17 [-ndec <int>] [-[no]vel] [-[no]force] [-trunc <time>]
18 [-exec <string>] [-split <time>] [-[no]sep]
19 [-nzero <int>] [-dropunder <real>] [-dropover <real>]
20 [-[no]conect]
21
23 gmx trjconv can convert trajectory files in many ways:
24
25 · from one format to another
26
27 · select a subset of atoms
28
29 · change the periodicity representation
30
31 · keep multimeric molecules together
32
33 · center atoms in the box
34
35 · fit atoms to reference structure
36
37 · reduce the number of frames
38
39 · change the timestamps of the frames (-t0 and -timestep)
40
41 · cut the trajectory in small subtrajectories according to information
42 in an index file. This allows subsequent analysis of the subtrajecto‐
43 ries that could, for example, be the result of a cluster analysis.
44 Use option -sub. This assumes that the entries in the index file are
45 frame numbers and dumps each group in the index file to a separate
46 trajectory file.
47
48 · select frames within a certain range of a quantity given in an .xvg
49 file.
50
51 gmx trjcat is better suited for concatenating multiple trajectory
52 files.
53
54 The following formats are supported for input and output: .xtc, .trr,
55 .gro, .g96 and .pdb. The file formats are detected from the file
56 extension. The precision of the .xtc output is taken from the input
57 file for .xtc, .gro and .pdb, and from the -ndec option for other input
58 formats. The precision is always taken from -ndec, when this option is
59 set. All other formats have fixed precision. .trr output can be single
60 or double precision, depending on the precision of the gmx trjconv
61 binary. Note that velocities are only supported in .trr, .gro and .g96
62 files.
63
64 Option -sep can be used to write every frame to a separate .gro, .g96
65 or .pdb file. By default, all frames all written to one file. .pdb
66 files with all frames concatenated can be viewed with rasmol -nmrpdb.
67
68 It is possible to select part of your trajectory and write it out to a
69 new trajectory file in order to save disk space, e.g. for leaving out
70 the water from a trajectory of a protein in water. ALWAYS put the
71 original trajectory on tape! We recommend to use the portable .xtc
72 format for your analysis to save disk space and to have portable files.
73
74 There are two options for fitting the trajectory to a reference either
75 for essential dynamics analysis, etc. The first option is just plain
76 fitting to a reference structure in the structure file. The second
77 option is a progressive fit in which the first timeframe is fitted to
78 the reference structure in the structure file to obtain and each subse‐
79 quent timeframe is fitted to the previously fitted structure. This way
80 a continuous trajectory is generated, which might not be the case when
81 using the regular fit method, e.g. when your protein undergoes large
82 conformational transitions.
83
84 Option -pbc sets the type of periodic boundary condition treatment:
85
86 · mol puts the center of mass of molecules in the box, and requires
87 a run input file to be supplied with -s.
88
89 · res puts the center of mass of residues in the box.
90
91 · atom puts all the atoms in the box.
92
93 · nojump checks if atoms jump across the box and then puts them
94 back. This has the effect that all molecules will remain whole
95 (provided they were whole in the initial conformation). Note that
96 this ensures a continuous trajectory but molecules may diffuse out
97 of the box. The starting configuration for this procedure is taken
98 from the structure file, if one is supplied, otherwise it is the
99 first frame.
100
101 · cluster clusters all the atoms in the selected index such that
102 they are all closest to the center of mass of the cluster, which
103 is iteratively updated. Note that this will only give meaningful
104 results if you in fact have a cluster. Luckily that can be checked
105 afterwards using a trajectory viewer. Note also that if your mole‐
106 cules are broken this will not work either.
107
108 · whole only makes broken molecules whole.
109
110 Option -ur sets the unit cell representation for options mol, res and
111 atom of -pbc. All three options give different results for triclinic
112 boxes and identical results for rectangular boxes. rect is the ordi‐
113 nary brick shape. tric is the triclinic unit cell. compact puts all
114 atoms at the closest distance from the center of the box. This can be
115 useful for visualizing e.g. truncated octahedra or rhombic dodecahedra.
116 The center for options tric and compact is tric (see below), unless the
117 option -boxcenter is set differently.
118
119 Option -center centers the system in the box. The user can select the
120 group which is used to determine the geometrical center. Option -box‐
121 center sets the location of the center of the box for options -pbc and
122 -center. The center options are: tric: half of the sum of the box vec‐
123 tors, rect: half of the box diagonal, zero: zero. Use option -pbc mol
124 in addition to -center when you want all molecules in the box after the
125 centering.
126
127 Option -box sets the size of the new box. This option only works for
128 leading dimensions and is thus generally only useful for rectangular
129 boxes. If you want to modify only some of the dimensions, e.g. when
130 reading from a trajectory, you can use -1 for those dimensions that
131 should stay the same It is not always possible to use combinations of
132 -pbc, -fit, -ur and -center to do exactly what you want in one call to
133 gmx trjconv. Consider using multiple calls, and check out the GROMACS
134 website for suggestions.
135
136 With -dt, it is possible to reduce the number of frames in the output.
137 This option relies on the accuracy of the times in your input trajec‐
138 tory, so if these are inaccurate use the -timestep option to modify the
139 time (this can be done simultaneously). For making smooth movies, the
140 program gmx filter can reduce the number of frames while using low-pass
141 frequency filtering, this reduces aliasing of high frequency motions.
142
143 Using -trunc gmx trjconv can truncate .trr in place, i.e. without
144 copying the file. This is useful when a run has crashed during disk I/O
145 (i.e. full disk), or when two contiguous trajectories must be concate‐
146 nated without having double frames.
147
148 Option -dump can be used to extract a frame at or near one specific
149 time from your trajectory, but only works reliably if the time interval
150 between frames is uniform.
151
152 Option -drop reads an .xvg file with times and values. When options
153 -dropunder and/or -dropover are set, frames with a value below and
154 above the value of the respective options will not be written.
155
157 Options to specify input files:
158
159 -f [<.xtc/.trr/…>] (traj.xtc)
160 Trajectory: xtc trr cpt gro g96 pdb tng
161
162 -s [<.tpr/.gro/…>] (topol.tpr) (Optional)
163 Structure+mass(db): tpr gro g96 pdb brk ent
164
165 -n [<.ndx>] (index.ndx) (Optional)
166 Index file
167
168 -fr [<.ndx>] (frames.ndx) (Optional)
169 Index file
170
171 -sub [<.ndx>] (cluster.ndx) (Optional)
172 Index file
173
174 -drop [<.xvg>] (drop.xvg) (Optional)
175 xvgr/xmgr file
176
177 Options to specify output files:
178
179 -o [<.xtc/.trr/…>] (trajout.xtc)
180 Trajectory: xtc trr gro g96 pdb tng
181
182 Other options:
183
184 -b <time> (0)
185 Time of first frame to read from trajectory (default unit ps)
186
187 -e <time> (0)
188 Time of last frame to read from trajectory (default unit ps)
189
190 -tu <enum> (ps)
191 Unit for time values: fs, ps, ns, us, ms, s
192
193 -[no]w (no)
194 View output .xvg, .xpm, .eps and .pdb files
195
196 -xvg <enum> (xmgrace)
197 xvg plot formatting: xmgrace, xmgr, none
198
199 -skip <int> (1)
200 Only write every nr-th frame
201
202 -dt <time> (0)
203 Only write frame when t MOD dt = first time (ps)
204
205 -[no]round (no)
206 Round measurements to nearest picosecond
207
208 -dump <time> (-1)
209 Dump frame nearest specified time (ps)
210
211 -t0 <time> (0)
212 Starting time (ps) (default: don’t change)
213
214 -timestep <time> (0)
215 Change time step between input frames (ps)
216
217 -pbc <enum> (none)
218 PBC treatment (see help text for full description): none, mol,
219 res, atom, nojump, cluster, whole
220
221 -ur <enum> (rect)
222 Unit-cell representation: rect, tric, compact
223
224 -[no]center (no)
225 Center atoms in box
226
227 -boxcenter <enum> (tric)
228 Center for -pbc and -center: tric, rect, zero
229
230 -box <vector> (0 0 0)
231 Size for new cubic box (default: read from input)
232
233 -trans <vector> (0 0 0)
234 All coordinates will be translated by trans. This can advanta‐
235 geously be combined with -pbc mol -ur compact.
236
237 -shift <vector> (0 0 0)
238 All coordinates will be shifted by framenr*shift
239
240 -fit <enum> (none)
241 Fit molecule to ref structure in the structure file: none,
242 rot+trans, rotxy+transxy, translation, transxy, progressive
243
244 -ndec <int> (3)
245 Number of decimal places to write to .xtc output
246
247 -[no]vel (yes)
248 Read and write velocities if possible
249
250 -[no]force (no)
251 Read and write forces if possible
252
253 -trunc <time> (-1)
254 Truncate input trajectory file after this time (ps)
255
256 -exec <string>
257 Execute command for every output frame with the frame number as
258 argument
259
260 -split <time> (0)
261 Start writing new file when t MOD split = first time (ps)
262
263 -[no]sep (no)
264 Write each frame to a separate .gro, .g96 or .pdb file
265
266 -nzero <int> (0)
267 If the -sep flag is set, use these many digits for the file num‐
268 bers and prepend zeros as needed
269
270 -dropunder <real> (0)
271 Drop all frames below this value
272
273 -dropover <real> (0)
274 Drop all frames above this value
275
276 -[no]conect (no)
277 Add conect records when writing .pdb files. Useful for visual‐
278 ization of non-standard molecules, e.g. coarse grained ones
279
281 gmx(1)
282
283 More information about GROMACS is available at <‐
284 http://www.gromacs.org/>.
285
287 2019, GROMACS development team
288
289
290
291
2922018.7 May 29, 2019 GMX-TRJCONV(1)