Skip to content

Standardize on CHGNet-PES-MatPES-*-1M-2026.9 and refresh MatGL recommendations - #53

Merged
bowen-bd merged 4 commits into
learningmatter-mit:mainfrom
bowen-bd:chore/chgnet-1m-2026.9
Oct 11, 2026
Merged

bowen-bd merged 4 commits into
learningmatter-mit:mainfrom
bowen-bd:chore/chgnet-1m-2026.9

Conversation

@bowen-bd

@bowen-bd bowen-bd commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Standardizes AtomisticSkills on the current CHGNet checkpoints, CHGNet-PES-MatPES-PBE-1M-2026.9 and CHGNet-PES-MatPES-r2SCAN-1M-2026.9, which are already the matgl 4.1 and matgl_server defaults. CHGNet-MPtrj-2023.12.1-2.7M-PES no longer loads in matgl 4, and its data and mentions are removed. Examples, reference data and docs that used the earlier MatPES checkpoint (2025.2.10) now use 1M-2026.9; the code still accepts the older names.

Model lists and recommendations now point to the current MatGL checkpoints (CHGNet 1M-2026.9 and TensorNet). This covers the MCP load_model description, the environment rules, the skill standards, the developer guide, the site and the skill docs.

Changes

  • Defaults: MatGLWrapper defaults to CHGNet-PES-MatPES-PBE-1M-2026.9; the CHGNet tests use it.
  • mat-elemental-energies: new 89-element libraries for both 1M-2026.9 checkpoints, using the library protocol. Neither collapses the O₂ molecular crystal. Superseded library files are removed. The example now compares CHGNet r2SCAN with MP r2SCAN: MAE 38.1 meV/atom.
  • mat-pourbaix-diagram:
    • H₂O references for the new CHGNet.
    • Na–Ni example re-run with CHGNet r2SCAN: NiO formation energy −1.18 eV/atom, against MP r2SCAN −1.10 and GGA+U −1.22.
  • ml-mlip-benchmark: CHGNet example re-run on the same 100 MP r2SCAN structures. Energy MAE (meV/atom): MACE-MATPES-R2SCAN-0 73.7, CHGNet r2SCAN 1M 77.5, TensorNet r2SCAN 88.3.
  • ml-mlip-nvalchemi: batched vs sequential static inference re-measured for both new checkpoints. ΔF = 0, ΔE ≤ 9.5e-7 eV; speedup 3.4× at N = 5 and 10.7–10.9× at N = 20.
  • ml-mlip-speed: stored benchmark updated, and a measured CHGNet 1M entry added (0.107 ms/atom at 2000 atoms); plots regenerated.
  • ml-property-predictor:
    • The MatGL path uses a CHGNet backbone, and a dataset script is added.
    • The bulk-modulus example was re-run: validation MAE 20.8 GPa against a 56.9 GPa mean-value baseline; 19.0 GPa (R² = 0.88) on the held-out test split.
    • Model checkpoints are no longer committed in the example folder.
  • ml-matgl-finetune: WBM example re-run with the new CHGNet (10 epochs, frozen backbone). Energy RMSE goes from 382.2 to 328.8 meV/atom, force MAE from 154.6 to 146.3 meV/Å and stress MAE from 4.97 to 3.66 meV/ų; energy MAE rises from 241.3 to 250.6 meV/atom. A fresh-process reload of the saved checkpoint reproduces the fine-tuned prediction.
  • mat-sample-pes-by-md: LiMnO₂ example re-run with the new CHGNet.
  • mat-lammps-md: the input file and run-script default now use the new CHGNet. Not re-run: it needs a MatGL ML-IAP LAMMPS build.
  • mat-dft-mixing-functionals: the "no correction needed" case uses the current CHGNet.
  • Warnings and links: warnings about MPtrj-trained models now cite MACE-MP. Fixes a broken link from ml-foundation-potentials to mat-dft-mixing-functionals.

Fixes found while re-running

  • mat-pourbaix-diagram:
    • calculate_pourbaix.py looked for elemental references under the pre-rename skills/elemental-energies/ path.
    • get_pourbaix_structures.py failed on the EntryID objects returned by newer mp_api.
  • ml-matgl-finetune: train_matgl.py is ported to matgl 4.1. This covers the MGLDataset arguments, the device of element_refs, memory pinning, and inference_mode=False for force validation.
  • ml-property-predictor:
    • run_matgl.py's reload check read a result key that does not exist.
    • Per-atom normalization broadcast predictions of shape [B] against atom counts of shape [B, 1] into a [B, B] matrix, so the training loss and validation metrics were wrong for batches with unequal atom counts. Predictions are now 1-D, and validation errors are weighted by structure (regression test added).
    • A failed pretrained-model load now raises an error instead of falling back to a freshly initialized model.
  • ml-matgl-finetune metrics and checkpoint:
    • The history callback divided matgl's per-atom energy MAE/RMSE by the mean atom count a second time.
    • The saved checkpoint now uses model_state_dict, the key MatGLWrapper.load_checkpoint() reads.

Testing

  • venv/run cpu python -m pytest tests/test_*.py -q: 1082 passed, 5 skipped.
  • venv/run mlip python -m pytest tests/matgl -q (CPU): 47 passed, including the new batching test.
  • Pre-commit hooks and tools/check_skill_commands.py pass.
  • Re-run on an NVIDIA GB10: the elemental-energy libraries, the Pourbaix, benchmark, nvalchemi, speed, property-predictor, fine-tuning and PES-sampling examples.

🤖 Generated with Claude Code

bowen-bd and others added 4 commits October 10, 2026 19:49
…*-1M-2026.9

The model lists agents read (MCP load_model description, environment
rules, skill standards, developer guide, site) and the skill
recommendations now list the current MatGL checkpoints, CHGNet
1M-2026.9 and TensorNet. CHGNet-MPtrj-2023.12.1 no longer loads in
matgl 4, so warnings about MPtrj-trained models cite MACE-MP instead.
MatGLWrapper defaults to CHGNet-PES-MatPES-PBE-1M-2026.9, and the CHGNet
tests use that checkpoint.

The MP2020 example's 'no correction needed' case now uses the current
CHGNet; fixes the ml-foundation-potentials link to mat-dft-mixing-functionals.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…M-2026.9

- mat-elemental-energies: new CHGNet PBE/r2SCAN 1M-2026.9 libraries; drop
  the CHGNet-MPtrj, CHGNet-MatPES-2025.2.10 and other superseded files.
- mat-pourbaix-diagram: H2O references for the new CHGNet, example re-run;
  fix the elemental-energies library path and mp_api EntryID handling.
- ml-mlip-benchmark, ml-mlip-speed, ml-mlip-nvalchemi: re-measured with the
  new CHGNet; outdated model rows, plots and list entries removed.
- ml-property-predictor: MatGL path uses a CHGNet backbone; adds the
  dataset script; model checkpoints are no longer kept in the example.
- ml-matgl-finetune: ported train_matgl.py to matgl 4.1 and re-ran the WBM
  example with the new CHGNet.
- mat-sample-pes-by-md, mat-lammps-md: examples and defaults use the new
  CHGNet (LAMMPS example not re-run).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ighted validation

CHGNet returns one value per graph with shape [B]; dividing by atom counts
of shape [B, 1] broadcast predictions to [B, B], so the training loss and
validation MSE/MAE used the wrong quantity for batches with unequal atom
counts. Predictions and counts are now 1-D, and validation errors are
summed per structure and divided by the number of structures. A failed
pretrained-model load now raises instead of falling back to a freshly
initialized CHGNet, which cannot be built for intensive targets. Adds a
batched-vs-individual regression test and re-runs the bulk-modulus example
(validation MAE 20.8 GPa vs a 56.9 GPa mean-value baseline).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oint

matgl 4.1 already reports Energy_MAE/RMSE per atom, so the history
callback's extra division by the mean atom count understated energy
errors. The saved checkpoint now stores the potential under
model_state_dict, the format MatGLWrapper.load_checkpoint() reads; the
example verifies a fresh-process reload reproduces the fine-tuned
prediction. WBM example re-run: zero-shot energy MAE 241.3 meV/atom.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bowen-bd
bowen-bd merged commit 6afdd46 into learningmatter-mit:main Oct 11, 2026
7 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