Skip to content

fix(mlpot): gate CHARMM-path lattice virial behind its own experimental opt-in; log perf switches - #8

Merged
EricBoittier merged 2 commits into
mainfrom
fix/gate-charmm-lattice-virial-and-log
Nov 18, 2026
Merged

EricBoittier merged 2 commits into
mainfrom
fix/gate-charmm-lattice-virial-and-log

Conversation

@EricBoittier

Copy link
Copy Markdown
Owner

Summary

  • perf(npt): opt-in analytic ML lattice strain virial, persistent compile cache, timing hooks #7 also wired the analytic ML lattice virial into the CHARMM CPT path (hybrid_mlpot.forward_vir_fn), where it was never timed or validated (only JAX-MD was). That use now needs its own opt-in KARML_CHARMM_LATTICE_VIRIAL=1, which warns "EXPERIMENTAL and not validated"; KARML_ML_LATTICE_VIRIAL alone no longer touches CHARMM. Default path unchanged.
  • md-system prints one perf switches: line (strain virial path, ML lattice virial, CHARMM-path switch, chunk remat) so reported runs record them.
  • Validation of the CHARMM path on a stored acetone/DCM frame (1e-8 float64, 0.1 atm float32, 100-step timed CPT run) was not possible in this session (needs a CHARMM build and GPU); it stays a release blocker for enabling that opt-in.

Tests

tests/unit/test_charmm_lattice_virial_gate.py (4) plus test_opt_in_defaults.py (3): 7 passed on CPU; ruff clean.

🤖 Generated with Claude Code

EricBoittier and others added 2 commits November 18, 2026 21:23
…_CHARMM_LATTICE_VIRIAL (experimental); log active perf switches

The CHARMM CPT wiring merged in #7 was never timed or validated, so KARML_ML_LATTICE_VIRIAL (JAX-MD path) no longer reaches it.
md-system prints one line recording virial path, lattice virial, CHARMM-path switch and chunk remat.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@EricBoittier
EricBoittier merged commit 3867803 into main Nov 18, 2026
9 of 10 checks passed
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