GMX-GROMPP(1)
π gmx-grompp(1) β the GROMACS manual, but make it make sense π
Hiii bestie π«Ά you just opened the gmx-grompp page of the GROMACS manual and honestly? iconic. Settle in, grab a lil beverage π, because this one is the preprocessor and it's lowkey the most important step before anything fun happens. Let's get into it. β¨
β¨ NAME β¨
gmx-grompp β make a run input file π
β¨ SYNOPSIS β¨
gmx grompp [-f [<.mdp>]] [-c [<.gro/.g96/...>]] [-r [<.gro/.g96/...>]]
[-rb [<.gro/.g96/...>]] [-n [<.ndx>]] [-p [<.top>]]
[-t [<.trr/.cpt/...>]] [-e [<.edr>]] [-qmi [<.inp>]]
[-ref [<.trr/.cpt/...>]] [-po [<.mdp>]] [-pp [<.top>]]
[-o [<.tpr>]] [-imd [<.gro>]] [-[no]v] [-time <real>]
[-[no]rmvsbds] [-maxwarn <int>] [-[no]zero] [-[no]renum]
πΈ DESCRIPTION πΈ
So gmx grompp is the GROMACS preprocessor, and what it does is: it reads a molecular topology file, checks that the file is actually valid, and then expands the topology from a molecular description to an atomic description. Like, glow-up but for particles. π
Your topology file holds the info about molecule types and how many molecules there are, and the preprocessor copies each molecule as many times as you asked for. And bestie β there is no limitation on the number of molecule types. None. Go wild. π
Bonds and bond-angles can be turned into constraints, and you can do that separately for hydrogens and for heavy atoms. Then a coordinate file gets read, and velocities can be generated from a Maxwellian distribution if you request it. π
gmx grompp also reads the parameters for gmx mdrun β like, the number of MD steps, the time step, the cut-off, all of that. And eventually a binary file pops out that can serve as the sole input file for the MD program. One file to rule them all, no cap. π₯
gmx grompp uses the atom names from the topology file. The atom names in the coordinate file (option -c) are only read so it can generate warnings when they don't match the atom names in the topology. And heads up: atom names are actually irrelevant for the simulation itself β only the atom types get used for generating interaction parameters. So don't spiral if they look weird. π
gmx grompp uses a built-in preprocessor to resolve includes, macros, etc. The preprocessor supports these keywords:
#ifdef VARIABLE
#ifndef VARIABLE
#else
#endif
#define VARIABLE
#undef VARIABLE
#include "filename"
#include <filename>
How those statements behave in your topology can be modulated by using these two flags in your .mdp file:
define = -DVARIABLE1 -DVARIABLE2
include = -I/home/john/doe
And for further information, honestly, a C-programming textbook may help you out. π (Not a joke, that's literally what it says.)
If you specify the -pp flag, you'll get the pre-processed topology file written out so you can verify its contents. Do it. Be nosy. π
π¦ Position restraints & free energy π¦
When you're using position restraints, you must supply a file with restraint coordinates via -r (and yes, it can be the same file you supplied for -c π«Ά).
For free energy calculations, you can supply separate reference coordinates for the B topology with -rb β otherwise they'll just be equal to those of the A topology.
π Where coordinates come from π
Starting coordinates can be read from a trajectory with -t. The last frame with coordinates and velocities will be read, unless you use the -time option. Only if that information is absent will the coordinates in the -c file be used. π
Careful bestie: those velocities will not be used whengen_vel = yesin your.mdpfile. Read the room, read the mdp. π
An energy file can be supplied with -e to read Nose-Hoover and/or Parrinello-Rahman coupling variables. β¨
π Restarting runs (the continuity lore) π
gmx grompp can be used to restart simulations (preserving continuity) by supplying just a checkpoint file with -t. π
But β and this is the plot twist β if you simply want to change the number of run steps to extend a run, using gmx convert-tpr is more convenient than gmx grompp. In that case you supply the old checkpoint file directly to gmx mdrun with -cpi.
If you wish to change the ensemble, or things like output frequency, then the recommended procedure is supplying the checkpoint file to gmx grompp with -t along with a new .mdp file with -f. And actually preserving the ensemble (if possible) still requires passing the checkpoint file to gmx mdrun -cpi. Yes, both. That's the vibe. π
π» Virtual sites & bonded interactions π»
By default, all bonded interactions which have constant energy due to virtual site constructions will be removed. But if this constant energy isn't zero, that results in a shift in the total energy. β οΈ
You can keep all bonded interactions by turning off -rmvsbds.
Additionally, all constraints for distances which will be constant anyway (because of virtual site constructions) will be removed. And if any constraints remain that involve virtual sites, you get a fatal error. Not a warning, not a vibe check fail β fatal. π
β Verifying your run input file β
To verify your run input file, please take note of all warnings on the screen, and correct where necessary. Also β look at the contents of the mdout.mdp file; it contains comment lines, as well as the input that gmx grompp has read. π§Ύ
If in doubt, you can start gmx grompp with the -debug option, which will give you more information in a file called grompp.log (along with real debug info).
You can see the contents of the run input file with the gmx dump program, and gmx check can be used to compare the contents of two run input files. Tools! We love tools. π οΈ
β οΈ About -maxwarn β οΈ
The -maxwarn option can be used to override warnings printed by gmx grompp that otherwise halt output. In some cases warnings are harmless β but usually they are not. The user is advised to carefully interpret the output messages before attempting to bypass them with this option. Read that again bestie. Carefully. Interpret. Then decide. π
β¨ OPTIONS β¨
π₯ Options to specify input files
-f [<.mdp>](grompp.mdp) β grompp input file with MD parameters-c [<.gro/.g96/...>](conf.gro) β Structure file: gro g96 pdb brk ent esp tpr-r [<.gro/.g96/...>](restraint.gro) (Optional) β Structure file: gro g96 pdb brk ent esp tpr-rb [<.gro/.g96/...>](restraint.gro) (Optional) β Structure file: gro g96 pdb brk ent esp tpr-n [<.ndx>](index.ndx) (Optional) β Index file-p [<.top>](topol.top) β Topology file-t [<.trr/.cpt/...>](traj.trr) (Optional) β Full precision trajectory: trr cpt tng h5md-e [<.edr>](ener.edr) (Optional) β Energy file-qmi [<.inp>](topol-qmmm.inp) (Optional) β Input file for QM program
π₯π€ Options to specify input/output files
-ref [<.trr/.cpt/...>](rotref.trr) (Optional) β Full precision trajectory: trr cpt tng h5md
π€ Options to specify output files
-po [<.mdp>](mdout.mdp) β grompp input file with MD parameters-pp [<.top>](processed.top) (Optional) β Topology file-o [<.tpr>](topol.tpr) β Portable xdr run input file-imd [<.gro>](imdgroup.gro) (Optional) β Coordinate file in Gromos-87 format
ποΈ Other options
-[no]v(no) β Be loud and noisy π’-time <real>(-1) β Take frame at or first after this time.-[no]rmvsbds(yes) β Remove constant bonded interactions with virtual sites-maxwarn <int>(0) β Number of allowed warnings during input processing. Not for normal use and may generate unstable systems β οΈ-[no]zero(no) β Set parameters for bonded interactions without defaults to zero instead of generating an error-[no]renum(yes) β Renumber atomtypes and minimize number of atomtypes
π SEE ALSO π
More information about GROMACS is available at <http://www.gromacs.org/>. π
Β©οΈ COPYRIGHT Β©οΈ
2026, GROMACS development team
and that's the whole page bestie π«Ά go forth and grompp responsibly β this was GROMACS 2026.4, dated Oct 02, 2026, page GMX-GROMPP(1). slay, run your simulation, drink water. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: gromacs 2026.4
- ubuntu stonking: gromacs-data 2026.4-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms