Repository navigation
Final feature release of the 2.x line.
Upgrade notes
- Requires pytorch_lightning >= 2.6.1 (see Requirements).
- QM7X: databases built with earlier versions contain no PBE0 forces
(QM7X.FPBE0). Rebuild them to get these forces. MatScipyNeighborListraises aValueErrorfor periodic cells without volume
(e.g. a slab with a zero c-vector). Before, it silently dropped pairs.- Batchwise optimizers:
run()andirun()withoutstepsnow run until
converged, as in ASE, instead of taking no step.
Requirements
- pytorch_lightning >=2.6.1,<3 (was >=2.0.0). Before 2.6.1, DataLoader workers
replayed the same random stream every epoch when seeded withworkers=True,
asspktraindoes. - hydra-core >=1.3,<2 (was >=1.1.0), ase >=3.23 (was >=3.21)
- torch <3 and numpy <3 added as upper limits
black,pre-commitandpytestare no longer runtime dependencies;
pre-commitmoved to the newdevextra- pytest <9.2 in the
testextra, because pytest 9.2 breaks pytest-benchmark
Checkpointing and resuming
- Resumed training now continues exactly: checkpoints store the RNG states.
Withtrainer.deterministic=True, a resumed run is bitwise identical to an
uninterrupted one. last.ckptalways holds the latest epoch; with Lightning >=2.6 it only
updated when the monitored metric improvedspktraincan resume and load checkpoints with torch >=2.6 and Lightning- EMA callback: training always continues from the raw weights, never from the
EMA average: after a resume (#785), withcheck_val_every_n_epoch > 1, and
with validation within an epoch - A resumed run stays in one TensorBoard run (
version_0) and reuses its wandb run - A randomly drawn seed is stored in
config.yamland reused on resume
Added
seedandtrainer.log_every_n_stepsare now regular config keys- wandb logger config with project, run name and resume (#787)
- Progress bar callback in the default training config (#788)
spktrainraises an error if the early stopping metric becomes non-finite (#802)- Fallback download URLs for QM9 (#774) and rMD17 (#780)
- CI workflow with ruff and pre-commit (#799)
Fixed
- Neighbor lists:
TorchNeighborListreturns the correct pairs and offsets for atoms outside
the unit cell (#816)MatScipyNeighborListno longer creates offsets to periodic images along
non-periodic directions for atoms outside the cellSkinNeighborListis rebuilt whenever the cell changes. Before, it reused
stale offsets in variable-cell relaxations and NPT runs through the ASE
interface.
- QM7X:
FPBE0returned the MBD forces instead of the PBE0 forces, and an
interrupted extraction left a truncated file that later runs reused spkpredictwritespredictions.ptagain with the default
write_interval="epoch"spkdeployand the batchwise calculators load models withload_model, so
models saved with older versions work again- Batchwise optimizers (
ASEBatchwiseLBFGS) work with ASE >= 3.23 Responsewithmap_properties(renamed properties) no longer fails with a
KeyErrorspktrainno longer crashes with more than one loggerscript_model=Trueworks in the MD calculators for models withCastTo64or
CastMappost-processors and for 2.0.x model filestrainer=debug_trainerworks again with Lightning 2ModelOutputworks withoutmetrics(#782)Atomwisewithaggregation_mode="avg"works forn_out > 1(#801)- Hydra config search paths no longer depend on
$PWD(#794) ASEAtomsDataopens a database connection per metadata access and write (#778)- Aim logger repo path
AtomsDataModuledebug log messages; split files are now logged at info level (#798)- MD configs (
md_configs) are included in the package data (#799) - LAMMPS:
<torch/torch.h>no longer leaks throughpair_schnetpack.h(#796)
Changed
ASEAtomsDatacaches the available property names instead of reading the
metadata for every sample (based on #792 by @sundusaijaz)import schnetpackno longer triggers thetorch.jit.scriptdeprecation warning- Code base reformatted and linted with ruff (#799)
- Removed
tox.ini
Documentation
- Warning that model files are pickles and should only be loaded from trusted
sources (#810) - The aim and wandb loggers need a separate install (
pip install aimor
pip install wandb) - Updated LAMMPS how-to (#797), fixed tutorial 5, batchwise relaxation how-to
runs again - Docs requirement protobuf >=5.29.6 (CVE-2026-0994)
Known limitations
- After a kill in the middle of an epoch, the steps replayed on resume are
logged twice in the same run - The CSV logger writes each resumed part to its own
version_N - The Aim logger starts a new run on every resume
What's Changed
- Fixed atoms.py by @sundusaijaz in #778
- fix: previous url for qm9 is change to springnature.figshare from just ndownloader.figshare by @newbee1905 in #774
- rMD17 data download fallback URL by @sundusaijaz in #780
- Fix EMA callback: resume training from the raw weights, not the EMA average by @stefaanhessmann in #785
- docs by @jnsLs in #810
- Bug-Fix: Fallback to empty dict when
metrics=NoneinModelOutputby @rush42 in #782 - fixed torch nbh list by @jnsLs in #816
- Final schnetpack 2.x release by @stefaanhessmann in #815
Backported from dev:
- AtomsDataset and DataModule Refactor (only the checkpoint loading helper) by @sundusaijaz in #781
- Configure wandb logger by @sundusaijaz in #787
- Callback & Resume Training Fixes by @sundusaijaz in #788
- hydra search path bug by @jnsLs in #794
- Keep <torch/torch.h> out of pair_schnetpack.h by @geoffreyweal in #796
- updated lammps docs by @jnsLs in #797
- fixed split path directory bug by @jnsLs in #798
- Jl/ci by @jnsLs in #799
- Jl/atomwise fix by @jnsLs in #801
- Raise error in spktrain if early stopping metric becomes non-finite by @NiklasGebauer in #802
New Contributors
- @rush42 made their first contribution in #751
- @newbee1905 made their first contribution in #774
- @geoffreyweal made their first contribution in #796
Full Changelog: v2.2.0...v2.3.0