GMX-MDRUN(1)

๐Ÿ“ฆ version 2021.4, in ubuntu jammy

๐Ÿ’– GMX-MDRUN(1) ๐Ÿ’–

okay bestie, welcome to the mdrun_mpi page ๐Ÿ’… this is the GROMACS one, and it's a big one, so buckle up ๐ŸŽ€


โœจ NAME โœจ

mdrun_mpi โ€” Perform a simulation, do a normal mode analysis or an energy minimization ๐Ÿงš


๐ŸŒธ SYNOPSIS ๐ŸŒธ

mdrun_mpi [-s [<.tpr>]] [-cpi [<.cpt>]] [-table [<.xvg>]]
          [-tablep [<.xvg>]] [-tableb [<.xvg> [...]]]
          [-rerun [<.xtc/.trr/...>]] [-ei [<.edi>]]
          [-multidir [<dir> [...]]] [-awh [<.xvg>]]
          [-membed [<.dat>]] [-mp [<.top>]] [-mn [<.ndx>]]
          [-o [<.trr/.cpt/...>]] [-x [<.xtc/.tng>]] [-cpo [<.cpt>]]
          [-c [<.gro/.g96/...>]] [-e [<.edr>]] [-g [<.log>]]
          [-dhdl [<.xvg>]] [-field [<.xvg>]] [-tpi [<.xvg>]]
          [-tpid [<.xvg>]] [-eo [<.xvg>]] [-px [<.xvg>]]
          [-pf [<.xvg>]] [-ro [<.xvg>]] [-ra [<.log>]] [-rs [<.log>]]
          [-rt [<.log>]] [-mtx [<.mtx>]] [-if [<.xvg>]]
          [-swap [<.xvg>]] [-deffnm <string>] [-xvg <enum>]
          [-dd <vector>] [-ddorder <enum>] [-npme <int>] [-nt <int>]
          [-ntmpi <int>] [-ntomp <int>] [-ntomp_pme <int>]
          [-pin <enum>] [-pinoffset <int>] [-pinstride <int>]
          [-gpu_id <string>] [-gputasks <string>] [-[no]ddcheck]
          [-rdd <real>] [-rcon <real>] [-dlb <enum>] [-dds <real>]
          [-nb <enum>] [-nstlist <int>] [-[no]tunepme] [-pme <enum>]
          [-pmefft <enum>] [-bonded <enum>] [-update <enum>] [-[no]v]
          [-pforce <real>] [-[no]reprod] [-cpt <real>] [-[no]cpnum]
          [-[no]append] [-nsteps <int>] [-maxh <real>]
          [-replex <int>] [-nex <int>] [-reseed <int>]

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

So. mdrun_mpi is the main computational chemistry engine within GROMACS. obviously. ๐Ÿ‘‘

It does Molecular Dynamics simulations (duh), but it can also do Stochastic Dynamics, Energy Minimization, test particle insertion, or (re)calculation of energies. Normal mode analysis is another option. In that case mdrun builds a Hessian matrix from a single conformation. For usual Normal Modes-like calculations, make sure that the structure provided is properly energy-minimized โ€” like, do the prep work first, babe. The generated matrix can be diagonalized by gmx nmeig. โœจ

This version of the program will only run while using a MPI parallel computing library. See mpirun(1). Use the normal gmx(1) program for conventional single-threaded operations.

The mdrun program reads the run input file (-s) and distributes the topology over ranks if needed. mdrun produces at least four output files:

  • A single log file (-g) is written. ๐Ÿ“
  • The trajectory file (-o) contains coordinates, velocities and optionally forces.
  • The structure file (-c) contains the coordinates and velocities of the last step.
  • The energy file (-e) contains energies, the temperature, pressure, etc โ€” a lot of these things are also printed in the log file.

Optionally coordinates can be written to a compressed trajectory file (-x). ๐Ÿฆ‹

The option -dhdl is only used when free energy calculation is turned on.


Running mdrun efficiently in parallel is a complex topic, and many aspects of it are covered in the online User Guide. You should look there for practical advice on using many of the options available in mdrun. iykyk ๐Ÿซถ

ED (essential dynamics) sampling and/or additional flooding potentials are switched on by using the -ei flag followed by an .edi file. The .edi file can be produced with the make_edi tool or by using options in the essdyn menu of the WHAT IF program. mdrun produces a .xvg output file that contains projections of positions, velocities and forces onto selected eigenvectors. ๐Ÿ’ซ

When user-defined potential functions have been selected in the .mdp file, the -table option is used to pass mdrun a formatted table with potential functions. The file is read from either the current directory or from the GMXLIB directory. A number of pre-formatted tables are presented in the GMXLIB dir, for 6-8, 6-9, 6-10, 6-11, 6-12 Lennard-Jones potentials with normal Coulomb. When pair interactions are present, a separate table for pair interaction functions is read using the -tablep option. ๐Ÿ“

When tabulated bonded functions are present in the topology, interaction functions are read using the -tableb option. For each different tabulated interaction type used, a table file name must be given. For the topology to work, a file name given here must match a character sequence before the file extension. That sequence is: an underscore, then a โ€˜bโ€™ for bonds, an โ€˜aโ€™ for angles or a โ€˜dโ€™ for dihedrals, and finally the matching table number index used in the topology. Note that these options are deprecated, and in future will be available via grompp. ๐Ÿ‘€

The options -px and -pf are used for writing pull COM coordinates and forces when pulling is selected in the .mdp file.

The option -membed does what used to be g_membed, i.e. embed a protein into a membrane. This module requires a number of settings that are provided in a data file that is the argument of this option. For more details in membrane embedding, see the documentation in the user guide. The options -mn and -mp are used to provide the index and topology files used for the embedding. ๐Ÿงฌ

The option -pforce is useful when you suspect a simulation crashes due to too large forces. With this option, coordinates and forces of atoms with a force larger than a certain value will be printed to stderr. It will also terminate the run when non-finite forces are present. ๐Ÿ’€


๐ŸŽ€ Checkpoints, bestie ๐ŸŽ€

Checkpoints containing the complete state of the system are written at regular intervals (option -cpt) to the file -cpo, unless option -cpt is set to -1. The previous checkpoint is backed up to state_prev.cpt to make sure that a recent state of the system is always available, even when the simulation is terminated while writing a checkpoint. With -cpnum all checkpoint files are kept and appended with the step number. ๐Ÿ”ฅ

A simulation can be continued by reading the full state from file with option -cpi. This option is intelligent in the way that if no checkpoint file is found, GROMACS just assumes a normal run and starts from the first step of the .tpr file. By default the output will be appending to the existing output files. The checkpoint file contains checksums of all output files, such that you will never loose data when some output files are modified, corrupt or removed. There are three scenarios with -cpi:

  • no files with matching names are present: new output files are written
  • all files are present with names and checksums matching those stored in the checkpoint file: files are appended
  • otherwise no files are modified and a fatal error is generated ๐Ÿ’€

With -noappend new output files are opened and the simulation part number is added to all output file names. Note that in all cases the checkpoint file itself is not renamed and will be overwritten, unless its name does not match the -cpo option.

With checkpointing the output is appended to previously written output files, unless -noappend is used or none of the previous output files are present (except for the checkpoint file). The integrity of the files to be appended is verified using checksums which are stored in the checkpoint file. This ensures that output can not be mixed up or corrupted due to file appending. When only some of the previous output files are present, a fatal error is generated and no old output files are modified and no new output files are opened. The result with appending will be the same as from a single run. The contents will be binary identical, unless you use a different number of ranks or dynamic load balancing or the FFT library uses optimizations through timing. ๐Ÿค“


With option -maxh a simulation is terminated and a checkpoint file is written at the first neighbor search step where the run time exceeds -maxh*0.99 hours. This option is particularly useful in combination with setting nsteps to -1 either in the mdp or using the similarly named command line option (although the latter is deprecated). This results in an infinite run, terminated only when the time limit set by -maxh is reached (if any) or upon receiving a signal. โฐ


๐ŸŒˆ IMD (interactive molecular dynamics) ๐ŸŒˆ

Interactive molecular dynamics (IMD) can be activated by using at least one of the three IMD switches:

  • The -imdterm switch allows one to terminate the simulation from the molecular viewer (e.g. VMD). ๐Ÿ‘‹
  • With -imdwait, mdrun pauses whenever no IMD client is connected.
  • Pulling from the IMD remote can be turned on by -imdpull.

The port mdrun listens to can be altered by -imdport. The file pointed to by -if contains atom indices and forces if IMD pulling is used. ๐Ÿ“ก


โœจ OPTIONS โœจ


๐Ÿ“ฅ Options to specify input files ๐Ÿซถ

  • -s [<.tpr>] (topol.tpr) โ€” the portable xdr run input file, periodt ๐Ÿ’…
  • -cpi [<.cpt>] (state.cpt) (Optional) โ€” checkpoint file, iykyk ๐ŸŽ€
  • -table [<.xvg>] (table.xvg) (Optional) โ€” an xvgr/xmgr file โœจ
  • -tablep [<.xvg>] (tablep.xvg) (Optional) โ€” also an xvgr/xmgr file ๐Ÿ’–
  • -tableb [<.xvg> [โ€ฆ]] (table.xvg) (Optional) โ€” yes bestie, another xvgr/xmgr file ๐ŸŒธ
  • -rerun [<.xtc/.trr/โ€ฆ>] (rerun.xtc) (Optional) โ€” trajectory vibes: xtc trr cpt gro g96 pdb tng ๐Ÿฆ‹
  • -ei [<.edi>] (sam.edi) (Optional) โ€” ED sampling input, no cap ๐Ÿ’œ
  • -multidir [<dir> [โ€ฆ]] (rundir) (Optional) โ€” run directory, slay ๐Ÿƒโ€โ™€๏ธ
  • -awh [<.xvg>] (awhinit.xvg) (Optional) โ€” xvgr/xmgr file โœจ
  • -membed [<.dat>] (membed.dat) (Optional) โ€” generic data file, iconic ๐Ÿ’…
  • -mp [<.top>] (membed.top) (Optional) โ€” topology file ๐Ÿ‘‘
  • -mn [<.ndx>] (membed.ndx) (Optional) โ€” index file ๐ŸŽ€

๐Ÿ“ค Options to specify output files ๐Ÿ’–

  • -o [<.trr/.cpt/โ€ฆ>] (traj.trr) โ€” full precision trajectory: trr cpt tng ๐Ÿ”ฅ
  • -x [<.xtc/.tng>] (traj_comp.xtc) (Optional) โ€” compressed trajectory (tng format or portable xdr format) ๐ŸŒˆ
  • -cpo [<.cpt>] (state.cpt) (Optional) โ€” checkpoint file ๐Ÿ’พ
  • -c [<.gro/.g96/โ€ฆ>] (confout.gro) โ€” structure file: gro g96 pdb brk ent esp ๐Ÿงš
  • -e [<.edr>] (ener.edr) โ€” energy file โšก
  • -g [<.log>] (md.log) โ€” log file ๐Ÿ“
  • -dhdl [<.xvg>] (dhdl.xvg) (Optional) โ€” xvgr/xmgr file โœจ
  • -field [<.xvg>] (field.xvg) (Optional) โ€” xvgr/xmgr file ๐ŸŒธ
  • -tpi [<.xvg>] (tpi.xvg) (Optional) โ€” xvgr/xmgr file ๐Ÿ’œ
  • -tpid [<.xvg>] (tpidist.xvg) (Optional) โ€” xvgr/xmgr file ๐Ÿฆ‹
  • -eo [<.xvg>] (edsam.xvg) (Optional) โ€” xvgr/xmgr file ๐ŸŽ€
  • -px [<.xvg>] (pullx.xvg) (Optional) โ€” xvgr/xmgr file ๐Ÿ’…
  • -pf [<.xvg>] (pullf.xvg) (Optional) โ€” xvgr/xmgr file โœจ
  • -ro [<.xvg>] (rotation.xvg) (Optional) โ€” xvgr/xmgr file ๐ŸŒˆ
  • -ra [<.log>] (rotangles.log) (Optional) โ€” log file ๐Ÿ“
  • -rs [<.log>] (rotslabs.log) (Optional) โ€” log file ๐Ÿ“
  • -rt [<.log>] (rottorque.log) (Optional) โ€” log file ๐Ÿ“
  • -mtx [<.mtx>] (nm.mtx) (Optional) โ€” Hessian matrix ๐Ÿ”ข
  • -if [<.xvg>] (imdforces.xvg) (Optional) โ€” xvgr/xmgr file ๐Ÿ’–
  • -swap [<.xvg>] (swapions.xvg) (Optional) โ€” xvgr/xmgr file ๐Ÿซถ

๐Ÿ› ๏ธ Other options ๐Ÿ‘‘

  • -deffnm <string> โ€” set the default filename for all file options, bestie ๐ŸŽ€
  • -xvg <enum> (xmgrace) โ€” xvg plot formatting: xmgrace, xmgr, none ๐Ÿ“Š
  • -dd <vector> (0 0 0) โ€” domain decomposition grid, 0 is optimize ๐Ÿงฉ
  • -ddorder <enum> (interleave) โ€” DD rank order: interleave, pp_pme, cartesian ๐ŸŒ€
  • -npme <int> (-1) โ€” number of separate ranks to be used for PME, -1 is guess ๐Ÿค”
  • -nt <int> (0) โ€” total number of threads to start (0 is guess) ๐Ÿงต
  • -ntmpi <int> (0) โ€” number of thread-MPI ranks to start (0 is guess) ๐Ÿงต
  • -ntomp <int> (0) โ€” number of OpenMP threads per MPI rank to start (0 is guess) ๐Ÿงต
  • -ntomp_pme <int> (0) โ€” number of OpenMP threads per MPI rank to start (0 is -ntomp) ๐Ÿงต
  • -pin <enum> (auto) โ€” whether mdrun should try to set thread affinities: auto, on, off ๐Ÿ“Œ
  • -pinoffset <int> (0) โ€” the lowest logical core number to which mdrun should pin the first thread ๐Ÿ“Œ
  • -pinstride <int> (0) โ€” pinning distance in logical cores for threads, use 0 to minimize the number of threads per physical core ๐Ÿ“Œ
  • -gpu_id <string> โ€” list of unique GPU device IDs available to use ๐ŸŽฎ
  • -gputasks <string> โ€” list of GPU device IDs, mapping each PP task on each node to a device ๐Ÿ—บ๏ธ
  • -[no]ddcheck (yes) โ€” check for all bonded interactions with DD โœ…
  • -rdd <real> (0) โ€” the maximum distance for bonded interactions with DD (nm), 0 is determine from initial coordinates ๐Ÿ“
  • -rcon <real> (0) โ€” maximum distance for P-LINCS (nm), 0 is estimate ๐Ÿ“
  • -dlb <enum> (auto) โ€” dynamic load balancing (with DD): auto, no, yes โš–๏ธ
  • -dds <real> (0.8) โ€” fraction in (0,1) by whose reciprocal the initial DD cell size will be increased in order to provide a margin in which dynamic load balancing can act while preserving the minimum cell size. ๐Ÿ“
  • -nb <enum> (auto) โ€” calculate non-bonded interactions on: auto, cpu, gpu ๐Ÿ–ฅ๏ธ
  • -nstlist <int> (0) โ€” set nstlist when using a Verlet buffer tolerance (0 is guess) ๐Ÿ“‹
  • -[no]tunepme (yes) โ€” optimize PME load between PP/PME ranks or GPU/CPU โš™๏ธ
  • -pme <enum> (auto) โ€” perform PME calculations on: auto, cpu, gpu ๐Ÿงฎ
  • -pmefft <enum> (auto) โ€” perform PME FFT calculations on: auto, cpu, gpu ๐Ÿงฎ
  • -bonded <enum> (auto) โ€” perform bonded calculations on: auto, cpu, gpu ๐Ÿ”—
  • -update <enum> (auto) โ€” perform update and constraints on: auto, cpu, gpu ๐Ÿ”„
  • -[no]v (no) โ€” be loud and noisy ๐Ÿ“ข
  • -pforce <real> (-1) โ€” print all forces larger than this (kJ/mol nm) ๐Ÿ’ช
  • -[no]reprod (no) โ€” try to avoid optimizations that affect binary reproducibility ๐Ÿ”
  • -cpt <real> (15) โ€” checkpoint interval (minutes) โฑ๏ธ
  • -[no]cpnum (no) โ€” keep and number checkpoint files ๐Ÿ”ข
  • -[no]append (yes) โ€” append to previous output files when continuing from checkpoint instead of adding the simulation part number to all file names ๐Ÿ“Ž
  • -nsteps <int> (-2) โ€” run this number of steps (-1 means infinite, -2 means use mdp option, smaller is invalid) ๐Ÿšถ
  • -maxh <real> (-1) โ€” terminate after 0.99 times this time (hours) โณ
  • -replex <int> (0) โ€” attempt replica exchange periodically with this period (steps) ๐Ÿ”„
  • -nex <int> (0) โ€” number of random exchanges to carry out each exchange interval (N^3 is one suggestion). -nex zero or not specified gives neighbor replica exchange. ๐ŸŽฒ
  • -reseed <int> (-1) โ€” seed for replica exchange, -1 is generate a seed ๐ŸŒฑ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • gmx(1) โ€” like, the main character ๐Ÿซถ

More information about GROMACS is available at <โ€ http://www.gromacs.org/>. ๐ŸŒ


2020, GROMACS development team ๐Ÿ’–


Okay bestie, that's the whole vibe! This page is from GROMACS version 2020.4-Debian-2020.4-2, dated Oct 06, 2020, and it's literally GMX-MDRUN(1). Slay ๐Ÿ’…โœจ
๐Ÿ“ฆ where this page comes from