Skip to content

SO3LR

SO3LR

SO3LR - pronounced Solar - is a pretrained machine-learned force field for (bio)molecular simulations. It integrates the fast and stable SO3krates neural network for semi-local interactions with universal pairwise force fields designed for short-range repulsion, long-range electrostatics, and dispersion interactions. See GitHub.

Install

We recommend installing SO3LR with uv (it's magical):

git clone https://github.com/general-molecular-simulations/so3lr.git
cd so3lr
uv sync --locked --extra cuda12   # GPU; drop --extra cuda12 for CPU
uv run so3lr --help

If JAX is already installed on your cluster (CUDA or ROCm), install SO3LR into that environment:

git clone https://github.com/general-molecular-simulations/so3lr.git
cd so3lr
pip install .
so3lr --help

See Installation for optional extras.

Example

# 10 ps of NVT at 300 K
so3lr nvt --input geometry.xyz --temperature 300 \
    --dt 0.5 --md-cycles 100 --md-steps 200
from ase.io import read
from so3lr import So3lrCalculator

atoms = read("geometry.xyz")
atoms.calc = So3lrCalculator(model="so3lr-tauri-m")

energy = atoms.get_potential_energy()
forces = atoms.get_forces()
import jax.numpy as jnp
from ase.io import read
from jax_md import space, quantity
from so3lr import So3lrPotential, to_jax_md

atoms = read("molecule.xyz")     # an isolated molecule
R = jnp.asarray(atoms.get_positions())
displacement, _ = space.free()

neighbor_fn, neighbor_fn_lr, energy_fn = to_jax_md(
    So3lrPotential(model="so3lr-tauri-m", lr_cutoff=100.0),
    displacement, box_size=None,
    species=jnp.asarray(atoms.get_atomic_numbers()),
    disable_cell_list=True, fractional_coordinates=False,
)
nbrs, nbrs_lr = neighbor_fn.allocate(R), neighbor_fn_lr.allocate(R)

energy = energy_fn(R, neighbor=nbrs.idx, neighbor_lr=nbrs_lr.idx)
forces = quantity.force(energy_fn)(R, neighbor=nbrs.idx, neighbor_lr=nbrs_lr.idx)

Try SO3LR without any local installation using our Colab notebook .

Where to go next

If you want to… Go to
Get a first simulation running Quick start
Choose between so3lr-tauri-s / -m / -l Models
See every CLI command and flag Command line
Set up a production MD run, or use the flash engine Molecular dynamics
Look up a settings-file key Settings reference
Score the model on your dataset Dataset evaluation
Handle periodic electrostatics properly Long-range electrostatics
Compute free energies Enhanced sampling
Adapt the model to your system Fine-tuning
Pull out energy components or charges Observables

Relevant references

If you like SO3LR, please star it on GitHub.