Configuration

Every jaxrens run is driven by a single YAML file, validated against a set of Pydantic models before any sampling begins. This page is the working reference for that file: every key you can write, grouped by the section it lives in, with its type, default, and what it does. The tables are generated from the same models that validate your config, so they cannot drift from the code that enforces them.

Validate a file without running anything:

jaxrens validate --parse-only -c config.yaml   # schema only
jaxrens validate -c config.yaml                # + resolver plan
jaxrens validate --full -c config.yaml         # + startup rehearsal
jaxrens dump-schema                            # the raw JSON Schema

See also

Schema → resolve → run explains how the parsed config becomes a running job. The pydantic models themselves live in jaxrens.cli.schema; jaxrens dump-schema emits the equivalent JSON Schema, descriptions included.

A complete config

Everything below is one file. run, moves, backend and output are required; the rest have defaults.

interval_units: absolute

run:                          # sampler sizing
  n_live: 128
  n_mcmc_steps: 20
  seed: 42

backend:                      # the energy model
  type: lj
  epsilon: 1.0
  sigma: 1.0
  cutoff: 2.5
  periodic: true

ensemble:                     # optional; NVT if omitted
  type: npt
  pressure: 0.1
  pressure_units: eva3

moves:                        # MWG kernels; weights set dispatch odds
  - {type: gmc, n_reflect: 10, step_size: 0.1, weight: 4.0}
  - {type: volume, step_size: 0.3, weight: 1.0}
  - {type: shear,  step_size: 0.1, weight: 1.0}
  - {type: stretch, step_size: 0.1, weight: 1.0}

termination:                  # run stops when any criterion fires
  - type: prior_mass
    threshold: 1.e-5

adaptation:                   # off unless adjust_interval is set
  adjust_interval: 10
  full_auto: true
  defaults: {min_rate: 0.3, max_rate: 0.5, step_size_max: 0.2}
  per_move:
    gmc: {step_size_max: 0.5}

init:                         # exactly one source of atoms
  start_species: "18 64"      # 64 argon atoms
  pos_randomization_mode: grid
  grid_distance: 1.0
  initial_walk: {n_walks: 5, walklength: 50}

cell:                         # bounds for the volume/shear/stretch moves
  max_volume_per_atom: 20.0
  min_volume_per_atom: 0.5
  min_aspect_ratio: 0.6

constraints:                  # optional hard geometry constraints
  - type: minimum_distance
    d_min: 0.8

inter_re:                     # optional; omit to disable replica exchange
  flavor: pressure
  re_interval: 1

output:
  working_dir: ./output
  out_file_prefix: lj64_npt
  info_interval: 100
  checkpoint_interval: 500

Top-level keys

Key

Type

Default

Description

interval_units

absolute | per_walker

absolute

How the resolver interprets every iteration-counted field. absolute (default): values are raw NS iteration counts. per_walker: values are walker-sweeps, where one sweep is run.n_live culled walkers, i.e. n_live / run.n_cull iterations; the resolver multiplies each affected field by n_live / n_cull before building the runtime dataclasses, so an interval expressed in sweeps stays comparable across configs with different n_live and n_cull. Affected fields: output.{info,traj,snapshot,checkpoint,flush}_interval, output.{temperature_lag,temperature,acc_rates,max_neighbors,collision_check}_interval, run.max_iterations, termination[iteration].max_iterations, inter_re.re_interval, and adaptation.adjust_interval. Scaled values are rounded to the nearest int and clamped to >= 1, so a fractional sweep like 0.001 never collapses to 0.

run

mapping

required

Sampler sizing and reproducibility: walker count, MCMC steps per replacement, seed.

moves

list of mappings

required

Ordered list of MCMC move kernels composed by the Metropolis-within-Gibbs scheduler. Each entry’s type: picks the kernel and its weight sets the dispatch probability. A single mapping is accepted and wrapped in a list.

backend

mapping

required

The energy model. type: selects one of the built-in potentials or machine-learned backends.

output

mapping

required

Where results are written, at what cadence, and which optional diagnostic logs are enabled.

termination

list of mappings or null

null

Stopping criteria; the run ends when any of them fires. A single mapping is wrapped in a list. null falls back to run.max_iterations and run.convergence_threshold.

adaptation

mapping

section defaults

Step-size adaptation policy, with per-move overrides. Adaptation is on by default; set adaptation.adjust_interval: 0 to freeze every move at its configured step_size.

ensemble

mapping

section defaults

Thermodynamic ensemble. Defaults to NVT; type: npt adds P*V and type: semi_grand adds -mu*N. A list-valued driving parameter here is what fans a run out across replicas.

init

mapping

section defaults

Where the atoms come from and how the initial population is randomised. Exactly one source-of-atoms key must be set.

cell

mapping

section defaults

Cell-geometry bounds. The single source of truth for the volume, shear, and stretch kernels — the move specs themselves carry no copies of these.

inter_re

mapping

null

Inter-replica exchange (RENS). Omit to disable swaps entirely.

constraints

list of mappings

empty

Hard configuration constraints applied throughout sampling. A constraint rejects any proposal moving a walker into a forbidden region, exactly like the likelihood threshold, and is enforced only on the moves that can violate it. Omitting the key means no constraints and zero overhead.

Note

interval_units rescales every iteration-counted field at once (per_walker counts in walker-sweeps of run.n_live culled walkers, i.e. run.n_live / run.n_cull iterations, instead of raw iterations). See the “Interval-unit scaling” section of Schema → resolve → run for the motivation, a YAML example, and the full list of affected fields.

run: — sampler sizing

Key

Type

Default

Description

run.n_live

integer

500

Number of live walkers in the nested-sampling population. Controls resolution: the prior mass contracts by exp(-n_cull / n_live) per iteration, so larger values resolve sharper phase transitions at proportionally higher cost.

run.max_iterations

integer or number or null

null

Hard cap on NS iterations. null (default) lets the resolver derive a bound from the termination criteria (chiefly termination[prior_mass].threshold and n_live), which is what you want when prior_mass is doing the actual stopping. Honours interval_units.

run.convergence_threshold

number

0.1

Relative log-evidence increment below which the run is considered converged. Only consulted when no explicit termination criterion fires first.

run.n_mcmc_steps

integer

20

MCMC steps taken inside the JIT-compiled inner scan to decorrelate each replacement walker from the live point it was cloned from. Too few leaves the new walker correlated with its parent and biases the evidence; this is the main accuracy/cost dial after n_live.

run.n_extra

integer

0

Additional walkers, drawn at random from the existing population, that are MCMC-walked alongside the replacement each iteration. This is the parallel batch width: 1 + n_extra chains run under one vmap, so 0 (the default) walks a single chain and leaves a GPU almost idle. It does not enlarge the population — that stays n_live — and the extras are not dead points; they decorrelate the live set at the cost of more energy evaluations per iteration.

run.n_cull

integer (>= 1)

1

Number of highest-energy walkers removed per NS iteration. Each is replaced by a clone of a distinct random survivor, and the n_cull clones are MCMC-walked together (alongside the n_extra extras), so values > 1 contract the prior mass n_cull times faster per iteration (by (n_live + 1 - n_cull) / (n_live + 1)) and widen the parallel walk batch. Every culled walker is a dead point (n_cull rows per iteration in .energies). Requires 2 * n_cull + n_extra <= n_live.

run.seed

integer

42

Seed for the master PRNG key. Fixes walker initialisation, every move proposal, and the burn-in walk, so two runs with the same config and the same device topology are identical.

run.shard_n_gpu

integer (>= 1)

1

Shard the n_live walker population across this many GPUs. When > 1 and the config implies a single logical run (no pressure / composition / chemical-potential list, no inter_re), the resolver builds a ShardedSingleRun batcher and the CLI dispatches to run_sharded_from_config. n_live must be divisible by shard_n_gpu. Default 1 → behaviour identical to today’s single-GPU single run.

moves: — MCMC kernels

A list of move specifications; a single mapping is accepted and wrapped in a list. Each entry’s type: selects the kernel. The scheduler composes them into one Metropolis-within-Gibbs step, dispatching by weight.

Every move accepts these shared keys:

Key

Type

Default

Description

moves[].step_size

number

0.1

Initial proposal magnitude, in the move’s own units (Angstrom for displacement moves, a relative fraction for cell moves). A starting point only when adaptation is on — adaptation.adjust_interval then drives it toward target_acceptance.

moves[].weight

number

1.0

Relative dispatch probability within the Metropolis-within-Gibbs scheduler. Weights are normalised across the whole moves: list, so only their ratios matter.

moves[].adaptation_warmup

integer

100

Iterations before this move’s step size starts adapting, letting the acceptance statistics settle first.

moves[].target_acceptance

number

0.5

Acceptance rate the adaptation aims for. Ignored by moves with no continuous magnitude, such as species_swap.

moves[].name

string or null

null

Label for this move. Defaults to its type. Keys the monitor’s per-move columns, the adaptation diagnostics, and adaptation.per_move overrides — so give two moves of the same type distinct names, otherwise they collide in all three.

And each type: adds its own:

Gaussian displacement of every atom at once.

Takes no keys of its own — type: random_walk plus the shared keys above.

The cheapest move available — one energy evaluation per proposal, no forces — but it decorrelates slowly, since every atom moves at once and a single bad contact rejects the whole configuration. Useful as a low-weight background move alongside gmc.

moves:
  - {type: random_walk, step_size: 0.1, weight: 1}

Galilean Monte Carlo move, optionally scoped to one element sublattice.

Key

Type

Default

Description

moves[].n_reflect

integer

5

Reflections per Galilean trajectory. Each costs one energy-and-force evaluation, so this multiplies the move’s price; more reflections travel further per proposal.

moves[].species

list of string or null

null

Restrict the move to the named element(s), holding the rest fixed. A bare symbol (species: Ge) is accepted as shorthand for a one-element list. Declaring one scoped move per element gives each sublattice an independently adapted step size — worth it when one sublattice melts well before the other. Scoped moves are auto-named gmc_<symbols>.

moves[].refresh_direction

boolean

false

Draw a fresh random direction on every GMC call instead of perturbing the previous one, so the direction only persists within one trajectory of n_reflect steps. Valid either way; mainly a decorrelation / diagnostic switch.

The legacy YAML key type: galilean is accepted via a pre-validator coercion in root.py::_coerce_move_dict and rewritten to type: gmc at parse time.

species restricts the move to the atoms of the named element(s) and holds the rest fixed. Declaring one scoped move per element gives each sublattice an independently adapted step size, because the MWG sampler stores step sizes per move and the adaptation manager bisects each move separately. That matters for systems where one sublattice melts well before the other: in a single joint move the step size is capped by whichever sublattice is stiffer.

moves:
  - {type: gmc, species: Ge, step_size: 0.3, weight: 3}
  - {type: gmc, species: Si, step_size: 0.05, weight: 1}

Two caveats worth knowing:

  • Step sizes are not comparable across scopes. The direction is a unit vector over the moving subspace, so per-atom displacement scales as step_size / sqrt(3 * n_moving) — a minority sublattice takes larger per-atom steps at equal nominal step size. Harmless (each is adapted on its own acceptance), but don’t read the two numbers as being on the same scale.

  • Each scoped move costs a full energy+force call per reflection, so two scoped moves are 2x the evaluations of one joint move for the same n_reflect. Use weight to spend the budget where it pays.

Hamiltonian Monte Carlo with a leapfrog integrator.

Key

Type

Default

Description

moves[].n_leapfrog

integer

10

Leapfrog steps per trajectory. Each costs one energy-and-force evaluation; longer trajectories decorrelate further per proposal but cost proportionally more.

Draws fresh momenta, integrates the equations of motion for n_leapfrog steps, and accepts on the energy error. Travels much further per proposal than a random walk, at n_leapfrog energy-and-force evaluations each.

moves:
  - {type: hmc, n_leapfrog: 20, step_size: 0.05, weight: 1}

Displace one randomly chosen atom per proposal.

Takes no keys of its own — type: single_atom plus the shared keys above.

Acceptance does not collapse as the system grows — only one atom risks a bad contact — so this stays usable at densities where whole-system moves are rejected almost always. It also costs a full energy evaluation per atom moved, which is why it is usually a supporting move rather than the main one.

moves:
  - {type: single_atom, step_size: 0.2, weight: 1}

Displace every atom once per proposal, in a random order.

Takes no keys of its own — type: single_atom_sweep plus the shared keys above.

One sweep is n_atoms single-atom proposals, each accepted or rejected on its own — so it gets the good acceptance of single_atom while advancing the whole configuration per dispatch. Correspondingly it costs n_atoms energy evaluations.

n_atoms is supplied by the resolver from the initial positions, so it is not a YAML key.

moves:
  - {type: single_atom_sweep, step_size: 0.2, weight: 1}

Exchange the identities of two atoms of different species.

Key

Type

Default

Description

moves[].species

list of string or null

null

Restrict the exchange to the named elements, e.g. [Ge, Si]. Must name at least two distinct elements — a one-element scope has nothing to exchange and is rejected at parse time. Omit to allow any unlike pair. Scoped moves are auto-named species_swap_<symbols>.

The kernel draws an unlike pair by construction, so no evaluation is wasted on a same-species draw and the acceptance rate is not capped by the composition.

species restricts the exchange to the named elements:

moves:
  - {type: species_swap, weight: 2}                 # any unlike pair
  - {type: species_swap, species: [Ge, Si]}         # Ge <-> Si only

A scoped move needs at least two distinct elements — a one-element scope has nothing to exchange and is rejected at parse time rather than becoming a silent no-op.

The kernel ignores step_size (a swap has no continuous magnitude), so the inherited step_size / target_acceptance fields do nothing here.

Change the box length of the 1-D toy model.

Takes no keys of its own — type: lattice_1d plus the shared keys above.

The 1-D analogue of a volume move, and the counterpart to distance_1d; the RENS paper runs the two in a 1:1 ratio. Bounds come from the cell: section, read as bounds on a / n_atoms. Only for backend: rens_toy.

moves:
  - {type: lattice_1d, step_size: 0.3, weight: 1.0}
  - {type: distance_1d, step_size: 0.3, weight: 1.0}

Displace one particle of the 1-D toy model along the axis.

Takes no keys of its own — type: distance_1d plus the shared keys above.

Counterpart to lattice_1d. Only x moves — y and z are not arguments of the toy energy. Only for backend: rens_toy.

moves:
  - {type: distance_1d, step_size: 0.3, weight: 1.0}

Isotropic cell-volume change, co-transforming atom positions.

Takes no keys of its own — type: volume plus the shared keys above.

Required for any NPT run — without it the cell never breathes and the P*V term does no work. step_size is a relative volume scale, not a length, so it is not comparable with the displacement moves.

Bounds come from the cell: section, not from this spec.

moves:
  - {type: volume, step_size: 0.3, weight: 1}

cell:
  max_volume_per_atom: 20.0
  min_volume_per_atom: 0.5

Volume-preserving shear of the cell, co-transforming positions.

Takes no keys of its own — type: shear plus the shared keys above.

Lets the cell change shape at fixed volume, which is what allows a walker to find a non-cubic crystal structure. Pair it with stretch; neither alone spans the full space of cell shapes. Proposals violating cell.min_aspect_ratio are rejected.

Bounds come from the cell: section, not from this spec.

moves:
  - {type: shear, step_size: 0.1, weight: 1}
  - {type: stretch, step_size: 0.1, weight: 1}

Volume-preserving anisotropic stretch, co-transforming positions.

Takes no keys of its own — type: stretch plus the shared keys above.

Lengthens one cell axis and compresses the others to keep the volume fixed. The complement to shear: together they explore cell shape, while volume explores cell size.

Bounds come from the cell: section, not from this spec.

moves:
  - {type: stretch, step_size: 0.1, weight: 1}

Continuously morph one atom’s identity toward another species.

Key

Type

Default

Description

moves[].n_species

integer

required

Number of species the morph can select among. Must match the species count of the initialised system.

Unlike species_swap, which exchanges two existing atoms and so conserves the composition, a morph changes it — use it for semi-grand runs where the composition is meant to fluctuate.

moves:
  - {type: alchemical_morph, n_species: 2, step_size: 0.1, weight: 1}

Tip

Cell moves (volume, shear, stretch) take their bounds from the cell: section rather than from the move entry, and n_atoms comes from the resolved initial structure — that is why those tabs carry no geometry keys of their own.

backend: — the energy model

Shared keys, accepted by every backend:

Key

Type

Default

Description

backend.periodic

boolean

false

Treat the cell as periodic, applying the minimum-image convention and periodic-image expansion. Must be true for any condensed-phase run and for every cell move.

backend.softcore_repulsion

mapping

null

Wrap the backend in a parameter-free repulsive Morse soft-core term to suppress close-contact pathologies at high E_max. Backend-agnostic — works with MACE, Nequix, LJ, NeuralIL. For NeuralIL prefer the slightly cheaper per-backend softcore: true flag; setting both is rejected, since it would double-count the repulsion.

backend.max_neighbors_list

list of integer

[30, 35, 40, 45, 50]

Ascending ladder of neighbour-list capacities. On overflow the outer loop picks the smallest entry >= (observed maximum + max_neighbors_offset) and recompiles once per distinct bucket, so a short ladder bounds the number of recompilations. Ignored by backends that do no neighbour finding (LJ, toy).

backend.max_neighbors_offset

integer (>= 0)

5

Headroom added to the observed maximum neighbour count before choosing a ladder entry, so a marginal increase does not immediately force another resize.

backend.max_neighbors_shrink_dwell

integer (>= 0)

0

Consecutive iterations that must fit in the next smaller bucket before the capacity is stepped down. 0 (default) keeps the escalate-only behaviour. Shrinking back to an already-visited bucket reuses the JAX compilation cache, so the compile budget stays bounded by max_neighbors_list.

Per-backend keys:

Toy isotropic harmonic well about the origin. For tests.

Key

Type

Default

Description

backend.k

number

1.0

Spring constant.

Has an analytic partition function, which makes it the reference for checking that the evidence estimator is unbiased.

backend:
  type: harmonic
  k: 1.0

Toy double-well potential with a tunable barrier. For tests.

Key

Type

Default

Description

backend.a

number

1.0

Quartic coefficient.

backend.b

number

1.0

Quadratic coefficient.

Two basins separated by a barrier, so it exercises the sampler’s ability to cross one — the toy analogue of a first-order transition.

backend:
  type: double_well
  a: 1.0
  b: 1.0

Toy multi-modal Gaussian mixture. For testing mode-hopping.

Key

Type

Default

Description

backend.centers

list of list of number or null

null

Mixture-component centres, one coordinate list each. null uses the built-in default set.

backend.sigma

number

0.5

Width shared by every component.

centers defaults to a built-in set; give your own to control how many modes there are and how far apart they sit.

backend:
  type: gaussian_mixture
  sigma: 0.5
  centers:
    - [0.0, 0.0, 0.0]
    - [2.0, 0.0, 0.0]

Two particles in a periodic 1-D box — the RENS-paper toy model.

Key

Type

Default

Description

backend.eps_rep

number

10.0

Height of the repulsive core, E_rep (eq 14). The core is a Gaussian and therefore bounded: set it too low and the two particles simply interpenetrate, since the attraction from their periodic self-images outweighs a finite overlap cost.

backend.h_rep

number

8.0

Decay constant of the repulsive core; larger values make the repulsion narrower.

backend.eps_attr

number

1.0

Depth of the attractive well, E_attr (eq 15).

backend.mu

number

1.0

Separation at which the attractive well sits. Sets the preferred particle spacing, and with it the box lengths that are commensurate with it.

backend.sigma

number

0.2

Width of the attractive well.

backend.r_cut

number

3.0

Interaction cutoff. Pairs and periodic images beyond it contribute nothing.

backend.n_images

integer (>= 1)

8

Periodic images summed on each side. Static (it fixes the compiled shape), so it only has to satisfy n_images * a_min >= r_cut for the smallest box the cell prior permits; the cutoff mask does the physics.

Multi-modal in (a, d) despite its simplicity, which makes it the cheapest way to see replica exchange actually do something: independent runs at different pressures settle into different basins, and the swaps are what rescue them.

Drive it with the lattice_1d and distance_1d moves — the general 3-D cell moves scale isotropically and would break the diag(a, 1, 1) cell this backend relies on. See RENSToyBackend for the embedding.

backend:
  type: rens_toy
  periodic: true
  mu: 1.0
  sigma: 0.2
  r_cut: 3.0

Lennard-Jones, computed all-pairs with optional periodic images.

Key

Type

Default

Description

backend.epsilon

number

1.0

Well depth, in the run’s energy units.

backend.sigma

number

1.0

Zero-crossing distance of the potential.

backend.cutoff

number or null

null

Interaction cutoff in the same length units as sigma. null means no cutoff (full all-pairs sum).

backend.supercell_trafo

[integer, integer, integer]

[1, 1, 1]

Periodic-image expansion for the all-pairs sum. Must satisfy min(perpendicular_distance * sc) >= 2 * cutoff to capture every neighbour; the resolver warns at startup when the cell prior permits cells that would violate it.

Set periodic: true and a cutoff for condensed-phase work. Mind the interaction between cutoff, the cell: volume bounds and supercell_trafo: the resolver warns at startup when the smallest cell the prior permits is too thin to honour the cutoff.

backend:
  type: lj
  epsilon: 1.0
  sigma: 1.0
  cutoff: 2.5
  periodic: true

NeuralIL machine-learned potential loaded from a pickle.

Key

Type

Default

Description

backend.checkpoint_path

string

required

Path to the trained NeuralIL model pickle.

backend.supercell_trafo

[integer, integer, integer]

[1, 1, 1]

Periodic-image expansion for descriptor generation. Must satisfy min(cell_axis_length * sc) >= 2 * r_cut, with r_cut read from the pickle. Bump to [2, 2, 2] or [3, 3, 3] for tight unit cells.

backend.softcore

boolean or null

null

Enable NeuralIL’s internal soft-core repulsion, which shares the descriptor’s neighbour discovery and so is slightly cheaper than the generic softcore_repulsion wrapper. null (default) uses whatever the pickle was trained with; true / false overrides it. Mutually exclusive with softcore_repulsion.

backend.softcore_kwargs

mapping of name to number or null

null

Override the pickle-stored soft-core parameters, merged on top of the package defaults.

supercell_trafo must be large enough that the cell spans twice the model’s r_cut (read from the pickle); raise it for tight unit cells.

backend:
  type: neuralil
  checkpoint_path: models/neuralil_si.pkl
  periodic: true
  supercell_trafo: [2, 2, 2]
  softcore: true

MACE-JAX message-passing potential.

Key

Type

Default

Description

backend.checkpoint_path

string

required

Path to the MACE model file. See the MACE models page for how to convert a torch checkpoint into a JAX-loadable bundle.

backend.supercell_trafo

[integer, integer, integer]

[2, 2, 2]

Periodic-image expansion for neighbour finding. Must be large enough that the cell spans twice the model’s receptive field; the default suits typical small unit cells.

Foundation models without a proper short-range repulsive term let walkers collapse at high E_max; pair this with softcore_repulsion (or a minimum_distance constraint) when that happens.

backend:
  type: mace
  checkpoint_path: models/mace_si.model
  periodic: true
  supercell_trafo: [2, 2, 2]
  softcore_repulsion:
    r_core_cut: 1.25
    r_core_switch: 0.75

Nequix message-passing potential.

Key

Type

Default

Description

backend.checkpoint_path

string

required

Either a path to a local .nqx checkpoint, or a bundled model name such as nequix-mp-1, which the nequix package downloads on first use.

backend.supercell_trafo

[integer, integer, integer]

[1, 1, 1]

Periodic-image expansion for neighbour finding; raise it for cells smaller than twice the model cutoff.

checkpoint_path takes either a local .nqx file or a bundled model name, which the nequix package downloads on first use.

backend:
  type: nequix
  checkpoint_path: nequix-mp-1
  periodic: true

jax-md classical analytic potentials (Tersoff, EAM).

Key

Type

Default

Description

backend.potential

tersoff | eam

required

Which analytic potential to build. tersoff needs exactly one of tersoff_params / tersoff_params_file; eam needs eam_params_file.

backend.tersoff_params

string or null

null

Name of a built-in Tersoff parameter set. Mutually exclusive with tersoff_params_file.

backend.tersoff_params_file

string or null

null

Path to a LAMMPS-format Tersoff parameter file. Mutually exclusive with tersoff_params.

backend.eam_params_file

string or null

null

Path to an EAM parameter file. Required when potential: eam, and must be unset otherwise.

All-pairs computation — no neighbor list, so max_neighbors_list and max_neighbors_offset from the base spec are ignored. See backends/jaxmd.py for the architectural rationale.

Tersoff needs exactly one of tersoff_params (a built-in set) or tersoff_params_file (a LAMMPS-format file); EAM needs eam_params_file and no Tersoff key. Mixing them is rejected at parse time.

backend:
  type: jaxmd
  potential: tersoff
  tersoff_params: Si
  periodic: true
backend:
  type: jaxmd
  potential: eam
  eam_params_file: potentials/Cu_u3.eam
  periodic: true

backend.softcore_repulsion: takes a mapping of:

Key

Type

Default

Description

backend.softcore_repulsion.a0

number

1.0

Morse well depth prefactor (energy units).

backend.softcore_repulsion.b0

number

3.0

Morse decay constant (inverse length units).

backend.softcore_repulsion.d0

number

1.0

Morse equilibrium distance (Angstrom).

backend.softcore_repulsion.r_core_cut

number

1.25

Distance above which the soft-core term is exactly zero (Angstrom). Set it below the shortest physical bond in your system — too large and the wall dominates the real potential, jamming walkers at the cutoff instead of letting them find the true minimum.

backend.softcore_repulsion.r_core_switch

number

0.75

Distance below which the soft-core term is at full strength (Angstrom); between here and r_core_cut it is smoothly switched off. Must be strictly less than r_core_cut.

ensemble: — thermodynamic ensemble

Defaults to NVT. A list-valued driving parameter here (pressure, or chemical_potentials) is what fans a run out across replicas — see Replica topology and inter-RE.

Canonical NVT — fixed cell, no ensemble correction (H = U).

Takes no keys of its own — type: nvt plus the shared keys above.

The default when ensemble: is omitted entirely. Drop the cell moves (volume / shear / stretch) from moves: here: without a P*V term nothing balances a volume change, and the cell will drift to whichever bound the prior allows.

ensemble:
  type: nvt

Isothermal-isobaric NPT — the backend adds P*V to the energy.

Key

Type

Default

Description

ensemble.pressure

number or list of number

required

Applied pressure, in pressure_units. A list fans the run out across replicas — one replica per entry, at that pressure — which is how a pressure-RENS ladder is declared.

ensemble.pressure_units

gpa | eva3

eva3

Units of pressure: eva3 (eV/Angstrom^3, the internal unit, default) or gpa, converted at parse time.

A list of pressures is what fans the run out across replicas, one per entry — the usual way to set up a pressure-RENS ladder alongside inter_re.

ensemble:
  type: npt
  pressure: 0.1
  pressure_units: eva3
ensemble:
  type: npt
  pressure: [0.01, 0.1, 1.0, 10.0]   # 4 replicas
  pressure_units: gpa

Semi-grand μPT: H = U + P·V - μ·N.

Key

Type

Default

Description

ensemble.chemical_potentials

list of number or list of list of number

required

Per-species chemical potentials [mu_0, mu_1, ...] (eV), one entry per species in type-code order. Pass a list of vectors to fan out across replicas, one mu-vector each.

ensemble.pressure

number or list of number

0.0

Applied pressure in pressure_units; 0 (default) drops the P*V term. May itself be a list for a pressure replica axis — when both this and chemical_potentials are lists their lengths must match, otherwise the scalar broadcasts.

ensemble.pressure_units

gpa | eva3

eva3

Units of pressure: eva3 (eV/Angstrom^3, default) or gpa.

chemical_potentials is a per-species vector [μ_0, μ_1, ...]; pass a list of vectors to fan out across replicas (one μ-vector per replica). pressure is optional (default 0 → no P·V term) and may itself be a list for a pressure replica axis. When both are lists their lengths must match; a scalar/single-vector broadcasts across the other’s replicas.

The composition fluctuates here, so pair it with a move that can change species — species_swap conserves composition, alchemical_morph does not.

ensemble:
  type: semi_grand
  chemical_potentials: [0.0, 0.5]    # one vector, 2 species
  pressure: 0.0
ensemble:
  type: semi_grand
  chemical_potentials:               # 3 replicas
    - [0.0, 0.0]
    - [0.0, 0.5]
    - [0.0, 1.0]

termination: — stopping criteria

A list; the run stops when any entry fires. A single mapping is wrapped in a list.

Stop after a fixed number of NS iterations.

Key

Type

Default

Description

termination[].max_iterations

integer or number

required

Stop once the NS iteration counter reaches this value. Honours interval_units, so in per_walker mode it is a number of walker-sweeps.

The blunt instrument — useful to bound a job’s wall time, but the iteration count that reaches a given temperature scales with n_live, so this does not transfer between configs. Prefer prior_mass.

termination:
  - type: iteration
    max_iterations: 20000

Stop once the remaining prior mass falls below threshold.

Key

Type

Default

Description

termination[].threshold

number

0.1

Stop once the remaining prior mass X_i ≈ exp(-i * n_cull / n_live) falls below this fraction. The usual way to terminate: it adapts the iteration count to n_live instead of pinning it. Smaller values sample further into the low-energy tail.

The usual choice: prior mass contracts by (n_live + 1 - n_cull) / (n_live + 1) per iteration (≈ exp(-n_cull / n_live)), so the same threshold means the same depth of exploration regardless of n_live. Smaller values sample further into the low-energy tail.

termination:
  - type: prior_mass
    threshold: 1.e-5

Stop once the NS temperature estimate cools to target_temp.

Key

Type

Default

Description

termination[].target_temp

number

required

Stop once the finite-difference NS temperature estimate has cooled to this value (Kelvin). Useful when you care about reaching a physical temperature rather than an iteration count.

termination[].threshold

number

10.0

Tolerance band around target_temp (Kelvin). The run stops when the estimate first falls within it, absorbing the noise in the finite-difference estimator.

Use when the physics sets the endpoint — “sample down to 100 K” — rather than a count. Relies on the finite-difference estimator, so set output.temperature_kB to match your backend’s energy units or the target is meaningless.

termination:
  - type: temperature
    target_temp: 100.0
    threshold: 10.0

Stop once E_max drops below min_energy.

Key

Type

Default

Description

termination[].min_energy

number

required

Stop once the highest live-walker energy (the NS E_max threshold) drops below this value, in the backend’s own energy units. Backend-specific — a hard floor, not a portable one.

In the backend’s own energy units, so the value does not carry across backends or system sizes. Handy as a safety net next to another criterion — the run stops when any of them fires.

termination:
  - type: prior_mass
    threshold: 1.e-5
  - type: energy
    min_energy: -1000.0

adaptation: — step-size adaptation

Important

Adaptation is on by default: full_auto bisection every adjust_interval iterations. Set adjust_interval: 0 to switch it off and hold every move at its configured step_size.

Key

Type

Default

Description

adaptation.full_auto

boolean

true

Use the bisection step-size search instead of the cheap grow/shrink rule. Each adaptation event runs up to adjust_max_rounds trial batches of adjust_n_samples walkers to land the acceptance rate inside [min_rate, max_rate]. More accurate, markedly more expensive per event.

adaptation.adjust_interval

integer or number

100

Iteration cadence at which step-size adaptation fires. Set 0 to disable adaptation entirely, freezing every move at its configured step_size. Honours interval_units — in per_walker mode use a value <= 1 so adaptation runs at least once per walker-sweep.

adaptation.adjust_n_samples

integer

50

Walkers sampled per trial round when full_auto is set. Larger values give a less noisy acceptance estimate per round at linear cost.

adaptation.adjust_max_rounds

integer

15

Maximum bisection rounds per adaptation event when full_auto is set. Bounds the worst-case cost of a single event.

adaptation.trial_batch_size

integer or null

8

Chunk size for the trial-batch vmap during full_auto adaptation, for memory control. null vmaps over all trial walkers at once (fastest, but largest memory footprint).

adaptation.defaults

mapping

section defaults

Baseline adaptation policy applied to every move that has no per_move override.

adaptation.per_move

mapping of name to mapping

empty

Per-move policy overrides, keyed by move name (the move’s name: if set, otherwise its type:). Fields left unset fall through to defaults, then to the library fallbacks.

Both defaults: and each entry of per_move: take the same policy mapping. Fields left unset fall through: per_move → defaults → library fallback.

Key

Type

Default

Description

adaptation.defaults.min_rate

number or null

null

Acceptance rate below which the step size is shrunk. null inherits from defaults, then from the library fallback (0.25).

adaptation.defaults.max_rate

number or null

null

Acceptance rate above which the step size is grown. null inherits from defaults, then from the library fallback (0.65).

adaptation.defaults.adjust_factor

number or null

null

Multiplicative factor applied to the step size on each adjustment (grow by it, shrink by its inverse). null inherits from defaults, then from the library fallback (1.5).

adaptation.defaults.step_size_max

number or null

null

Ceiling on the adapted step size, in the move’s own units. null inherits from defaults, then from the library fallback (10.0).

init: — where the atoms come from

Exactly one of start_species, start_config_file, start_walker_set or restart_file must be set; setting zero or more than one is an error.

Key

Type

Default

Description

init.start_species

string or null

null

Build the system from a composition string of the form "Z N[, Z N]*", where Z is an atomic number and N a count — e.g. "18 8" for 8 argon atoms, "1 6, 3 6" for 6 H plus 6 Li. Positions and cell are then generated per the randomisation settings below.

init.start_config_file

path or null

null

Read one structure from this file (any ASE-readable format) and replicate it across all walkers.

init.start_walker_set

path or null

null

Read a full, pre-built walker population from this file — one frame per walker. The frame count must match run.n_live (plus run.n_extra).

init.restart_file

path or null

null

Resume from this checkpoint. Restores walkers, iteration counter, and log-evidence; burn-in is skipped and the compatibility validator checks the config against what the checkpoint was written with.

init.start_energy_ceiling_per_atom

number

1000000000.0

Reject initial configurations whose energy per atom exceeds this value, in the backend’s energy units. Guards against seeding the population with overlapping atoms. The default is effectively no ceiling; lower it when initialisation keeps producing unphysical starts.

init.random_initialise_pos

boolean

true

Draw fresh random positions for every walker. Set false to keep the positions exactly as read from start_config_file / start_walker_set.

init.random_initialise_cell

boolean

true

Draw a fresh random cell for every walker, within the cell: volume and aspect-ratio bounds. Set false to keep the input cell.

init.cell_randomization_mode

shape_walk | linear_1d

shape_walk

How random cells are drawn. shape_walk (default) runs a shear/stretch random walk per walker, giving general triclinic cells. linear_1d instead draws a box length a per walker and builds diag(a, 1, 1), the embedding the rens_toy backend needs so that det(cell) == a; the draw spans cell.initial_min_volume_per_atom (falling back to min_volume_per_atom) up to cell.max_volume_per_atom, which is how the RENS paper biases its initial population toward the high-enthalpy end.

init.pos_randomization_mode

grid | uniform

grid

How random positions are drawn. grid (default) places atoms on a jittered lattice with spacing grid_distance, which reliably avoids overlaps; uniform draws uniformly in the cell and relies on rejection against init_distance_criterion.

init.grid_distance

number

1.5

Lattice spacing for pos_randomization_mode: grid (Angstrom). Must be large enough that the grid fits the atoms inside the initial cell.

init.init_distance_criterion

number

1.0

Minimum interatomic distance a drawn configuration must satisfy to be accepted (Angstrom). Distinct from the constraints: section, which is enforced for the whole run rather than only at initialisation.

init.random_init_max_n_tries

integer

100

Rejection-sampling attempts per walker before initialisation gives up and raises. Raise it, loosen init_distance_criterion, or start at a larger volume if you hit the limit.

init.pos_autoscale_cells

boolean

false

Rescale each walker’s cell so the drawn positions fit inside it, instead of rejecting draws that do not fit. Helpful for dense compositions where the grid barely fits.

init.initial_walk: configures the optional fixed-E_max burn-in:

Key

Type

Default

Description

init.initial_walk.n_walks

integer

0

Number of fixed-E_max burn-in walks run between initialisation and nested sampling, to decorrelate the live population from grid or rejection-sampling artefacts. 0 (default) skips burn-in; it is always skipped on restart.

init.initial_walk.walklength

integer

100

MCMC steps per burn-in walk. Together with n_walks this sets the total burn-in cost.

init.initial_walk.adjust_interval

integer

10

Step-size adjustment cadence within burn-in, in walk steps. Independent of adaptation.adjust_interval, which governs the sampling run.

init.initial_walk.emax_offset_per_atom

number

0.0

Raise the fixed burn-in energy ceiling by this much per atom above the initial maximum walker energy. A small positive offset gives the burn-in room to move when the initial population sits right at the ceiling.

init.initial_walk.only

string or null

null

Restrict burn-in to a single named move. Deferred — raises NotImplementedError at run time.

init.initial_walk.write_initial_walkers

boolean

false

Dump the post-burn-in walker population before sampling starts. Deferred — accepted but not yet consumed by the runtime.

init.initial_walk.walker_batch_size

integer or null

null

Chunk walkers during burn-in vmap for memory control. None = full vmap over all walkers (max speed). Any positive int; non-divisors of n_walkers are padded internally.

cell: — cell-geometry bounds

The single source of truth for the volume, shear, and stretch kernels; the resolver threads these values into their kernel_kwargs.

Key

Type

Default

Description

cell.max_volume_per_atom

number

10000.0

Upper bound on cell volume per atom (Angstrom^3). Caps the cell prior: volume, shear, and stretch proposals above it are rejected. The default is deliberately loose — tighten it to stop a gas-phase run from expanding without limit.

cell.min_volume_per_atom

number

1.0

Lower bound on cell volume per atom (Angstrom^3) enforced throughout sampling. Stops the cell collapsing into a region where the energy model is unphysical.

cell.initial_min_volume_per_atom

number or null

null

Lower floor on the initial cell-volume draw (Angstrom^3 per atom), decoupled from the sampling constraint min_volume_per_atom. Lets walkers be initialised on a low-density grid (large volume/atom, so atoms start well separated) while the sampler stays free to compress down to min_volume_per_atom during the run. null (default) falls back to min_volume_per_atom, so initial draws never violate the sampling constraint.

cell.min_aspect_ratio

number

0.8

Minimum ratio of the shortest to the longest cell-vector perpendicular distance. Rejects proposals that would flatten the cell into a sliver, which breaks the minimum-image convention and starves neighbour lists.

cell.flat_V_prior

boolean

false

Sample volume under a flat prior in V instead of the default flat-in-log V prior. Changes the volume-move acceptance ratio; pick the one your reference implementation uses when comparing equations of state.

output: — files, cadence, diagnostics

Key

Type

Default

Description

output.format

string

extxyz

Trajectory writer to use: extxyz (default, ASE-readable text), h5 (compact binary, better for long runs), or none to write no trajectory at all.

output.traj_interval

integer or number

1

Write the culled (dead) walkers to the trajectory every N iterations. 1 (default) keeps every dead point, which is what the post-processing estimators expect; raise it only if trajectory size is a problem.

output.snapshot_interval

integer or number

100

Dump the full live-walker population to <prefix>.snap.<iter>.extxyz every N iterations, for crash inspection. See snapshot_clean.

output.checkpoint_interval

integer or number

100

Write a restartable checkpoint every N iterations. This is the cadence that bounds how much work a crash costs you.

output.info_interval

integer or number

100

Print a progress line (iteration, E_max, log-evidence, per-move acceptance) every N iterations.

output.out_file_prefix

string

ns

Basename shared by every output file, e.g. ns.traj.extxyz, ns.energies, ns.restart.h5.

output.working_dir

path

.

Directory all output is written to. Created if absent; guarded by the output-dir gate, which refuses to overwrite a directory holding a different run unless you restart or resume into it.

output.log_level

info | debug

info

Console log verbosity. debug adds per-iteration resolver, bucket-resize, and adaptation detail.

output.flush_interval

integer or number (> 0)

1000

Flush trace-logger write buffers every flush_interval NS iterations. Default 1000. In per_walker mode this is in walker-sweeps (recommended: 2-10).

output.save_acc_rates

boolean

false

Write per-move, per-chain-phase acceptance rates to <prefix>.acc_rates.h5. The first thing to turn on when diagnosing a stuck or badly adapted chain. Independent of adaptation.full_auto.

output.acc_rates_interval

integer or number

1

Fire AccRatesCallback every N iterations. Default 1 (every iter); set higher for long runs to reduce I/O.

output.save_max_neighbors

boolean

false

Write the observed per-iteration maximum neighbour count to <prefix>.max_neighbors.h5, for tuning backend.max_neighbors_list. No-op for backends without neighbour lists (all-pairs LJ, toy potentials).

output.max_neighbors_interval

integer or number

1

Fire MaxNeighborsCallback every N iterations. Default 1; raise to reduce I/O on long runs.

output.save_re_stats

boolean

false

Write per-fire inter-replica swap statistics to <prefix>.re_stats.h5. Cadence follows inter_re.re_interval — there is deliberately no separate interval. No-op when inter_re is unset.

output.temperature_lag_interval

integer or number or null

100

Length of the E_max FIFO used by the finite-difference temperature estimator (Baldock et al. 2017). Longer lags give a smoother but more delayed estimate. null disables the temperature callback entirely.

output.temperature_interval

integer or number

100

Evaluate and log the temperature estimate every N iterations.

output.temperature_kB

number

8.6173324e-05

Boltzmann constant in the backend’s energy units. The default is eV/K (ASE convention); set 1.0 for reduced-unit backends such as LJ or harmonic, otherwise the reported temperatures are meaningless.

output.collision_check_threshold

number or null

null

Minimum interatomic distance below which CollisionCheckCallback emits a warning. Backend length units (typically Å). null disables the callback.

output.collision_check_interval

integer or number (> 0)

100

Fire CollisionCheckCallback every N iterations. Default 100; a diagnostic, not a per-iter signal.

output.wrap_atoms

boolean

true

Wrap atom positions into each frame’s own cell before writing. Moves are unwrapped Cartesian, so atoms drift arbitrarily far over a run and unwrapped output is scattered across many cell lengths. No-op for non-periodic frames. Set false to keep absolute Cartesians, e.g. to avoid splitting a molecule across a boundary.

output.snapshot_clean

boolean

true

Keep only the most recent walker snapshot, deleting the previous one as each new one lands. Stops the output directory growing by one dump per snapshot_interval. Set false to retain every snapshot.

inter_re: — inter-replica exchange

Optional. Omitting the key disables replica-exchange swaps entirely.

Key

Type

Default

Description

inter_re.flavor

string

pressure

Which exchange protocol to run. pressure swaps walkers between replicas held at different pressures (pressure-RENS); xrens swaps between different target compositions and requires composition_targets; semi_grand swaps between chemical-potential vectors and requires chemical_potentials.

inter_re.re_interval

integer or number

1

Fire a swap attempt every N NS iterations. Honours interval_units; in per_walker mode values below ~0.05 sweeps are almost always a mistake and are warned about.

inter_re.n_swap_cycles

integer

1

Swap cycles performed per fire. Each cycle offers every adjacent replica pair once, so more cycles move walkers further along the ladder per fire.

inter_re.composition_targets

list of list of integer or null

null

Required for flavor: xrens: one target composition per replica, as per-species atom counts (e.g. [[8, 0], [4, 4]] for two replicas of an 8-atom binary system). Every row must have the same length and sum. Ignored — with a warning — by the other flavors.

inter_re.chemical_potentials

list of list of number or null

null

Required for flavor: semi_grand: one per-species chemical-potential vector per replica (eV), e.g. [[0.0, 0.0], [0.5, 1.0]]. All rows must have the same length. Ignored — with a warning — by the other flavors.

constraints: — hard configuration constraints

A list; a single mapping is wrapped in a list. A constraint rejects any proposal that would move a walker into a forbidden region, exactly like the likelihood threshold, and is enforced only on the moves that can violate it — a minimum-distance constraint gates atom-displacement and cell moves, and gates species-changing moves only when its thresholds vary by element pair.

Omitting the key (the default) means no constraints and zero overhead.

constraints:
  - type: minimum_distance
    d_min: 0.8                 # uniform floor (Angstrom)
  - type: minimum_distance
    d_min:                     # per-species-pair floors
      default: 1.0
      Si-Si: 2.0
      Si-O: 1.6

Reject configurations with any inter-atomic distance below d_min.

Key

Type

Default

Description

constraints[].d_min

number or mapping of name to number

required

Minimum allowed interatomic distance (Angstrom). Either a single float applied to every pair, or a mapping of "A-B" element-symbol pairs to floats with an optional "default" key for unlisted pairs (itself defaulting to 0.0, i.e. no floor). Distances use the minimum-image convention under a periodic cell.

d_min is either a single float (a uniform floor for all pairs) or a mapping of "A-B" element-symbol pairs to floats, with an optional "default" key for unspecified pairs (default 0.0 — no constraint). Distances use the minimum-image convention under a periodic cell.

Unlike backend.softcore_repulsion, which deforms the potential below its cutoff and so changes the sampled distribution, a constraint restricts the prior — exactly like the likelihood threshold — and costs nothing where it is not violated.

constraints:
  - type: minimum_distance
    d_min: 0.8
constraints:
  - type: minimum_distance
    d_min:
      default: 1.0
      Si-Si: 2.0
      Si-O: 1.6