You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disk-backed PyG training for datasets larger than memory.write_mgl_shards streams records into versioned,
transactional CPU shards; MGLDiskDataset loads one shard per worker on demand; and ShardBatchSampler keeps
batches shard-local while assigning disjoint shards and equal step counts to distributed ranks. MGLDataLoader
now selects this path automatically for disk datasets without changing its existing in-memory behavior. MGLDataModule provides Lightning fit/validate/test/predict loaders with deterministic epoch shuffling,
multiworker support, automatic MatGL collation, and optional on-the-fly graph conversion. Rebuild failures retain
the prior committed manifest and clean up incomplete shards, while successful rebuilds remove superseded shards.
A runnable QET notebook demonstrates sharded dataset creation, Lightning training, and per-graph QEq charge
conservation.
Improved PyG command-line workflows.mgl train now trains or fine-tunes interatomic potentials from local
MatPES-shaped JSON/JSONL or Extended XYZ data through MGLDatasetLoader and MGLPotentialTrainer; mgl evaluate
evaluates a saved potential with force/stress autograd enabled. Extended XYZ input supports periodic structures
and nonperiodic molecules, standard or user-selected label keys, and TensorNet scratch training. The JSON loader
accepts both current record-oriented MatPES files and the aggregate structures/outputs shape used by the
earlier CLI prototype. Multi-frame Extended XYZ input is also supported by mgl predict, mgl relax, and mgl md, with per-frame predictions, trajectory-preserving relaxation output, and one MD run per frame.
The training and evaluation commands support
Lightning accelerator/device selection, optional charge or magnetic-moment targets, dataset caching, and explicit
stress units. Relaxation now exposes the
ASE optimizer, cell-relaxation toggle, force threshold, and step limit. Model arguments accept local save paths,
parser construction no longer queries the model registry, and MD boolean/mask arguments use unambiguous parsers.
New: Release of compact ~1M parameter CHGNet MatPES models. Released lightweight (1,083,842 parameter)
CHGNet foundation potentials for both PBE (materialyze/CHGNet-PES-MatPES-PBE-1M-2026.9) and r2SCAN
(materialyze/CHGNet-PES-MatPES-r2SCAN-1M-2026.9) trained on the official MatPES 2025.2 dataset. These are now
the default CHGNet models; the 2.7M materialyze/CHGNet-PES-MatPES-{PBE,r2SCAN}-2025.2.10 checkpoints remain available. Despite having
~2.5× fewer parameters than the standard 2.7M architecture, these compact models achieve strong train, validation, and test MAEs across
energy (test: 26.72 meV/atom PBE, 27.45 meV/atom r2SCAN; val: 25.60 meV/atom PBE, 28.00 meV/atom r2SCAN; train: 22.58 meV/atom PBE, 25.46 meV/atom r2SCAN),
forces (test: 110.53 meV/Å PBE, 137.58 meV/Å r2SCAN; val: 111.00 meV/Å PBE, 141.18 meV/Å r2SCAN; train: 86.75 meV/Å PBE, 112.27 meV/Å r2SCAN),
and stresses (test: 0.6010 GPa PBE, 0.7094 GPa r2SCAN; val: 0.6060 GPa PBE, 0.7187 GPa r2SCAN; train: 0.4852 GPa PBE, 0.6343 GPa r2SCAN).
Fix: M3GNet three-body messages were routed to the wrong bonds whenever threebody_cutoff < cutoff. create_line_graph / create_line_graph_torch enumerated triplets on the bond list pruned to threebody_cutoff, but ThreeBodyInteractions used those indices directly against parent-graph tensors, so
each triplet took atom k and the cutoff weights f_c(r_ij) f_c(r_ik) from the wrong bonds and was scattered
onto the wrong bond. This affected every MatGL release since v0.1.0 (DGL and PyG backends, and the LAMMPS export) with the
default 5 Å / 4 Å cutoffs; models with threebody_cutoff == cutoff were unaffected. New M3GNet MatPES models have been refitted and released.
Fix: CHGNet three-body geometry autograd detachment (#834). Continuous line-graph geometry features
(lg_bond_vec and lg_bond_dist) were previously sliced under torch.no_grad(), causing three-body angular
contributions to forces and stresses to be detached from autograd. Discrete graph topology is now isolated
in torch.no_grad() while coordinate slicing preserves gradient tracking (@wakamiya0315, @bowen-bd).
Fix: Line-graph periodic self-image supercell invariance (#839). Periodic self-image bonds meeting
at a central atom in small unit cells were previously filtered and signed inconsistently in the line graph,
causing a discrepancy between unit cell and supercell representations. Simplified edge connection logic
and consistent bond vector inversion ensure exact supercell invariance across all cell dimensions. Updated
the published 1M CHGNet PBE and r2SCAN models on Hugging Face Hub with the fix.
Fix: Multi-GPU DDP training metric device mismatch and cache race condition. Fixed an issue where dummy
metric tensors in PotentialLightningModule.loss_fn were constructed on CPU, causing NCCL sync_dist=True to
crash, and guarded dataset cache directory cleanup in MGLDataset against multi-rank race conditions.
LAMMPS pair_matgl fixes and speed-up (#825, #828, #831). The CMake snippets now register the matgl and matgl/kk pair styles, link libtorch directly for Kokkos, and no longer hardcode cluster-specific
export paths (overridable via MATGL_PYTHON / MATGL_EXPORT_SCRIPT). Exported TorchScript models now run on
GPU, Kokkos CUDA kernels compile against the current Kokkos view API, and the CPU virial sign is corrected
(validated against finite-difference pressure). Node buffers are sized to local atoms only, which removes
ghost-row embedding. Model-node work drops 3.00× at 32 Å, and end-to-end runs are 1.38–1.71× faster.
Fix: smooth spherical-Bessel basis precision (#826, #832).SphericalBesselFunction(smooth=True) built its
constants in the ambient default dtype and spherical_bessel_smooth mixed float32 indices with float64 inputs
in the LAMMPS export path. Constants are now built in float64 and tied to the input dtype. Float32 outputs are
bit-identical, so no retraining is needed. The symbolic-function cache now actually hits, which saves
~220 ms of sympy.simplify per module construction.
Dependencies: cap nvalchemi-toolkit-ops<0.4.0 for the alchmtk extra (incompatible neighbor_list
API under torch.compile), and bump torch to 2.13.0.