Repository navigation
Check per-atom forces and strain through metatomic-core - #1
Closed
EricBoittier wants to merge 7 commits into
Closed
EricBoittier wants to merge 7 commits into
EricBoittier wants to merge 7 commits into
Conversation
Add the --enable-libmetatomic-core configure option, which probes the metatomic-core C++ API (metatomic::load_model / metatomic::execute_model) and links libmetatomic and libmetatensor without requiring libtorch. It defines __PLUMED_HAS_LIBMETATOMIC_CORE and the libmetatomic_core config key. Add regtest/metatomic/rt-core, a two-atom distance model written as a metatomic.NumpyModel Python script and loaded through metatomic's Python plugin, with explicit positions and strain gradients. The second frame crosses the periodic boundary. Document plugin models in the METATOMIC action and the module page, recommending Python NumpyModel scripts and linking PLUMED against the libmetatomic shipped in the metatomic-core Python package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rename metatomic.cpp to MetatomicAction.cpp so MetatomicAction.h has a companion source (plmd_non_existing_cpp / plmd_non_included_h) - value-initialise VesinOptions so `sorted` is no longer read uninitialised (cppcheck uninitvar) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`sorted` was never set, so vesin read an uninitialised bool (cppcheck uninitvar). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EricBoittier
force-pushed
the
EricBoittier/metatomic-capi-update
branch
2 times, most recently
from
October 26, 2026 10:36
cc4d525 to
ebd42f7
Compare
Owner
Author
|
Closing: staging PR, the work continues in plumed#1510. |
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.
Fix sample-label iteration, which used iterators from different temporary vectors.
Add numerical checks for per-atom forces and all nine strain components, including reordered samples, selected atoms, and missing gradients. Add a focused Linux CI job.
Local checks pass: maximum errors are 3.6e-8 for forces and 7.7e-8 for strain. This is the first PR in the stack.