Skip to content

Fix GROMACS 2025 checkpoint notification ordering#1430

Open
DrDomenicoMarson wants to merge 1 commit into
plumed:v2.10from
DrDomenicoMarson:gromacs-2025-checkpoint-order
Open

Fix GROMACS 2025 checkpoint notification ordering#1430
DrDomenicoMarson wants to merge 1 commit into
plumed:v2.10from
DrDomenicoMarson:gromacs-2025-checkpoint-order

Conversation

@DrDomenicoMarson

Copy link
Copy Markdown
Description

Summary

Fix the ordering of checkpoint notifications in the GROMACS 2025 integration.

The existing checkpoint callback is delivered while GROMACS writes the checkpoint, after PLUMED has performed its calculation for that step. Consequently, actions such as OPES_METAD using STATE_WFILE without STATE_WSTRIDE can write state data for a different step than state.cpt.

I found the problem, and here I'm trying to propose a fix, with the help of a coding agent as my expertise ends with Python... If the fix is not good enough I hope the PR will raise awareness of the problem.

This change:

  • Adds an internal checkpoint-step notification before force calculation.
  • Passes the status to PlumedForceProvider before performCalc.
  • Retains the existing callback as a fallback for the modular simulator.
  • Suppresses the late callback when early notifications are available.

No public PLUMED API or OPES behavior is changed.

Validation

Using GROMACS 2025.0 and checkpoint-only OPES state output:

  • Before the fix: OPES state time was 0.044 ps, while state.cpt was at 0.080 ps.
  • After the fix with md: both were at 0.080 ps.
  • After the fix with modular md-vv: both were at 0.080 ps.

The regenerated directory-format patch was also checked for clean application and reversion. PLUMED and patched GROMACS builds, a serial OPES smoke test, and git diff --check passed.

This is a follow-up to #1428.

Target release

I would like my code to appear in release 2.10.1

Type of contribution
  • changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
  • changes to a module not authored by you
  • new module contribution or edit of a module authored by you
Copyright
  • I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
Tests
  • I added a new regtest or modified an existing regtest to validate my changes.
  • I verified that all regtests are passed successfully on GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant