Repository navigation
GROMACS 2025/2026 patches: follow-up of #1506 (constraint virial with MTS, shells in reruns and with ENERGY, rerun stop, docs) - #1509
Merged
carlocamilloni merged 3 commits intoOct 15, 2026
Conversation
…normal force buffer When PLUMED needs the energy, it applies its forces after the force calculation, and with multiple time stepping to the combined MTS buffer, which the update uses. On the slow steps that compute the virial, GROMACS computes the constraint virial from the normal buffer (and writes it to the trajectory), which then lacked the part of PLUMED's forces that the constraints pass on: e.g. 2.7, -0.5 and 3.8 kJ/mol on the virial of a restraint between two water oxygens, against the GROMACS pull code. The difference PLUMED made to the combined buffer is now added to the normal one too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h ENERGY, and the stop of reruns - Reruns now call prepareStep() too, and a call is "repeated" when PLUMED already calculated since the last prepareStep(), not on the same step number (frames of a rerun can share it). With shells, reruns then update PLUMED once per frame, as MD does, instead of on each iteration of the shell relaxation, as step 1. - PLUMED updates on the first force calculation of the step, before the shells are relaxed. When the input needs the energy, that energy is the one before the relaxation: mdrun now prints a warning, once. - A rerun stops after the frame on which PLUMED asks for it, as with the GROMACS 2020-2024 patches, instead of after the next one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The table now notes that GROMACS 2026.0-2026.3 without patches stop with more than one MPI rank, that ENERGY and the checkpoint data need the legacy simulator with md-vv (GMX_DISABLE_MODULAR_SIMULATOR=1), that with MTS the energy is available on the slow steps only, and the limitation of shells with ENERGY. Multiple walkers through files also work without patches: the row is about simulations that communicate through MPI. - CHANGES and patch descriptions: after a stop request, mdrun runs one more step after the next communication of signals, which between simulations happens every 200 steps or more; \ref links for the doxygen manual of v2.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
Regression tests for GROMACS, and GROMACS 2024, 2025 and 2026
plumed-testcenter/plumed-testcenter#95
Merged
invemichele-peptone
added a commit
to invemichele-peptone/plumed2
that referenced
this pull request
Oct 15, 2026
A table in the list of MD codes of the master manual compares the PLUMED module of GROMACS 2025 and later with the patches for GROMACS 2025/2026 and for GROMACS 2024 (ENERGY, multiple simulations through MPI, checkpoints, stop requests, shells, replica exchange, lambda dynamics), as tested by the regression tests of the PLUMED testcenter, with notes on the limitations. It replaces the sentence that suggested the patch for GROMACS 2025/2026 for replica exchange and lambda dynamics, which only the patch for GROMACS 2024 has. v2.10 has the same table in user-doc/Introduction.md (plumed#1506, plumed#1509). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carlocamilloni
pushed a commit
that referenced
this pull request
Oct 15, 2026
A table in the list of MD codes of the master manual compares the PLUMED module of GROMACS 2025 and later with the patches for GROMACS 2025/2026 and for GROMACS 2024 (ENERGY, multiple simulations through MPI, checkpoints, stop requests, shells, replica exchange, lambda dynamics), as tested by the regression tests of the PLUMED testcenter, with notes on the limitations. It replaces the sentence that suggested the patch for GROMACS 2025/2026 for replica exchange and lambda dynamics, which only the patch for GROMACS 2024 has. v2.10 has the same table in user-doc/Introduction.md (#1506, #1509). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up of #1506, which was merged while I was still running a last review. That review found a few more problems in the GROMACS 2025/2026 patches, and some details of the docs to correct. The fixes for the GROMACS 2020-2024 patches are in the follow-up for v2.9 (#1508); both can reach master with the merges of v2.10, as #1505 and #1506 did.
Constraint virial with multiple time stepping
When PLUMED needs the energy, it applies its forces after the force calculation; with MTS, to the combined buffer, which the update uses. On the slow steps that compute the virial, GROMACS computes the constraint virial from the normal buffer, and writes that one to the trajectory. So the constraint virial lacked the part of PLUMED's forces that the constraints pass on. The difference PLUMED made to the combined buffer is now added to the normal one too.
Shells
prepareStep(), so with shells PLUMED still updated on each iteration of the shell relaxation, as step 1. Reruns now call it. A call is "repeated" when PLUMED already calculated since the lastprepareStep(), rather than when it has the same step number: the frames of a rerun can share one, which is why this was limited to MD.md.cpp, and shells are rarely used with PLUMED, so mdrun now prints a warning (once) when PLUMED needs the energy with shells. The docs say so too.Reruns stop at the frame that asks
A stop request (e.g. COMMITTOR) in a rerun was acted on at the start of the next frame, which was then fully processed. Now the rerun stops after the frame on which PLUMED asks, as with the GROMACS 2020-2024 patches.
Docs
GMX_DISABLE_MODULAR_SIMULATOR=1);WALKERS_MPI). Walkers that share files also work without patches.\reflinks instead of the markdown links of the master manual.Target release
I would like my code to appear in release v2.10
Type of contribution
Copyright
COPYRIGHTfile with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulenamein order to make sure the headers of the module are correct.Tests
With the regression tests of plumed-testcenter/plumed-testcenter#95, updated for these cases (the virial at step 0 within 0.1 kJ/mol and the forces with MTS; a rerun of unrelaxed shells; the warning; the rerun stopping at the frame that commits):
pull-mts,shellsandrerun.🤖 Generated with Claude Code