Skip to content

v0.2.0

Latest

Choose a tag to compare

@kabylda kabylda released this 24 Nov 10:17
a533140

🌞 SO3LR v0.2.0 Release Notes

This release introduces the SO3LR Tauri models, the flash MD engine with multi-GPU support, the SO3krates code inside the repository for training and fine-tuning, and many other features and fixes (see below). Extended docs moved to so3lr.github.io.

New Features

  • SO3LR Tauri models (so3lr-tauri-s, -m, -l) covering H to At (Z = 1–85). so3lr-tauri-m is the new default, -l is the most accurate (recommended for reactions), and -s is the fastest. Each model also has a dated name (for example so3lr-tauri-m-2606) that always refers to the same weights; the earlier -2602 models are the checkpoints after stage 4 of training (see the preprint). The original model stays available as so3lr.
  • Flash MD engine with fused GPU kernels (JAX Pallas, plus CUDA kernels on NVIDIA GPUs). It gives the same energies and forces as the neighbour-list potential, and it is the default MD engine wherever it applies (--engine auto). On an A100 with so3lr-tauri-m, flash is 3.7–4.0× faster than the neighbour-list engine with the Pallas kernels and about 9–10× faster with the CUDA kernels. The flash engine also lowers the peak memory per atom by 140–480× and allows up to 9 million atoms on an A100 (40 GB) and 84 million atoms on an AMD MI355X (288 GB).
  • Multiple GPUs and large systems: --flash-devices N enables parallelization across several GPUs of one node (4 A100s run 3.2–4.0× faster than one). FlashDomains evaluates a system in chunks (domains), which allows up to 384 million atoms on an A100 (40 GB) and 2.04 billion atoms on an MI355X (288 GB), with real-space long range only (no PME).
  • Guided terminal interface: so3lr start sets up MD, optimization or evaluation step by step, and runs show live plots. so3lr show monitors running and finished runs (--json for scripts), and so3lr resume continues a run from its last checkpoint.
  • One precision flag, --precision float32|mixed|float64, for MD, opt, eval and tune-ewald and in the Python calculators. mixed runs a float32 model around a float64 MD state.
  • Long-range and evaluation upgrades: P3M electrostatics, k-space dispersion, k-space in so3lr eval for periodic datasets, embeddings and per-atom observables from eval, and tune-ewald on the flash engine for systems of tens of thousands of atoms.
  • So3lrEngine to drive SO3LR from other MD codes (OpenMM, i-PI, LAMMPS or your own loop), and FlashCalculator for ASE on the flash engine.
  • Enhanced sampling with PySAGES: ABF, spectral ABF, well-tempered metadynamics and harmonic biasing. Collective variables include proton-transfer CVs, and a cylindrical restraint is available for host-guest binding.
  • Training from scratch with so3lr train: EMA of weights, early stopping, learning-rate reduction on plateau, k-space during training, and data-parallel training on all local GPUs.
  • Fine-tuning that keeps the long-range terms intact on data with only energies and forces, with three recipes: anchors to the starting model (training.long_range_anchor_weights), an exact long range with --strategy readout_only and a residual energy readout (model.energy_residual_mlp_widths), or pseudo-labels from a teacher model. Periodic data can be fine-tuned with k-space (model.cutoff_lr, model.kspace_electrostatics).
  • SO3krates (mlff) is now part of the repository (so3lr/mlff): refactored SO3krates code (from 21.6k to 12.6k lines) based on the mlff package. The model, data loading and training code no longer come from a separate install, so models, training and MD are versioned together.
  • More MD options: Langevin thermostat (nvt-langevin), semi-isotropic NPT (experimental), frozen atoms (fixed_atom_indices / mobile_atom_indices), dispersion tail correction, and a warning when the conserved quantity drifts.

Breaking Changes

  • Default model is now so3lr-tauri-m (currently so3lr-tauri-m-2606). Use --model so3lr (or model="so3lr" in Python) to reproduce v0.1.0 results.
  • Observable names: the Tauri models output a0_ratios, c6_ratios and nlh_repulsion instead of hirshfeld_ratios and zbl_repulsion. Python scripts written for v0.1.0 need the new names, or model="so3lr".
  • License: the SO3LR Tauri weights are released under CC BY-NC 4.0 (non-commercial use). The code and the original so3lr weights remain MIT.
  • PME by default on the command line for the SO3LR Tauri models on structures periodic along all three axes, for both electrostatics and dispersion (10 Å real-space cutoff, 2 Å smearing, 1.55 Å mesh for electrostatics and 3 Å for dispersion). v0.1.0 used real space with a 12 Å cutoff, and --kspace-electrostatics none --kspace-dispersion none restores it. The original so3lr model keeps real space with a 12 Å cutoff, as in v0.1.0. The Python calculators are unchanged.
  • Precision: the command line defaults to mixed, which evaluates the model in float32 while keeping the MD state (positions, momenta, box and energy sums) in float64.
  • Output formats: HDF5 trajectories are frame-major, (n_frames, ...) instead of (n_writes, save_buffer, ...). Relaxation frames before MD go to <output>_opt.xyz instead of the start of the trajectory.
  • Changed results: PME on non-orthogonal cells now passes the lattice vectors in the orientation jax-pme expects. It previously evaluated the transposed lattice, so energies and forces on such cells change; orthogonal cells are unaffected. In the Python API, Graph.cell holds the lattice as columns (atoms.cell.T).
  • Clash protection: when atoms come unrealistically close, the physical repulsion term now takes over instead of the neural network producing unphysical energies or forces. Normal structures are not affected. This applies to all models, including so3lr.
  • Environment: the recommended install is locked with uv (uv sync --locked), and SO3LR needs Python 3.12 or 3.13 and JAX below 0.11 (0.10.2 is excluded). The separate mlff package is no longer installed (import from so3lr.mlff instead), and Weights & Biases is opt-in through the wandb extra.

Bug Fixes

  • Periodic MD with k-space no longer drifts as a whole. The small net force from the PME mesh is now removed (kspace_remove_net_force, on by default).
  • MD no longer loses trajectory frames: frames left in a partly filled buffer at the end of a run are written, frames are saved before each restart checkpoint, and a restart no longer overwrites an existing HDF5 trajectory.
  • tune-ewald error estimates are corrected. The reciprocal-space error uses the Kolafa-Perram form (it was underestimated 4–36×), the real-space errors use the model's own electrostatic and dispersion scales, and PME is searched with 4 interpolation nodes.
  • The ASE calculator uses exact periodic images for small or skewed cells, and builds a periodic neighbour list when a structure moves from free space into a box.
  • NPT reallocates its cell list when the box shrinks. It could previously miss pairs near the cutoff.
  • Fine-tuning fixes: layer-based strategies (e.g. last_layer) froze the wrong layer when the new config's layer count differed from the checkpoint's, and periodic training data included zero self-distances.
  • Structures with elements a model was not trained on, or with mixed periodicity (slabs, wires), are rejected with a clear error.
  • Security: telemetry is opt-in, restart files load without pickle, config unit expressions are parsed without eval, and vulnerable dependencies are updated.

Documentation & Examples

  • New documentation at so3lr.github.io covers CLI and settings, MD, ASE, long-range electrostatics, enhanced sampling, fine-tuning and training, plus an API reference and FAQ. The README is now a short landing page.
  • You can try SO3LR without installing it in the light web version or the Colab notebook, now validated on v0.2.0.
  • Training and test datasets for SO3LR Tauri are on Zenodo.
  • Guidance for AI coding agents is in AGENTS.md and on the docs site.
  • Units and examples are corrected: pressure is documented and logged in bar (it was labelled atm), and the example notebooks convert temperature and pressure correctly.

What's Changed

  • SO3LR Tauri models, the flash engine, SO3krates (mlff) merged into the repository, training from scratch, mixed-precision MD (a float64 MD state around a float32 model), and k-space dispersion by @kabylda in #38
  • P3M electrostatics, observables, embeddings and Hessians in eval, k-space options in the ASE calculator, the CLI refactor and integration tests by @fbruenig in #38
  • PySAGES interface on the new code: collective variables (coordination numbers, periodic distances, Cartesian components, ring puckering), ABF options, harmonic biasing and NPT by @em819 in #38
  • Langevin thermostat (nvt-langevin) by @rusl-lev in #38
  • Frozen and mobile atoms in MD (fixed_atom_indices / mobile_atom_indices) by @pascalnotin in #38
  • Fixes to layer-based fine-tuning and to periodic training data (zero self-distances) by @braniii in #38
  • Flash kernel launch parameters for AMD GPUs by @pvasireddy-amd in #38
  • Fix checking the non-fractional positions (fixes #33) by @couxxuoc in #35
  • Flash domains, held atoms, small periodic boxes and a safer auto fallback by @kabylda in #44, #46, #49, #71
  • K-space net-force removal, k-space dispersion in opt, the PME default in the settings template, and real space by default for the original model by @kabylda in #45, #48, #73, #82
  • tune-ewald on flash and with the model's electrostatic and dispersion scales by @kabylda in #47, #72
  • Fine-tuning recipes that keep the long-range heads, periodic long-range fine-tuning, and removal of freeze_long_range by @kabylda in #50, #51, #75
  • GPU-robust tests and logger isolation by @kabylda in #52, #53
  • Data-parallel training and checkpoint fixes by @kabylda in #54, #68, #69
  • One precision flag: float32, mixed or float64 by @fbruenig in #57
  • PySAGES cylindrical restraint, proton-transfer CVs and PySAGES on flash by @em819 in #58
  • Flash CUDA kernels, chunked for millions of atoms and sized for GPUs with less shared memory by @kabylda in #59, #60, #62, #74
  • README: SO3LR Tauri banner, light web version link and the cuda12 extra for existing JAX installs by @kabylda in #61, #77, #80
  • JAX MD on current upstream, JAX 0.10.2 excluded, and security updates by @kabylda in #63, #65
  • So3lrEngine for external MD codes, with k-space dispersion, by @kabylda in #64, #70
  • Guided CLI setup, live plots, offline run monitoring and example-first help by @kabylda in #66, #78
  • So3lrCalculator periodicity switch fix by @kabylda in #67

Contributors

Thanks to new contributors: @em819, @rusl-lev, @braniii, @pascalnotin, @pvasireddy-amd, @couxxuoc, and everyone who helped test the SO3LR Tauri models and improve the code and documentation.

Full Changelog: v0.1.0...v0.2.0