T-01Molecular dynamics

GROMACS .mdp checker

Paste an .mdp file and get grompp-style errors, warnings and fixes, or build EM/NVT/NPT/MD templates.

Runs locally, nothing is uploaded · checked against GROMACS 2026.3 · v1.0, updated ·

mdp checker and builder

Force field enables force-field-specific checks; the atom count gives an output-size estimate. Nothing leaves your browser.
Input · file.mdp0 lines
Report · GROMACS 2026.3 rules
0
ERRORS
0
WARNINGS
0
NOTES

Waiting for input

What this checker does

A GROMACS run parameter (.mdp) file is a few dozen key = value lines, and most are copied from somewhere else: an old tutorial, a colleague's directory, a supplementary file from a 2014 paper. GROMACS changes over time. Options get renamed (nstxtcout became nstxout-compressed), defaults change, and the group cut-off scheme was removed completely. Thermostats that used to be standard, like Berendsen, now make grompp stop with a warning. The result is a familiar loop: run gmx grompp, read an error, edit the file, try again, and then find out three days into a production run that tau-p was too short for the barostat you picked.

This tool runs the same kind of checks before you get to the cluster. Paste an .mdp and it parses it the way GROMACS does: keys are case-insensitive, _ and - are equivalent, and everything after ; is a comment. It then reports problems in three severities that mirror grompp:

  • Errors: grompp will refuse to write a .tpr, or mdrun will stop immediately. Examples are rcoulomb ≠ rvdw with the Verlet scheme, mismatched tc-grps/tau-t/ref-t counts, gen-vel = yes together with continuation = yes, and a semi-isotropic barostat with only one compressibility value.
  • Warnings: grompp stops unless you pass -maxwarn, or the setting is a well-documented physical mistake. Examples are the Berendsen thermostat, tau-p shorter than the barostat's minimum number of integration steps, and position restraints under pressure coupling without refcoord-scaling.
  • Notes: things worth knowing that will not stop a run, such as an output-size estimate or the expected centre-of-mass note during restrained equilibration.

Findings marked grompp are ones GROMACS itself reports, with its own message quoted where possible, so you can match them to the output you already have. The others are best-practice checks taken from the GROMACS manual and the force-field documentation. Every finding links to the matching entry in the official mdp options reference.

The Build tab writes clean starting files for the four standard stages (energy minimisation, NVT, NPT and production) for CHARMM36 or AMBER. They use V-rescale and C-rescale, LINCS on h-bonds, automatic coupling intervals, and output sizes you can live with. Click "Check this file" to send a template through the checker. You should get no errors.

Worked example: an NPT file from an old tutorial

Click Load broken NPT (it is loaded when the page opens). The file is a composite of the NPT equilibration inputs that circulate in older tutorials. It uses tcoupl = Berendsen, Parrinello-Rahman with nstpcouple = 10, a 1.0/1.2 nm cut-off pair, two temperature groups with only one tau_t, and both gen_vel = yes and continuation = yes. With the force field set to CHARMM36, the checker reports:

  • 3 errors: rcoulomb (1.0) ≠ rvdw (1.2); two tc-grps but one tau_t; and velocity generation combined with continuation.
  • 5 warnings: the Berendsen thermostat; Parrinello-Rahman during an equilibration that generates velocities; tau-p / (nstpcouple·dt) = 100 where Parrinello-Rahman needs at least 200; position restraints with pressure coupling and refcoord-scaling = no; and the CHARMM36 non-bonded settings (force-switch 1.0–1.2 nm, no dispersion correction).
  • 1 note: the expected centre-of-mass warning with position restraints.

We ran the same file through GROMACS 2026.3 gmx grompp. It stopped with exactly the same two first-pass errors ("With Verlet lists rcoulomb!=rvdw is not supported" and "Generating velocities is inconsistent with attempting to continue a previous run") and the same three warnings (Berendsen, "tau-p (2) should be at least 200 times larger than nstpcouple*dt (0.02)", and Parrinello-Rahman "can be unstable for equilibration"). grompp halts after the first batch of errors, so it never got as far as the tau_t count. The checker shows every problem at once, so you fix the file in one pass instead of five. The suggested fixes are written as .mdp lines that you can paste straight in.

How it was validated

A checker like this is only useful if it agrees with GROMACS, so it is tested against GROMACS rather than against itself:

  • Every template from the Build tab passes gmx grompp -maxwarn 0 in GROMACS 2026.3 (the NVT/NPT templates give only the expected position-restraint COM note). The templates were also run with mdrun on a solvated Trp-cage test system (PDB 1L2Y, 7,654 atoms) for EM, NVT, NPT and production MD, including a 4 fs hydrogen-mass-repartitioning run.
  • A cross-check harness creates 54 mutated .mdp files (wrong thermostats and barostats, coupling intervals, cut-offs, constraint and time-step combinations, COM modes, renamed and obsolete keys, and so on), runs real grompp -maxwarn 0 on each, and compares the result with the checker. grompp rejected 26 of the 54 files, and the checker flagged every one of those 26 as an error or warning. grompp accepted the other 28, and the checker raised no false "grompp will reject this" error on any of them. The cross-check also turned up rules that needed fixing, and they were fixed. For example, SHAKE with energy minimisation passes grompp but fails in mdrun, and the checker now says so.
  • 83 unit tests cover the parser, the individual rules and the builder.

Assumptions and limitations

  • The checker sees only the .mdp. It cannot see your topology or index file, so it cannot check that tc-grps names exist, that -DPOSRES matches an #ifdef in your topology, or that your bonds are short enough for the time step. Some grompp messages depend on the system. One example is the "estimated oscillational period" warning for unconstrained X–H bonds, which the checker reports as a warning without the grompp badge.
  • Target version: GROMACS 2026. Older versions accept some things that 2026 rejects, and the reverse. Keys removed in recent versions are reported as obsolete.
  • Force-field checks compare against the GROMACS manual's recommended CHARMM36 settings. AMBER force fields have no single official GROMACS mdp, so AMBER checks are notes about common practice (for example, 1.0 nm cut-offs with dispersion correction), not rules.
  • Stage detection is a heuristic. An EM integrator means minimisation. Velocity generation or -DPOSRES suggest equilibration, and pressure coupling separates NPT from NVT. Set the stage explicitly if the guess is wrong.
  • Hydrogen mass repartitioning. With mass-repartition-factor = 3, a 4 fs time step is accepted. A 5 fs step usually triggers grompp's bond-period warning and is not recommended.
  • A clean result means the file is internally consistent. It does not mean the protocol is right for your scientific question. Equilibration length, restraints and sampling are still your call. See choosing mdp parameters.

Stuck on a crash rather than on grompp? See common GROMACS errors and how to fix them, or the full protein–ligand MD walkthrough.

References

  1. GROMACS development team. Molecular dynamics parameters (.mdp options), GROMACS 2026 documentation.
  2. GROMACS development team. Force fields in GROMACS (CHARMM36 recommended settings), GROMACS 2026 documentation.
  3. Abraham MJ, Murtola T, Schulz R, et al. GROMACS: High performance molecular simulations through multi-level parallelism from laptops to supercomputers. SoftwareX 2015;1–2:19–25. doi:10.1016/j.softx.2015.06.001
  4. Bussi G, Donadio D, Parrinello M. Canonical sampling through velocity rescaling. J Chem Phys 2007;126:014101. doi:10.1063/1.2408420
  5. Bernetti M, Bussi G. Pressure control using stochastic cell rescaling. J Chem Phys 2020;153:114107. doi:10.1063/5.0020514
  6. Parrinello M, Rahman A. Polymorphic transitions in single crystals: A new molecular dynamics method. J Appl Phys 1981;52:7182–7190. doi:10.1063/1.328693
  7. Hess B, Bekker H, Berendsen HJC, Fraaije JGEM. LINCS: A linear constraint solver for molecular simulations. J Comput Chem 1997;18:1463–1472. doi:10.1002/(SICI)1096-987X(199709)18:12<1463::AID-JCC4>3.0.CO;2-H
  8. Hopkins CW, Le Grand S, Walker RC, Roitberg AE. Long-time-step molecular dynamics through hydrogen mass repartitioning. J Chem Theory Comput 2015;11:1864–1874. doi:10.1021/ct5010406
  9. Huang J, MacKerell AD Jr. CHARMM36 all-atom additive protein force field: Validation based on comparison to NMR data. J Comput Chem 2013;34:2135–2145. doi:10.1002/jcc.23354

Results are for research and education and are not a substitute for checking against the primary literature. See the disclaimer. Found a bug? Report it.

Newsletter · twice a month at most

The Run Log

One email when a pinned version changes, a tutorial is re-run, or a new tool ships.

Sign-ups open soon. Until then, new and re-run tutorials go out on the RSS feed.
About the newsletter →