Add Al example for symplectic integrator#44
Draft
johannes-spies wants to merge 4 commits into
Draft
Conversation
Self-contained example showing data preparation, model training, and NVE dynamics with both plain FlashMD and the symplectic integrator via i-PI. Includes a test that runs the example end-to-end with EMT and tiny models. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use metatrain from git main until experimental.flashmd_symplectic is released on PyPI (TODO: pin to a release once available) - Update ipi import: ipi.utils.scripting → ipi.scripting - Add ipi, tqdm, pyyaml to test deps - Suppress known deprecation/resource warnings in pytest config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Save mlip.pt with upet.save_upet() instead of the private _model.save() call, which produced a raw TorchScript file that metatomic's load_atomistic_model() cannot read - Disable energy rescaling (rescale_energy=False) to avoid a NaN crash when the model is undertrained and predicts energy gains exceeding the kinetic energy - Reduce default epoch count from 100 to 25 and step counts to values that complete quickly on CPU - Update simulation-template.xml and test string replacements to match the new CPU-only, mlip.pt-based setup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The pinned metatrain version always includes experimental.flashmd_symplectic, so the conditional dead code never ran. Drop the flag, the fallback code path, and the now-unused find_all_architectures import. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Adds a self-contained Al example demonstrating the full workflow for the symplectic integrator introduced in #43:
Also includes
tests/test_example_al.py, which runs the example end-to-end in CI using EMT and tiny models.This PR should be merged after #43.