1GMX-MDRUN(1) GROMACS GMX-MDRUN(1)
2
3
4
6 gmx-mdrun - Perform a simulation, do a normal mode analysis or an
7 energy minimization
8
10 gmx mdrun [-s [<.tpr>]] [-cpi [<.cpt>]] [-table [<.xvg>]]
11 [-tablep [<.xvg>]] [-tableb [<.xvg> [...]]]
12 [-rerun [<.xtc/.trr/...>]] [-ei [<.edi>]]
13 [-multidir [<dir> [...]]] [-awh [<.xvg>]]
14 [-membed [<.dat>]] [-mp [<.top>]] [-mn [<.ndx>]]
15 [-o [<.trr/.cpt/...>]] [-x [<.xtc/.tng>]] [-cpo [<.cpt>]]
16 [-c [<.gro/.g96/...>]] [-e [<.edr>]] [-g [<.log>]]
17 [-dhdl [<.xvg>]] [-field [<.xvg>]] [-tpi [<.xvg>]]
18 [-tpid [<.xvg>]] [-eo [<.xvg>]] [-devout [<.xvg>]]
19 [-runav [<.xvg>]] [-px [<.xvg>]] [-pf [<.xvg>]]
20 [-ro [<.xvg>]] [-ra [<.log>]] [-rs [<.log>]] [-rt [<.log>]]
21 [-mtx [<.mtx>]] [-if [<.xvg>]] [-swap [<.xvg>]]
22 [-deffnm <string>] [-xvg <enum>] [-dd <vector>]
23 [-ddorder <enum>] [-npme <int>] [-nt <int>] [-ntmpi <int>]
24 [-ntomp <int>] [-ntomp_pme <int>] [-pin <enum>]
25 [-pinoffset <int>] [-pinstride <int>] [-gpu_id <string>]
26 [-gputasks <string>] [-[no]ddcheck] [-rdd <real>]
27 [-rcon <real>] [-dlb <enum>] [-dds <real>] [-gcom <int>]
28 [-nb <enum>] [-nstlist <int>] [-[no]tunepme] [-pme <enum>]
29 [-pmefft <enum>] [-[no]v] [-pforce <real>] [-[no]reprod]
30 [-cpt <real>] [-[no]cpnum] [-[no]append] [-nsteps <int>]
31 [-maxh <real>] [-multi <int>] [-replex <int>] [-nex <int>]
32 [-reseed <int>]
33
35 gmx mdrun is the main computational chemistry engine within GROMACS.
36 Obviously, it performs Molecular Dynamics simulations, but it can also
37 perform Stochastic Dynamics, Energy Minimization, test particle inser‐
38 tion or (re)calculation of energies. Normal mode analysis is another
39 option. In this case mdrun builds a Hessian matrix from single confor‐
40 mation. For usual Normal Modes-like calculations, make sure that the
41 structure provided is properly energy-minimized. The generated matrix
42 can be diagonalized by gmx nmeig.
43
44 The mdrun program reads the run input file (-s) and distributes the
45 topology over ranks if needed. mdrun produces at least four output
46 files. A single log file (-g) is written. The trajectory file (-o),
47 contains coordinates, velocities and optionally forces. The structure
48 file (-c) contains the coordinates and velocities of the last step.
49 The energy file (-e) contains energies, the temperature, pressure, etc,
50 a lot of these things are also printed in the log file. Optionally
51 coordinates can be written to a compressed trajectory file (-x).
52
53 The option -dhdl is only used when free energy calculation is turned
54 on.
55
56 Running mdrun efficiently in parallel is a complex topic topic, many
57 aspects of which are covered in the online User Guide. You should look
58 there for practical advice on using many of the options available in
59 mdrun.
60
61 ED (essential dynamics) sampling and/or additional flooding potentials
62 are switched on by using the -ei flag followed by an .edi file. The
63 .edi file can be produced with the make_edi tool or by using options in
64 the essdyn menu of the WHAT IF program. mdrun produces a .xvg output
65 file that contains projections of positions, velocities and forces onto
66 selected eigenvectors.
67
68 When user-defined potential functions have been selected in the .mdp
69 file the -table option is used to pass mdrun a formatted table with
70 potential functions. The file is read from either the current directory
71 or from the GMXLIB directory. A number of pre-formatted tables are
72 presented in the GMXLIB dir, for 6-8, 6-9, 6-10, 6-11, 6-12
73 Lennard-Jones potentials with normal Coulomb. When pair interactions
74 are present, a separate table for pair interaction functions is read
75 using the -tablep option.
76
77 When tabulated bonded functions are present in the topology, interac‐
78 tion functions are read using the -tableb option. For each different
79 tabulated interaction type used, a table file name must be given. For
80 the topology to work, a file name given here must match a character
81 sequence before the file extension. That sequence is: an underscore,
82 then a ‘b’ for bonds, an ‘a’ for angles or a ‘d’ for dihedrals, and
83 finally the matching table number index used in the topology.
84
85 The options -px and -pf are used for writing pull COM coordinates and
86 forces when pulling is selected in the .mdp file.
87
88 Finally some experimental algorithms can be tested when the appropriate
89 options have been given. Currently under investigation are: polariz‐
90 ability.
91
92 The option -membed does what used to be g_membed, i.e. embed a protein
93 into a membrane. This module requires a number of settings that are
94 provided in a data file that is the argument of this option. For more
95 details in membrane embedding, see the documentation in the user guide.
96 The options -mn and -mp are used to provide the index and topology
97 files used for the embedding.
98
99 The option -pforce is useful when you suspect a simulation crashes due
100 to too large forces. With this option coordinates and forces of atoms
101 with a force larger than a certain value will be printed to stderr. It
102 will also terminate the run when non-finite forces are present.
103
104 Checkpoints containing the complete state of the system are written at
105 regular intervals (option -cpt) to the file -cpo, unless option -cpt is
106 set to -1. The previous checkpoint is backed up to state_prev.cpt to
107 make sure that a recent state of the system is always available, even
108 when the simulation is terminated while writing a checkpoint. With
109 -cpnum all checkpoint files are kept and appended with the step number.
110 A simulation can be continued by reading the full state from file with
111 option -cpi. This option is intelligent in the way that if no check‐
112 point file is found, GROMACS just assumes a normal run and starts from
113 the first step of the .tpr file. By default the output will be append‐
114 ing to the existing output files. The checkpoint file contains check‐
115 sums of all output files, such that you will never loose data when some
116 output files are modified, corrupt or removed. There are three scenar‐
117 ios with -cpi:
118
119 * no files with matching names are present: new output files are writ‐
120 ten
121
122 * all files are present with names and checksums matching those stored
123 in the checkpoint file: files are appended
124
125 * otherwise no files are modified and a fatal error is generated
126
127 With -noappend new output files are opened and the simulation part num‐
128 ber is added to all output file names. Note that in all cases the
129 checkpoint file itself is not renamed and will be overwritten, unless
130 its name does not match the -cpo option.
131
132 With checkpointing the output is appended to previously written output
133 files, unless -noappend is used or none of the previous output files
134 are present (except for the checkpoint file). The integrity of the
135 files to be appended is verified using checksums which are stored in
136 the checkpoint file. This ensures that output can not be mixed up or
137 corrupted due to file appending. When only some of the previous output
138 files are present, a fatal error is generated and no old output files
139 are modified and no new output files are opened. The result with
140 appending will be the same as from a single run. The contents will be
141 binary identical, unless you use a different number of ranks or dynamic
142 load balancing or the FFT library uses optimizations through timing.
143
144 With option -maxh a simulation is terminated and a checkpoint file is
145 written at the first neighbor search step where the run time exceeds
146 -maxh*0.99 hours. This option is particularly useful in combination
147 with setting nsteps to -1 either in the mdp or using the similarly
148 named command line option. This results in an infinite run, terminated
149 only when the time limit set by -maxh is reached (if any)or upon
150 receiving a signal.
151
152 When mdrun receives a TERM or INT signal (e.g. when ctrl+C is pressed),
153 it will stop at the next neighbor search step or at the second global
154 communication step, whichever happens later. When mdrun receives a
155 second TERM or INT signal and reproducibility is not requested, it will
156 stop at the first global communication step. In both cases all the
157 usual output will be written to file and a checkpoint file is written
158 at the last step. When mdrun receives an ABRT signal or the third TERM
159 or INT signal, it will abort directly without writing a new checkpoint
160 file. When running with MPI, a signal to one of the mdrun ranks is
161 sufficient, this signal should not be sent to mpirun or the mdrun
162 process that is the parent of the others.
163
164 Interactive molecular dynamics (IMD) can be activated by using at least
165 one of the three IMD switches: The -imdterm switch allows one to termi‐
166 nate the simulation from the molecular viewer (e.g. VMD). With -imd‐
167 wait, mdrun pauses whenever no IMD client is connected. Pulling from
168 the IMD remote can be turned on by -imdpull. The port mdrun listens to
169 can be altered by -imdport.The file pointed to by -if contains atom
170 indices and forces if IMD pulling is used.
171
172 When mdrun is started with MPI, it does not run niced by default.
173
175 Options to specify input files:
176
177 -s [<.tpr>] (topol.tpr)
178 Portable xdr run input file
179
180 -cpi [<.cpt>] (state.cpt) (Optional)
181 Checkpoint file
182
183 -table [<.xvg>] (table.xvg) (Optional)
184 xvgr/xmgr file
185
186 -tablep [<.xvg>] (tablep.xvg) (Optional)
187 xvgr/xmgr file
188
189 -tableb [<.xvg> […]] (table.xvg) (Optional)
190 xvgr/xmgr file
191
192 -rerun [<.xtc/.trr/…>] (rerun.xtc) (Optional)
193 Trajectory: xtc trr cpt gro g96 pdb tng
194
195 -ei [<.edi>] (sam.edi) (Optional)
196 ED sampling input
197
198 -multidir [<dir> […]] (rundir) (Optional)
199 Run directory
200
201 -awh [<.xvg>] (awhinit.xvg) (Optional)
202 xvgr/xmgr file
203
204 -membed [<.dat>] (membed.dat) (Optional)
205 Generic data file
206
207 -mp [<.top>] (membed.top) (Optional)
208 Topology file
209
210 -mn [<.ndx>] (membed.ndx) (Optional)
211 Index file
212
213 Options to specify output files:
214
215 -o [<.trr/.cpt/…>] (traj.trr)
216 Full precision trajectory: trr cpt tng
217
218 -x [<.xtc/.tng>] (traj_comp.xtc) (Optional)
219 Compressed trajectory (tng format or portable xdr format)
220
221 -cpo [<.cpt>] (state.cpt) (Optional)
222 Checkpoint file
223
224 -c [<.gro/.g96/…>] (confout.gro)
225 Structure file: gro g96 pdb brk ent esp
226
227 -e [<.edr>] (ener.edr)
228 Energy file
229
230 -g [<.log>] (md.log)
231 Log file
232
233 -dhdl [<.xvg>] (dhdl.xvg) (Optional)
234 xvgr/xmgr file
235
236 -field [<.xvg>] (field.xvg) (Optional)
237 xvgr/xmgr file
238
239 -tpi [<.xvg>] (tpi.xvg) (Optional)
240 xvgr/xmgr file
241
242 -tpid [<.xvg>] (tpidist.xvg) (Optional)
243 xvgr/xmgr file
244
245 -eo [<.xvg>] (edsam.xvg) (Optional)
246 xvgr/xmgr file
247
248 -devout [<.xvg>] (deviatie.xvg) (Optional)
249 xvgr/xmgr file
250
251 -runav [<.xvg>] (runaver.xvg) (Optional)
252 xvgr/xmgr file
253
254 -px [<.xvg>] (pullx.xvg) (Optional)
255 xvgr/xmgr file
256
257 -pf [<.xvg>] (pullf.xvg) (Optional)
258 xvgr/xmgr file
259
260 -ro [<.xvg>] (rotation.xvg) (Optional)
261 xvgr/xmgr file
262
263 -ra [<.log>] (rotangles.log) (Optional)
264 Log file
265
266 -rs [<.log>] (rotslabs.log) (Optional)
267 Log file
268
269 -rt [<.log>] (rottorque.log) (Optional)
270 Log file
271
272 -mtx [<.mtx>] (nm.mtx) (Optional)
273 Hessian matrix
274
275 -if [<.xvg>] (imdforces.xvg) (Optional)
276 xvgr/xmgr file
277
278 -swap [<.xvg>] (swapions.xvg) (Optional)
279 xvgr/xmgr file
280
281 Other options:
282
283 -deffnm <string>
284 Set the default filename for all file options
285
286 -xvg <enum> (xmgrace)
287 xvg plot formatting: xmgrace, xmgr, none
288
289 -dd <vector> (0 0 0)
290 Domain decomposition grid, 0 is optimize
291
292 -ddorder <enum> (interleave)
293 DD rank order: interleave, pp_pme, cartesian
294
295 -npme <int> (-1)
296 Number of separate ranks to be used for PME, -1 is guess
297
298 -nt <int> (0)
299 Total number of threads to start (0 is guess)
300
301 -ntmpi <int> (0)
302 Number of thread-MPI ranks to start (0 is guess)
303
304 -ntomp <int> (0)
305 Number of OpenMP threads per MPI rank to start (0 is guess)
306
307 -ntomp_pme <int> (0)
308 Number of OpenMP threads per MPI rank to start (0 is -ntomp)
309
310 -pin <enum> (auto)
311 Whether mdrun should try to set thread affinities: auto, on, off
312
313 -pinoffset <int> (0)
314 The lowest logical core number to which mdrun should pin the
315 first thread
316
317 -pinstride <int> (0)
318 Pinning distance in logical cores for threads, use 0 to minimize
319 the number of threads per physical core
320
321 -gpu_id <string>
322 List of unique GPU device IDs available to use
323
324 -gputasks <string>
325 List of GPU device IDs, mapping each PP task on each node to a
326 device
327
328 -[no]ddcheck (yes)
329 Check for all bonded interactions with DD
330
331 -rdd <real> (0)
332 The maximum distance for bonded interactions with DD (nm), 0 is
333 determine from initial coordinates
334
335 -rcon <real> (0)
336 Maximum distance for P-LINCS (nm), 0 is estimate
337
338 -dlb <enum> (auto)
339 Dynamic load balancing (with DD): auto, no, yes
340
341 -dds <real> (0.8)
342 Fraction in (0,1) by whose reciprocal the initial DD cell size
343 will be increased in order to provide a margin in which dynamic
344 load balancing can act while preserving the minimum cell size.
345
346 -gcom <int> (-1)
347 Global communication frequency
348
349 -nb <enum> (auto)
350 Calculate non-bonded interactions on: auto, cpu, gpu
351
352 -nstlist <int> (0)
353 Set nstlist when using a Verlet buffer tolerance (0 is guess)
354
355 -[no]tunepme (yes)
356 Optimize PME load between PP/PME ranks or GPU/CPU (only with the
357 Verlet cut-off scheme)
358
359 -pme <enum> (auto)
360 Perform PME calculations on: auto, cpu, gpu
361
362 -pmefft <enum> (auto)
363 Perform PME FFT calculations on: auto, cpu, gpu
364
365 -[no]v (no)
366 Be loud and noisy
367
368 -pforce <real> (-1)
369 Print all forces larger than this (kJ/mol nm)
370
371 -[no]reprod (no)
372 Try to avoid optimizations that affect binary reproducibility
373
374 -cpt <real> (15)
375 Checkpoint interval (minutes)
376
377 -[no]cpnum (no)
378 Keep and number checkpoint files
379
380 -[no]append (yes)
381 Append to previous output files when continuing from checkpoint
382 instead of adding the simulation part number to all file names
383
384 -nsteps <int> (-2)
385 Run this number of steps, overrides .mdp file option (-1 means
386 infinite, -2 means use mdp option, smaller is invalid)
387
388 -maxh <real> (-1)
389 Terminate after 0.99 times this time (hours)
390
391 -multi <int> (0)
392 Do multiple simulations in parallel
393
394 -replex <int> (0)
395 Attempt replica exchange periodically with this period (steps)
396
397 -nex <int> (0)
398 Number of random exchanges to carry out each exchange interval
399 (N^3 is one suggestion). -nex zero or not specified gives
400 neighbor replica exchange.
401
402 -reseed <int> (-1)
403 Seed for replica exchange, -1 is generate a seed
404
406 gmx(1)
407
408 More information about GROMACS is available at <‐
409 http://www.gromacs.org/>.
410
412 2019, GROMACS development team
413
414
415
416
4172018.7 May 29, 2019 GMX-MDRUN(1)