run_ns¶
- jaxrens.sampling.nested_sampling.run_ns(positions, types, energies, cells, init_fn, step_fn, rng_key, n_walkers=None, max_iterations=None, n_mcmc_steps=20, n_extra=0, n_cull=1, convergence_threshold=0.1, initial_step_size=0.1, target_acceptance=0.5, callbacks=None, termination_criteria=None, ensemble_params=None, per_move_fns=None, move_descriptors=None, adjust_interval=0, adjust_n_samples=50, adjust_max_rounds=15, adjust_factor=1.5, trial_batch_size=None, restart_state=None, max_neighbors_list=(30, 35, 40, 45, 50), max_neighbors_offset=5, max_neighbors_shrink_dwell=0, initial_max_neighbor_counts=None)[source]¶
Run a full nested sampling calculation.
Thin wrapper: validates args, initialises NSState, constructs descriptor + adapt_step, delegates to
_run_loop, and packages the result dict (live state + scalars only — dead-point history is persisted to disk by the per-iteration callbacks, not returned).max_iterationsis optional; whenNonethe loop runs until another termination criterion fires (typicallyPriorMassTermination). Pass an explicit integer to add anIterationTerminationto the default criteria.Returns a backward-compatible result dict.
- Parameters:
positions (Array)
types (Array)
energies (Array)
cells (Array | None)
init_fn (Callable)
step_fn (Callable)
rng_key (Array)
n_walkers (int | None)
max_iterations (int | None)
n_mcmc_steps (int)
n_extra (int)
n_cull (int)
convergence_threshold (float)
initial_step_size (float)
target_acceptance (float)
termination_criteria (list[TerminationCriterion] | None)
ensemble_params (dict | None)
move_descriptors (list | None)
adjust_interval (int)
adjust_n_samples (int)
adjust_max_rounds (int)
adjust_factor (float)
trial_batch_size (int | None)
max_neighbors_offset (int)
max_neighbors_shrink_dwell (int)
initial_max_neighbor_counts (Array | None)
- Return type: