jaxrens.backends.softcore

SoftCoreTerm — a fixed repulsive Morse term added to any energy model.

MLIPs (MACE, NeuralIL, Nequix, …) generally have no defined behaviour for close-contact configurations far outside their training distribution, where the learned potential can become attractive or NaN. During nested sampling at high pressure or with aggressive cell moves walkers can drift into such configurations and irreversibly collapse atoms onto each other.

This term adds a parameter-free repulsive Morse contribution:

phi(r) = d0 * exp(-2 * a0 * (r - b0))

multiplied by a smooth cutoff function that is exactly 1 below r_switch and exactly 0 above r_cut (default 1.25 Å). The contribution is summed over all atom pairs using minimum-image distances when a periodic cell is present (so close contacts across a boundary are counted), and raw Cartesian distances for non-periodic systems. MIC is single-image — no supercell expansion — which is exact as long as r_cut stays below half the shortest cell vector.

Usage:

model = MACEBackend(...)
H = Hamiltonian(model, [SoftCoreTerm(), EnsembleTerm(pressure=P)])

The term contributes its own energy and forces (autodiff of the soft-core energy alone), so the model keeps its native force path.

Module Attributes

DEFAULT_SOFTCORE_KWARGS

Default soft-core Morse parameters (a0, b0, d0, r_core_cut, r_core_switch) used when a backend enables soft-core repulsion without overriding them.

Functions

SoftCoreBackend

Convenience: base plus a SoftCoreTerm.

Classes

SoftCoreTerm

Fixed repulsive Morse soft core as an additive Hamiltonian term.