mod nested

module nested

Nested search: population under a descending energy ceiling. Nested search: the quenched landscape under a descending ceiling.

Measured negative. This module is kept as the reproducibility record of a mechanism that was built, measured against paired controls, and refuted; the numbers and the mechanism of failure are in docs/derivations/. It is not part of the recommended configuration and ships as evidence, not as advice.

Where this comes from

The eigensolver lineage splits hard spectra into windows and solves inside each window with walls rather than gradients: spectrum slicing and shift-invert in the EISPACK tradition, contour filters in its modern descendants, the divide-and-merge of Cuppen (doi:10.1007/BF01396757) at the core of ELPA (doi:10.1088/0953-8984/26/21/213201). The statistical form of the same idea is nested sampling (Skilling, doi:10.1214/06-BA127): hold a population of K states, repeatedly discard the worst and replace it with a clone of a survivor evolved under the hard constraint E < E_worst. The ceiling descends by order statistics, each replacement compresses the reachable volume by about K/(K+1), and no Metropolis ratio appears anywhere. Applied to the quenched landscape of a cluster this is the construction of Partay, Bartok and Csanyi (doi:10.1021/jp1012973).

Why it fits the measured obstruction

Measured on the 38-point double funnel: the crossing into the funnel that holds the answer completes from precursor structures above the incumbent best, reached through accepted uphill moves, and under Metropolis every intermediate of that excursion must survive its own test, so the excursion survives with the product of its acceptance probabilities. Under a ceiling there is no product: any state below the ceiling is free, so precursors stay reachable for as long as the ceiling has not passed them. The population keeps both funnels alive without being told funnels exist, which is deflation by bookkeeping rather than by penalty.

Nothing here reads an order parameter, a template or a morphology. The moves are the library’s own, the constraint is the energy the run measures for itself, and the one dimensionless choice is the population size.

Functions

Runs the nested search until the ledger refuses.

The walk under the ceiling uses the lean library: the arms measured to carry improvements. A trial is screened with a short relaxation first and promoted to a full quench only when the screened energy is not hopelessly above the ceiling, which is the same economy the driver’s screen buys.

Structs and Unions

struct NestedConfig

Configuration for the nested search.

n_points: usize

Points in a state.

live: usize

Live points. Resolution of the compression: each replacement removes about 1/K of the reachable volume, so larger is slower and finer.

walk: usize

Constrained walk steps per replacement.

screen_steps: usize

Relaxation steps for the screening pass of the walk.

relax_steps: usize

Relaxation steps for a full quench.

temperature: f64

Move scale handed to the kernels.

Implementations

impl NestedConfig

Functions

fn for_cluster(n: usize) -> Self

Defaults for an n-point cluster: the driver’s own screen and quench lengths, the lean move library’s scale, and a population sized to the cluster rather than tuned.

struct NestedOutcome

Outcome of a nested search.

best: f64

Best quenched energy seen.

best_x: Array1<f64>

The structure that reached it.

replacements: usize

Ceiling replacements performed.

steps: usize

Constrained walk steps taken.

taken: usize

Walk steps whose trial fell below the ceiling and was taken.

final_ceiling: f64

The ceiling when the budget died.

repopulations: usize

Fresh populations started after the posterior said the previous one had drained its reachable volume.

curve: VolumeCurve

The death record, for the volume-energy curve.

struct VolumeCurve

A posterior over the landscape’s volume-energy curve, fed by the deaths.

Each replacement kills the worst of K live points, and the reachable volume contracts by a Beta(K, 1) factor, so ln V after death i is a sum of independent Exponential(K) decrements: mean i / K, variance i / K^2, exactly known. The pairs (E_i, ln V_i) are therefore direct, honestly noised observations of the integrated density of minima – the quantity Wang-Landau style estimation reconstructs from biased histograms with a gain schedule. Here it arrives as order statistics with analytic error.

What it is for: the run’s own stopping rule. The volume still reachable below the incumbent best is extrapolated from the curve’s slope, and when the posterior probability that meaningful volume remains falls below a threshold, the compression has provably outrun the landscape and the budget is better spent on a fresh population than on a dead one.

deaths: Vec<f64>

Death energies, in the order they occurred.

k_at: Vec<usize>

Live points at each death.

Implementations

impl VolumeCurve

Functions

fn log_volume(&self, i: usize) -> (f64, f64)

Mean and standard deviation of ln V at death i.

fn mass_below(&self, floor: f64, eps: f64) -> Option<f64>

Posterior probability that the volume still reachable below floor exceeds eps of the current volume, under the local linear model of ln V(E) continued past the ceiling.

The decision this feeds: while the probability is high, keep compressing, because the measured curve says undrained volume remains below the incumbent; once it collapses, the population has converged onto structures the curve says are the last ones, and further replacements only re-sample them.

fn record(&mut self, energy: f64, k: usize)

Records a death at energy with k live points.

fn slope(&self, window: usize) -> Option<(f64, f64)>

The local slope d ln V / dE near the current ceiling, by least squares over the last window deaths, with its standard error.

This is the reciprocal statistical temperature of the minima distribution at the ceiling, measured rather than assumed. A steep slope says the volume is draining fast per unit energy: many minima per energy still ahead. A flattening slope says compression has reached a floor.