GROMACS

New
License: GNU Lesser General Public License 2.1 · Updated 2026-11-11
My rating

1. Overview

GROMACS is a free, open-source software suite for molecular dynamics simulation and trajectory analysis, developed since the mid-1990s at Groningen University and released under the GNU Lesser General Public License 2.1. It is the default choice for a large share of biomolecular simulation work, and the reasons are specific rather than general: a tightly optimised inner loop, mature GPU offload, a complete built-in toolchain for system preparation and analysis, and a user-facing workflow centred on a single parameter file.

This guide matters to physics AI for one concrete reason. GROMACS is no longer exclusively a classical-force-field engine: recent releases include a neural network potential interface that loads PyTorch models exported through TorchScript and contributes energies and forces during production simulations, including hybrid machine-learning / molecular-mechanics runs in which only a subsystem uses the learned potential. That capability sits at the intersection of the molecular simulation and machine-learning toolchains this site tracks, and it is where GROMACS now overlaps with the machine-learned interatomic potential entries in materials discovery and surrogate modelling.

The aim here is to help you decide where GROMACS belongs in your workflow. After reading you should understand what the engine actually optimises for, where the neural network potential interface fits and where it stops, and how the code compares with the alternatives that share your problem space. The physics simulation primer supplies the conceptual background, and the physics knowledge machine learning survey covers the modelling side. All version and capability statements were checked against the project website, release notes and reference manual on 11 November 2026, and claims that reflect the project's own description rather than independent measurement are labelled in Section 9.

2. How It Works

GROMACS solves Newton's equations of motion for an atomistic system with periodic boundary conditions, integrating a fixed or variable timestep and evaluating forces through a combination of bonded and non-bonded terms. The implementation is organised around a small number of performance-critical ideas. Neighbour searching is done with a Verlet-list scheme that rebuilds only when particles have moved beyond a skin distance, and the 2025 release extended OpenMP parallelisation of pair search and domain decomposition, which matters most when fast GPUs leave the CPU searching for work.

Long-range electrostatics are handled by PME, the particle-mesh Ewald method, which trades a direct sum for a reciprocal-space calculation on a grid. The efficiency of that step depends heavily on the FFT library, which is why GPU-aware builds sometimes pair GROMACS with a separate FFT implementation. Since 2025 the default behaviour is to use GPU-direct communication when the MPI library supports it, and the halo exchange step was enhanced with NVSHMEM for GPU-initiated communication, improving multi-NVIDIA-GPU scaling.

The GPU backend story is where recent versions have moved fastest. CUDA remains the recommended path for NVIDIA hardware, while SYCL support covers Intel and AMD GPUs through Intel oneAPI DPC++ or AdaptiveCpp; AMD's HIP backend was added in 2025 with partial kernel coverage, expanding to full offload in 2026. Only one GPU backend can be configured per build, and the CPU code always runs alongside GPU acceleration, which is a deliberate design rather than a fallback.

The neural network potential interface is layered on top of the modular MDModules framework, so the learned potential contributes forces without rewriting the integrator. A model exported from PyTorch via TorchScript is loaded through LibTorch at runtime, avoiding a Python interpreter in the hot loop. The interface defines a flexible set of inputs and outputs, so it is agnostic to model architecture and accommodates descriptor-based and message-passing potentials alike.

3. Scope and Assumptions

GROMACS assumes you are simulating an atomistic system described by a force field, a coordinate file and a parameter file, and it excels when that system is biomolecular in character: proteins, nucleic acids, lipid membranes, solvents and their combinations. The preprocessing chain built around gmx pdb2gmx and the associated topology tools is a genuine part of the value proposition here, and it is the part that has no counterpart in a general-purpose engine.

The classical force-field assumption is the important boundary. GROMACS carries the AMBER, CHARMM and GROMOS families for biomolecular work and does not natively target the material-science potentials that dominate other engines, such as EAM for metals or reactive potentials for chemistry. A modelling choice made elsewhere may simply not port. ReaxFF-style reactive simulations, coarse-grained membrane models beyond the built-in support, and multi-scale coupling are all cases where you will be leaving GROMACS' strengths.

For the neural network potential path there are specific requirements. The build must link against LibTorch 2.0 or newer, using the CXX11 ABI build; the LibTorch version linked at build time should match the one used to export the model, and the pre-CXX11 ABI wheels shipped with the conda packages cannot be used. Only models exported through PyTorch's TorchScript are supported at present, which rules out several other frameworks and some export paths. Inference device selection is limited to cpu and cuda.

The hybrid embedding scheme is another assumption with teeth. The interface currently implements only mechanical embedding, where total energy decomposes into the learned contribution, the classical contribution and a coupling term. With the 2026 release adding positions and charges of the classical atoms as model inputs, electrostatic embedding can be implemented inside the model itself, but that is the model author's responsibility rather than a built-in mode. Regions that cut covalent bonds require care; the 2026 version introduces virtual link atoms automatically, which mitigates but does not eliminate the risk of unusual local environments outside a model's training regime.

The licensing assumption is favourable but worth stating precisely: LGPL 2.1 permits use and modification, and dynamic linking keeps your own code unencumbered, though distributions that embed GROMACS binaries carry obligations worth reviewing for commercial contexts.

4. Getting Started

The documented entry path is the official tutorial suite, which progresses from basic applications to advanced ones. Starting from it has an advantage over a hand-assembled workflow: the tutorials encode the conventions the tool expects, and when a later step fails the question is usually about your deviation rather than about a subtle parameter interaction.

A first run should be small. Build a solvated protein or a lipid bilayer, run energy minimisation, then a short equilibration with position restraints, then production. Enable the verification steps the manual prescribes: check the energy terms individually for conservation, check that the temperature and pressure coupling behave, and confirm the trajectory looks like the physical system you intended. On a GPU build, verify that the offloaded kernels are actually being used rather than silently falling back to CPU, since a fallback is easy to miss and produces plausible-looking results.

If you intend to use a neural network potential, the ordering changes. Export the model to TorchScript first, confirm it produces energies and forces consistent with the training set on a small system, and only then wire it into a production run. The manual gives a concrete wrapper example using an ANI model, including the unit conversion between the model's convention and GROMACS' convention, which is a common source of silent errors. Start with a pure neural network potential run on a small system to validate the interface, and only afterwards move to a hybrid setup where a learned subsystem is embedded in a classical environment.

For scaling, the community's own advice applies: use the -maxh flag so a job writes a final checkpoint before the scheduler kills it, and minimise verbose I/O, since trajectory writing can dominate wall time for cheap systems on slow storage. The classical-solver cost-boundary guide frames when a classical molecular dynamics run is the right reference at all, and the physics-based deep learning material covers the case where a surrogate is the more sensible target.

5. Comparison with Alternatives

The primary comparison is with LAMMPS, and the two are less interchangeable than a shared "molecular dynamics" label suggests. LAMMPS came out of Sandia National Laboratories and is the de facto standard across materials science: it supports EAM and other material potentials, reactive potentials, custom user-defined potentials, and multi-scale approaches, with Kokkos providing GPU acceleration. Its input is a script, which grants flexibility at the cost of a steep learning curve, and its analysis typically relies on external tools such as OVITO or VMD. GROMACS, developed at Groningen University, concentrates on biomolecular force fields, with structured parameter files, a built-in preprocessing and analysis toolchain, and an inner loop optimised for exactly that class of system. The practical division is that biomolecular systems and free-energy work sit in GROMACS' territory, while metals, ceramics, reactive chemistry and custom potentials sit in LAMMPS'.

The second comparison is with the machine-learned potential engines. Dedicated MLIP packages such as DeePMD-kit, MACE, NequIP and AIMNet2 are purpose-built for training and running learned interatomic potentials, and they own the training workflow and often the architecture-specific optimisations. GROMACS' interface inverts that relationship: it does not train models, it consumes a model trained elsewhere and runs it inside a production-quality molecular dynamics engine with all its sampling and free-energy machinery. That is a complement rather than a competition, and the same paper that introduced the interface in recent releases demonstrates it with peptide torsional free-energy landscapes, absolute solvation free energies and protein-ligand simulations.

A third comparison is with classical ab initio approaches. Electronic-structure methods remain the accuracy reference that learned potentials are trained against, and QM/MM remains the technique of record for treating chemical reactivity, with the option to use the learned potential on the QM subsystem in a hybrid scheme. The relation between the three can be summarised as a division of labour: electronic structure supplies the accuracy yardstick, dedicated machine-learned potential engines handle training, and GROMACS runs the trained model inside production-scale simulation.

6. Benchmarks and Evidence

Independent performance figures for GROMACS are widely circulated but heavily configuration-dependent, and the honest approach is to treat them as orientation rather than as specification. A commonly quoted operating point is that a single A100 sustains a throughput on the order of 200 ns/day for a 100-thousand-atom system, with CPU-only runs of the same class of system yielding far fewer steps per second. Such figures assume a specific precision, a specific force field and a specific GPU, and they shift substantially with system size and force-field mix.

The neural network potential path has published benchmarks of its own. The interface paper reports performance measurements on water boxes across several neural network potential architectures, using ANI2x with a CUDA-optimised inference implementation as well as AIMNet2 and MACE, and it notes that the cost of the learned potential dominates wall time in the hybrid setting. A separate line of work integrates DeePMD-kit as an additional backend with domain-decomposed, GPU-accelerated inference across multiple nodes, reporting strong-scaling efficiency of 66 percent at 16 devices and 40 percent at 32, and weak-scaling efficiency of 80 percent up to 16 devices, on A100 and MI250x hardware. That work also profiles the bottleneck explicitly: more than 90 percent of wall time is spent in the machine-learning inference, MPI collectives contribute under 10 percent, and the residual costs are the irreducible ghost-atom overhead set by the cutoff radius and load imbalance across ranks.

Two practical performance facts are worth more than any leaderboard. First, precision dominates hardware selection for molecular dynamics: double-precision throughput and memory bandwidth are what matter, and consumer cards with heavily reduced FP64 throughput can change trajectory behaviour rather than merely slow it down. Second, for small systems the bottleneck is often I/O and setup rather than arithmetic, which is why trajectory write frequency and checkpoint discipline matter so much in practice.

7. Role in Physics-AI Workflows

GROMACS occupies a specific position in physics AI: it is the classical molecular dynamics engine that a learned potential plugs into, and it is also a generator of reference data. Three uses are worth naming.

The first is the neural network potential interface, which lets a model trained in PyTorch contribute energies and forces during production simulation, for either a whole system or a subsystem. Because the interface is architecture-agnostic, a model can be descriptor-based or message-passing without changing the simulation setup, and because it is integrated into the existing engine, the full enhanced-sampling and free-energy workflow remains available.

The second is as a data engine for learned potentials. A trained potential needs reference configurations spanning the relevant configuration space, and a classical engine's existing sampling machinery - replica exchange, metadynamics, adaptive biasing - can be used to produce that data at a fidelity classical force fields can reach. The reverse direction also holds: once a model reproduces the reference well enough, the engine runs the model in production at a cost classical engines cannot reach.

The third is as a classical baseline against which learned potentials are judged. Any claim that a learned potential "reproduces molecular dynamics" should be checked against a GROMACS run on the same system, and this site treats that kind of classical reference as a fixed part of the methodology - see the classical-solver cost-boundary guide and the surrogate modelling collection. In materials discovery contexts the same pattern appears, where the learned potential is validated against established simulation engines.

8. Limitations and Failure Modes

The most consequential limitation is domain coverage. GROMACS' strengths are biomolecular, and the force fields, analysis tools and preprocessing chain are built around that assumption. When a system is genuinely inorganic - metals, ceramics, reactive mineral phases - the tooling provides less, and moving to a material-specialised engine is usually cheaper than adapting.

The second limitation concerns the neural network potential interface. It supports PyTorch models exported through TorchScript, and the model-architecture agnosticism is real but not unlimited: a model must express its energy and optionally its forces in the shapes the interface expects. Forcing an architecture that computes forces through an unusual route, or one with state carried across time steps, may not fit. The hybrid embedding scheme is a further constraint, with mechanical embedding implemented in the interface and electrostatic embedding left to the model.

A third class of failure is chemical. Classical force fields do not model bond breaking or formation, so a reaction observed in a simulation is an artefact rather than a prediction. With learned potentials, the failure mode shifts to extrapolation: a configuration outside the training distribution can produce an energy that is wrong in a way classical potentials never are, and because the dynamics follows those forces, the error compounds silently. The interface's own documentation warns that broken bonds between regions produce local environments the model has not seen.

A fourth class is operational. GPU backend coverage differs by kernel and by vendor, so a configuration that runs correctly on NVIDIA hardware may behave differently on AMD HIP or Intel SYCL; the AMD backend was partial in 2025 and reached full offload only in 2026. Long simulations on shared clusters fail for mundane reasons - jobs exceeding wall-clock limits without -maxh, or storage bandwidth collapsing under excessive trajectory writes - and these produce lost compute rather than wrong results, which is a different but still painful failure.

Finally, there is a scale limit worth naming plainly: even with GPU offload and multi-node scaling, the cost per nanosecond of a large solvated system remains high. When the deliverable is a large ensemble of trajectories rather than one well-converged trajectory, a surrogate or a coarse-grained model is the appropriate instrument, and ClimateLearn and Modin represent adjacent approaches for the respective domains.

9. Version and Source Notes

As of 11 November 2026, the current GROMACS release is 2026.4, released on 2 October 2026. The release train publishes both an annual major line and quarterly patch lines: within the 2026 line, 2026.0 appeared on 19 January 2026, 2026.1 on 6 March, 2026.2 on 6 May and 2026.3 in June, with 2026.4 following in October; the 2025 line continued with 2025.3 in September, 2025.4 on 23 November and 2025.5 on 1 September 2026. The parallel 2025 branch remains available, which matters for reproducing older results.

Verifiable features of the 2025 major release include a feature-limited PLUMED build available on non-Windows builds without patching, basic support for simulations driven by neural network potentials trained in PyTorch, extended OpenMP parallelisation of pair search and domain decomposition, AMD HIP as a GPU backend with partial kernel coverage, and default use of GPU-direct communication when the MPI library supports it, plus NVSHMEM-based kernel-initiated halo exchange. The 2026 line extends the HIP path to full offload support and continues the SYCL work for Intel and AMD GPUs.

The neural network potential interface evolved in parallel. The reference manual for the 2025 release describes the NNPot module, the requirement for LibTorch 2.0 or higher, the input options of atom positions, atom numbers, box vectors and periodic boundary conditions, and the GMX_NN_DEVICE environment variable for device selection. The accompanying interface paper, first posted in April 2026, describes the 2026 additions: the built-in pair list and the positions and charges of classical atoms as available model inputs, automatic virtual link atoms for regions that cut covalent bonds, and the possibility of implementing electrostatic embedding inside the model. The same research group also published a DeePMD-kit backend extension for multi-GPU deep-potential inference.

On ecosystem and licensing: GROMACS is LGPL 2.1. The project distributes CPU and GPU builds, with GPU-aware MPI recommended for multi-GPU runs, and the installation guide documents CUDA-aware MPI support for NVIDIA hardware with OpenMPI 4.1 or newer and UCX 1.10 or newer, plus SYCL-specific guidance for Intel and AMD. PLUMED support is present from the 2025 versions onward.

Statement of provenance: version numbers, dates and feature statements above come from the project website, release highlights and reference manual. The performance figures in Section 6 come from published benchmark work and from vendor-oriented hardware guidance, and reflect particular systems, precisions and GPU configurations rather than general guarantees.

10. References

  1. GROMACS project website and download page, gromacs.org, release announcements for the 2025 and 2026 lines.
  1. GROMACS installation guide, manual.gromacs.org, GPU backend configuration covering CUDA, SYCL and HIP, plus MPI and NVSHMEM support.
  1. GROMACS reference manual, Neural Network Potentials chapter, NNPot module interface, input options and hybrid embedding scheme.
  1. Müllender, Hess and Lindahl, "Enabling Biomolecular Simulations with Neural Network Potentials in GROMACS", arXiv 2604.21441, April 2026.
  1. GROMACS 2025 release highlights, manual.gromacs.org, PLUMED support, neural network potential support, OpenMP parallelisation and HIP backend.
  1. DeePMD-kit integration into GROMACS, multi-node domain-decomposed GPU inference with strong- and weak-scaling measurements on A100 and MI250x.
  1. GROMACS 2026 documentation release notes, virtual link atoms, added model inputs and expanded backend support.
  1. LAMMPS project documentation, force-field coverage, custom potential support and the Kokkos GPU package, for cross-engine comparison.
  1. GROMACS and LAMMPS comparative analyses on biomolecular versus materials-science workload positioning and parallel efficiency.
  1. GROMACS licensing terms, GNU Lesser General Public License version 2.1, with linking and redistribution obligations.
Tags: