Notation and symbols¶
This page is the single source of truth for what each symbol in
the jaxrens documentation means. The same letter is sometimes
overloaded across domains (a pressure P and a replicas-per-GPU
P live in different paragraphs but on the same page); when in
doubt, look it up here. New documentation should reference symbols
defined here rather than introducing fresh ones.
Code-side shape conventions¶
The whole NS state is shaped (G, P, K, …) under the most general
descriptor, with leading axes peeled off for simpler runs.
Symbol |
Meaning |
Where it lives |
|---|---|---|
\(G\) |
|
leading axis under |
\(P\) |
|
second axis under |
\(R\) |
|
leading axis under |
\(K\) |
|
walker batch axis on every state field |
\(N\) (or \(N_\mathrm{atoms}\)) |
|
trailing axis on |
\(S\) |
|
length of \(\mathbf c_i\), \(\boldsymbol\mu_i\), \(\mathbf N(\sigma)\) |
\(M\) |
number of move kernels in the MWG composer |
length of |
A typical positions array under PmapVmapRuns
has shape \((G, P, K, N, 3)\); under VmapRuns it collapses to
\((R, K, N, 3)\); under SingleRun
to \((K, N, 3)\).
Nested-sampling quantities¶
Symbol |
Meaning |
|---|---|
\(r\) |
A single configuration in parameter space. In atomistic NS this bundles positions \(\mathbf q\), cell \(h\), and species \(\sigma\). |
\(\pi(r)\) |
Prior density on configurations. |
\(H(r)\) |
The nested-sampling target — whatever ensemble-appropriate scalar the \(H(r) < E_{\max}\) constraint enforces. Despite the name it is not a mechanical Hamiltonian in general: it’s the bare energy \(U\) for NVT, an enthalpy \(U + PV\) for NPT, and a grand potential \(U - \boldsymbol\mu \cdot \mathbf N\) for semi-grand. “\(H\)” is standard NS-literature shorthand carried over here — read it as “the thing \(L\) decreases in,” not literally \(p^2/2m + V(q)\). |
\(L(r)\) |
Nested-sampling likelihood, \(L(r) = e^{-H(r)}\) — fixed for the whole run and temperature-independent: NS orders and retires configurations by \(H\) alone, so no \(\beta\) ever appears while sampling. This is not the canonical-ensemble likelihood \(e^{-\beta H}\); that only appears in postprocessing (see \(\beta\) below). \(L\) is what defines the prior-mass transform \(X(L^\star)\). |
\(U(r)\) |
Bare potential energy (no \(PV\) or \(-\mu N\) term). What backends return. |
\(\beta\) |
Inverse temperature, \(\beta = 1/(k_B T)\). Used only in postprocessing — |
\(Z\) |
Evidence — the integral \(\int L(r)\,\pi(r)\,\mathrm d r\), i.e. \(Z(\beta = 1)\). NS estimates this directly; \(Z(\beta)\) at other \(\beta\) is the postprocessing reweighting above. |
\(X\) |
Prior mass in the constrained-likelihood transform: \(X(L^\star) = \int_{L > L^\star} \pi\,\mathrm d r\). Maps the multi-D integral onto \(X \in [0, 1]\). |
\(L_i^\star\) |
Likelihood threshold at iteration \(i\). Equals the worst live walker’s likelihood when the walker was retired. |
\(E_{\max}\) |
\(H\)-threshold equivalent to \(L_i^\star\) (since \(L = e^{-H}\) is monotonic in \(-H\)). The constraint MCMC enforces is \(H(r) < E_{\max}\). |
\(X_i\) |
Prior mass remaining at iteration \(i\). Expectation \(X_i \approx \exp(-i / K)\) for \(K\) live walkers and \(n_\text{cull} = 1\). |
\(w_i\) |
Trapezoid quadrature weight: \(w_i = \tfrac{1}{2}(X_{i-1} - X_{i+1})\). |
\(i\) |
Outer-loop iteration index (Python). Used in |
Thermodynamic ensemble parameters¶
These are per-replica scalars or vectors stored in
MCState.ensemble_params. In multi-replica runs each is indexed by
the replica \(i \in \{0, \dots, n_\text{total} - 1\}\).
Symbol |
Meaning |
|---|---|
\(P\) |
Pressure (NPT). When ambiguous with the per-device replica axis |
\(V\) |
Cell volume, \(V(h) = \lvert \det h \rvert\) for cell matrix \(h\). |
\(T\) |
Temperature. Not a free parameter in NS — the role of temperature is played by the threshold \(E_{\max}\). Mentioned only in cross-references to ordinary MCMC. |
\(\boldsymbol\mu\) |
Per-species chemical potential vector, length \(S\). |
\(\mathbf N(\sigma)\) |
Species-count vector of a configuration, \(\mathbf N(\sigma)_s = \#\{a : \sigma_a = s\}\). |
\(\mathbf c\) |
Target composition vector, \(\sum_s c_s = N\). Each XRENS replica fixes one. |
\(\Omega\) |
Grand-canonical energy used in semi-grand swaps: \(\Omega = U - \boldsymbol\mu \cdot \mathbf N(\sigma)\). |
\(h\) |
Cell matrix (3×3), columns are the lattice vectors. |
\(\mathbf q\) |
Position array (per atom: ℝ³, per walker: \((N, 3)\)). |
\(\sigma\) |
Species / type array. Integer-valued, per-atom. |
MWG and move kernels¶
Symbol |
Meaning |
|---|---|
\(k\) |
Move-kernel index, \(k \in \{0, \dots, M-1\}\). Stored in |
\(w_k\) |
Move weight (relative). Set in YAML or |
\(p_k\) |
Move probability \(p_k = w_k / \sum_j w_j\). |
\(\alpha(r \to r')\) |
Acceptance for an MCMC proposal from \(r\) to \(r'\). Under NS it reduces to \(\mathbf 1[H(r') < E_{\max}]\). |
\(n_\text{mcmc}\) |
|
\(n_\text{cull}\) |
Walkers retired per iteration (default 1). Affects \(X_i\) contraction. |
\(n_\text{extra}\) |
Extra random live walkers reseeding the MCMC chain per iteration. |
\(\sigma_k\) |
Step size of move \(k\). Stored per-walker in |
The four reject-reason codes used by the trial-rate counters are
constants: 0 = accepted, 1 = energy, 2 = cell, 3 = prior.
Step-size adaptation¶
Symbol |
Meaning |
|---|---|
|
Target acceptance window, e.g. \([0.3, 0.5]\). |
|
Multiplicative bisection factor (>1). |
|
Walkers sampled per bisection round. |
|
Cap on |
|
Outer-loop iterations between adaptation calls; |
Replica exchange¶
Replicas share state shape; what differs is ensemble_params.
Symbol |
Meaning |
|---|---|
\(i, j\) |
Replica indices. Edge labels in inter-RE diagrams use \((i, j)\) for an attempted swap between replica \(i\) and \(j\). |
|
Outer-loop iterations between swap passes. |
|
Number of (even, odd) phases per fire. |
\(\alpha_{ij}\) |
Swap acceptance. Form depends on flavor — see Replica topology and inter-RE for the three derived expressions (Pressure-RENS, XRENS, semi-grand). |
\(\mathcal{M}_{\mathbf c}(\sigma, \xi)\) |
Random morph operator: re-permutes species labels of \(\sigma\) to a new vector with composition exactly \(\mathbf c\). \(\xi\) is the auxiliary randomness. |
\(\tilde U_i\) |
Re-evaluated potential after a morph: \(\tilde U_i = U(\mathbf q_j, \mathcal{M}_{\mathbf c_i}(\sigma_j), h_j)\). Two such evaluations per XRENS swap pair. |