Repository navigation
fix(lammps): support current Modify and style registration APIs - #6149
Zhang-pchao wants to merge 3 commits into
Conversation
for more information, see https://pre-commit.ci
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
njzjz-bot
left a comment
There was a problem hiding this comment.
Found one build-compatibility gap in the Modify feature guard between the tested releases.
Agent: dot
|
|
||
| // LAMMPS 13 Nov 2026 removed the public fix and compute arrays. | ||
| inline LAMMPS_NS::Compute* get_compute(LAMMPS_NS::Modify* modify, | ||
| const std::string& id) { |
There was a problem hiding this comment.
This date is later than the API transition on upstream develop. At the Oct 29 upstream merge, version.h still says 30 Sep 2026, but Modify already exposes only the new lookup interface. This helper selects the fallback and references missing find_compute/find_fix and compute/fix members. The 12 Nov release-candidate checkout dcbe0b58fccf has the same mismatch. The by-ID accessors also exist on stable_22Jul2025; could we select them by API availability (keeping the fallback only for genuinely older headers) and compile one transition snapshot?
There was a problem hiding this comment.
Thanks for catching this. In 1e12f26 the helper uses the by-ID accessors whenever the headers provide them. I reproduced the failure on 5f0288a and dcbe0b58fccf, then checked that both affected source files compile against both snapshots with the fix. I also verified that stable_29Sep2021 still selects the legacy lookup.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6149 +/- ##
==========================================
- Coverage 78.09% 77.81% -0.28%
==========================================
Files 1214 1215 +1
Lines 147782 147766 -16
Branches 5246 5234 -12
==========================================
- Hits 115410 114988 -422
- Misses 30392 30797 +405
- Partials 1980 1981 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Current LAMMPS development headers no longer expose the internal
Modifyfix and compute arrays used by the DeePMD integration. The built-in integration also needs to regenerate the new style-registration source files; otherwise it compiles but LAMMPS does not recognizepair_style deepmd.This patch adds a small compatibility helper that uses the public by-ID accessors when the LAMMPS headers provide them and falls back to the legacy lookup otherwise. It updates the affected pair and parameter-derivative code paths, including TTM fix lookup. The built-in CMake integration regenerates style sources when LAMMPS provides that command.
The parameter tests now use the supported LAMMPS Python interface. Five cases cover default and explicit parameters, fix/compute parameter sources, atomic parameters, and finite-difference checks of parameter derivatives. Python PyTorch is initialized before native inference in the test setup.
This change is based directly on master and does not require #6053, #6054 or #6055. It does not change Kokkos header discovery addressed in #6054.
Validation:
06428256f980b63d014d81b9ad973a6141976a1busing the documented built-in integration, without the PIMD coupling patch.Summary by CodeRabbit