Skip to content

breaking(gmx): remove in-tree GROMACS patch integration#5377

Open
njzjz-bot wants to merge 4 commits intodeepmodeling:masterfrom
njzjz-bothub:fix/issue-5360-remove-gmx
Open

breaking(gmx): remove in-tree GROMACS patch integration#5377
njzjz-bot wants to merge 4 commits intodeepmodeling:masterfrom
njzjz-bothub:fix/issue-5360-remove-gmx

Conversation

@njzjz-bot
Copy link
Copy Markdown
Contributor

@njzjz-bot njzjz-bot commented Apr 5, 2026

Problem

  • The in-tree GROMACS patch has been unmaintained for years and is being deprecated in issue Deprecate the GROMACS patch #5360.
  • The repository still ships the source/gmx integration, install guides, and examples that make the removed workflow look officially supported.

Change

  • Delete the in-tree GROMACS patch implementation and remove the related CMake / labeler / example references.
  • Replace the old GROMACS install and usage docs with deprecation notices that point users to LAMMPS or the third-party implementation referenced from issue Deprecate the GROMACS patch #5360.
  • Clean up remaining mentions in README, troubleshooting docs, notebook text, and API comments.

Notes

  • Validation was limited to repository-wide reference cleanup, git diff --check, and JSON validation of doc/getting-started/quick_start.ipynb.
  • This PR intentionally removes the bundled GROMACS examples because they are no longer usable without the deleted in-tree patch.

Authored by OpenClaw (model: gpt-5.4)

Summary by CodeRabbit

  • Chores
    • In-tree GROMACS plugin support deprecated and removed from the main codebase
    • All in-repo GROMACS examples and example inputs removed
    • Repository labeling/configuration entries referencing GROMACS removed
  • Documentation
    • GROMACS install/use pages converted to deprecation notices and pointers to LAMMPS, i-PI, and third‑party integrations
    • Tutorials and README entries updated to remove in-tree GROMACS references
    • Added guidance documenting third‑party GROMACS interfaces and historical context

Remove the obsolete source/gmx tree, drop the related CMake wiring,
and replace the old GROMACS documentation with deprecation notices
that point users to LAMMPS or the third-party implementation linked
from issue deepmodeling#5360.

Also remove the bundled GROMACS-only examples and clean up residual
references in README, troubleshooting docs, labels, and API comments.

Authored by OpenClaw (model: gpt-5.4)
@njzjz njzjz requested a review from Copilot April 5, 2026 14:49
@dosubot dosubot bot added breaking change Breaking changes that should notify users. build labels Apr 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 13c14e63-d6ac-4ea7-a344-6cc921cfc778

📥 Commits

Reviewing files that changed from the base of the PR and between 42cbfe3 and 584f44b.

📒 Files selected for processing (5)
  • doc/install/install-gromacs.md
  • doc/third-party/gromacs.md
  • doc/third-party/out-of-deepmd-kit.md
  • doc/troubleshooting/installation.md
  • source/CMakeLists.txt
✅ Files skipped from review due to trivial changes (4)
  • doc/troubleshooting/installation.md
  • doc/install/install-gromacs.md
  • doc/third-party/out-of-deepmd-kit.md
  • doc/third-party/gromacs.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/CMakeLists.txt

📝 Walkthrough

Walkthrough

Removes the in-tree GROMACS integration: deletes GROMACS plugin sources, build rules, patches, patching utility, and GROMACS examples; updates docs and configs to deprecate/remove GROMACS references and point users to third‑party or LAMMPS/i-PI alternatives.

Changes

Cohort / File(s) Summary
Repository config
\.github/labeler.yml
Removed Gromacs labeler rule for source/gmx/**/*.
Top-level docs & README
AGENTS.md, README.md, doc/getting-started/quick_start.ipynb
Removed GROMACS from MD integration/code-structure mentions; LAMMPS/i-PI remain.
Installation docs & troubleshooting
doc/install/index.rst, doc/install/install-from-c-library.md, doc/install/install-gromacs.md, doc/troubleshooting/installation.md
Removed GROMACS TOC entry; converted install-gromacs to a deprecation notice; adjusted precompiled C-library and gcc guidance to reference i-PI/LAMMPS.
Third‑party / deprecation docs
doc/third-party/gromacs.md, doc/third-party/out-of-deepmd-kit.md
Replaced in-tree GROMACS workflow with deprecation banner and pointers to external third‑party integrations; added new third‑party GROMACS interface doc.
Examples — GROMACS
examples/methane/*, examples/water/gmx/*
Deleted GROMACS-specific example files (topologies, .gro, .mdp, input JSONs, scripts, raw index/type files).
Build system
source/CMakeLists.txt, source/gmx/CMakeLists.txt, source/gmx/.gitignore
Removed LIB_DEEPMD_GROMACS target and add_subdirectory(gmx/); updated compiler-version check to >= 4.8; un-ignored CMakeLists.txt.patch.
GROMACS plugin code & utility
source/gmx/include/gmx_plugin.h, source/gmx/src/gmx_plugin.cpp, source/gmx/dp_gmx_patch
Deleted plugin header/implementation and the dp_gmx_patch apply/revert utility.
GROMACS patches
source/gmx/patches/2020.2/*
Removed DeePMD integration fragments from GROMACS patch files (CMakeLists fragment and src patches like forcerec/sim_util).
API docs (comments)
source/api_cc/include/DeepPot.h, source/api_cc/include/DeepSpin.h
Removed GROMACS from Doxygen @note lists; no API signatures changed.
Misc docs/examples added
doc/third-party/out-of-deepmd-kit.md
Added section documenting an external GROMACS NNPot integration and its scope/limitations.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: removal of the in-tree GROMACS patch integration from DeePMD-kit. All changes across ~30 files are consistent with this objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@doc/install/install-gromacs.md`:
- Around line 9-10: Replace the deprecated directive token "next release" in the
deprecation block (:::{deprecated} next release) with the explicit target
release version used elsewhere (for example "3.0.0") so the notice matches other
deprecation notices; update the line that begins with :::{deprecated} to use the
chosen semantic version string.

In `@doc/third-party/gromacs.md`:
- Around line 9-10: Replace the ambiguous deprecation directive "{deprecated}
next release" in the GROMACS docs with a concrete version to match other files;
update the directive in the locations referencing GROMACS (the "{deprecated}
next release" occurrences in gromacs.md and install-gromacs.md) to a specific
version string such as "{deprecated} 3.0.0" (or the actual first version where
removal applies) so the deprecation marker is consistent with "{deprecated}
3.0.0" used elsewhere.

In `@source/CMakeLists.txt`:
- Around line 490-492: The status message claiming "use gcc/g++ >= 4.8" is
inconsistent with the actual guard that uses VERSION_GREATER 4.8 for the ipi/
subdirectory (and md/ is commented out), so update the build logic to match the
message: change the ipi/ gate from VERSION_GREATER 4.8 to VERSION_GREATER_EQUAL
4.8 (or alternatively change the message to state "> 4.8"); locate the
VERSION_GREATER check that controls the ipi/ add_subdirectory and make it use
VERSION_GREATER_EQUAL 4.8 so gcc/g++ 4.8 exactly will enable the i-PI driver as
the message promises.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e093532d-03b6-4a73-9a70-b9122b4e59ec

📥 Commits

Reviewing files that changed from the base of the PR and between b02fd91 and 7769e98.

⛔ Files ignored due to path filters (1)
  • examples/water/gmx/rdf.png is excluded by !**/*.png
📒 Files selected for processing (37)
  • .github/labeler.yml
  • AGENTS.md
  • README.md
  • doc/getting-started/quick_start.ipynb
  • doc/install/index.rst
  • doc/install/install-from-c-library.md
  • doc/install/install-gromacs.md
  • doc/third-party/gromacs.md
  • doc/third-party/index.rst
  • doc/troubleshooting/installation.md
  • examples/methane/index.raw
  • examples/methane/input.json
  • examples/methane/lig_solv.gro
  • examples/methane/md.mdp
  • examples/methane/methane.itp
  • examples/methane/run.sh
  • examples/methane/topol.top
  • examples/methane/type.raw
  • examples/water/gmx/index.raw
  • examples/water/gmx/input.json
  • examples/water/gmx/md.mdp
  • examples/water/gmx/md.sh
  • examples/water/gmx/type.raw
  • examples/water/gmx/water.gro
  • examples/water/gmx/water.top
  • source/CMakeLists.txt
  • source/api_cc/include/DeepPot.h
  • source/api_cc/include/DeepSpin.h
  • source/gmx/.gitignore
  • source/gmx/CMakeLists.txt
  • source/gmx/dp_gmx_patch
  • source/gmx/include/gmx_plugin.h
  • source/gmx/patches/2020.2/CMakeLists.txt.patch.in
  • source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.cpp.patch
  • source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.h.patch
  • source/gmx/patches/2020.2/src/gromacs/mdlib/sim_util.cpp.patch
  • source/gmx/src/gmx_plugin.cpp
💤 Files with no reviewable changes (27)
  • doc/install/index.rst
  • source/gmx/.gitignore
  • doc/third-party/index.rst
  • examples/methane/index.raw
  • examples/methane/input.json
  • examples/water/gmx/index.raw
  • .github/labeler.yml
  • examples/methane/type.raw
  • examples/water/gmx/input.json
  • examples/water/gmx/type.raw
  • examples/methane/lig_solv.gro
  • source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.h.patch
  • examples/methane/md.mdp
  • examples/methane/run.sh
  • examples/methane/methane.itp
  • source/gmx/patches/2020.2/CMakeLists.txt.patch.in
  • examples/water/gmx/md.mdp
  • examples/methane/topol.top
  • examples/water/gmx/md.sh
  • examples/water/gmx/water.gro
  • source/gmx/src/gmx_plugin.cpp
  • source/gmx/CMakeLists.txt
  • examples/water/gmx/water.top
  • source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.cpp.patch
  • source/gmx/patches/2020.2/src/gromacs/mdlib/sim_util.cpp.patch
  • source/gmx/include/gmx_plugin.h
  • source/gmx/dp_gmx_patch

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Removes the repository’s in-tree GROMACS patch/plugin integration and updates documentation/examples to reflect deprecation and point users to supported alternatives.

Changes:

  • Deletes the source/gmx build/patch implementation and related patch assets.
  • Removes GROMACS example inputs and updates build system / labeler configuration accordingly.
  • Replaces GROMACS install/usage docs with deprecation notices and cleans up remaining references across docs/README/notebooks.

Reviewed changes

Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
source/gmx/src/gmx_plugin.cpp Removes the GROMACS plugin implementation source file.
source/gmx/patches/2020.2/src/gromacs/mdlib/sim_util.cpp.patch Deletes the bundled GROMACS patch hunk for force/energy integration.
source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.h.patch Removes patch for Deepmd globals/hooks in GROMACS headers.
source/gmx/patches/2020.2/src/gromacs/mdlib/forcerec.cpp.patch Removes patch for initializing DeePMD integration in GROMACS.
source/gmx/patches/2020.2/CMakeLists.txt.patch.in Removes patch template that injected DeePMD linking into GROMACS CMake.
source/gmx/include/gmx_plugin.h Deletes in-tree public header for the GROMACS plugin.
source/gmx/dp_gmx_patch Removes the helper script used to patch/revert GROMACS sources.
source/gmx/CMakeLists.txt Removes the CMake subproject that built/installed the GROMACS plugin.
source/gmx/.gitignore Removes ignore rule used for generated patch files (no longer needed).
source/api_cc/include/DeepSpin.h Updates API comment to drop GROMACS as a stated consumer.
source/api_cc/include/DeepPot.h Updates API comment to drop GROMACS as a stated consumer.
source/CMakeLists.txt Removes GROMACS plugin build hooks/vars from the main build.
examples/water/gmx/water.top Deletes GROMACS example topology.
examples/water/gmx/water.gro Deletes GROMACS example coordinates.
examples/water/gmx/type.raw Deletes GROMACS example type mapping.
examples/water/gmx/md.sh Deletes GROMACS example run script.
examples/water/gmx/md.mdp Deletes GROMACS example mdp parameters.
examples/water/gmx/input.json Deletes GROMACS example DeePMD input config.
examples/water/gmx/index.raw Deletes GROMACS example atom indices file.
examples/methane/type.raw Deletes methane example type mapping (GROMACS-related).
examples/methane/topol.top Deletes methane GROMACS topology wrapper.
examples/methane/run.sh Deletes methane GROMACS run script.
examples/methane/methane.itp Deletes methane GROMACS itp.
examples/methane/md.mdp Deletes methane GROMACS mdp.
examples/methane/lig_solv.gro Deletes methane GROMACS coordinate file.
examples/methane/input.json Deletes methane DeePMD input config used by GROMACS workflow.
examples/methane/index.raw Deletes methane GROMACS atom indices file.
doc/troubleshooting/installation.md Updates troubleshooting text to remove GROMACS mention.
doc/third-party/index.rst Removes GROMACS page from third-party docs toctree.
doc/third-party/gromacs.md Replaces the GROMACS guide with a deprecation notice page.
doc/install/install-gromacs.md Replaces GROMACS install guide with a deprecation notice page.
doc/install/install-from-c-library.md Removes “GROMACS patch” references; links to deprecation notice for context.
doc/install/index.rst Removes GROMACS install page from install docs toctree.
doc/getting-started/quick_start.ipynb Removes GROMACS mention from the quick start notebook narrative.
README.md Removes GROMACS from the list of integrated MD packages and repo structure.
AGENTS.md Updates project description to remove GROMACS integration mention.
.github/labeler.yml Removes the “Gromacs” label rule tied to source/gmx/**.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Adjust the GROMACS deprecation messaging to keep the external support
story visible while making it clear that the in-tree patch was removed in
v3.2.0.

Also restore the third-party GROMACS page in the docs navigation and add
a concise overview of the externally maintained GROMACS NNPot-based
integration reported in arXiv:2602.02234, including its demonstrated
capabilities and current scope limits.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.4)
Do not single out GROMACS as a third-party integration in the README
feature list, since several listed interfaces are also maintained outside
the DeePMD-kit repository.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.4)
@njzjz njzjz changed the title build(cmake): remove in-tree GROMACS patch integration breaking(gmx): remove in-tree GROMACS patch integration Apr 5, 2026
Refine the GROMACS-related documentation to read like software manual
content rather than a paper summary, while keeping the third-party
pointer and scope notes useful for users.

Also fix the gcc 4.8 boundary inconsistency by aligning the CMake i-PI
guard with the documented threshold in troubleshooting.

Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.4)
@njzjz njzjz linked an issue Apr 5, 2026 that may be closed by this pull request
@njzjz njzjz added this to the v3.2.0 milestone Apr 5, 2026
@njzjz njzjz requested review from iProzd and wanghan-iapcm April 5, 2026 15:56
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.37%. Comparing base (b02fd91) to head (584f44b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5377      +/-   ##
==========================================
- Coverage   82.37%   82.37%   -0.01%     
==========================================
  Files         812      812              
  Lines       83560    83560              
  Branches     4091     4090       -1     
==========================================
- Hits        68832    68829       -3     
  Misses      13507    13507              
- Partials     1221     1224       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

breaking change Breaking changes that should notify users. build C++ Docs Examples Gromacs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the GROMACS patch

3 participants