RestartBundle

class jaxrens.init.restart.RestartBundle(dead_energies, dead_positions, dead_volumes, log_evidence, iteration, emax, n_dead, step_sizes=None, rng_key_data=None)[source]

Bases: object

NS-state fields needed to resume a run after a crash.

Live-walker state (positions, types, cells, energies, symbol_map) is carried separately in ResolvedInit; this bundle holds only the NS-state scalars and dead-point history that init_ns needs to seed NSState.

Variables:
  • dead_energies (jax.jaxlib._jax.Array | None) – Dead-point potentials, shape (n_dead,).

  • dead_positions (jax.jaxlib._jax.Array | None) – Dead-point positions, shape (n_dead, n_atoms, 3).

  • dead_volumes (jax.jaxlib._jax.Array | None) – Dead-point volumes, shape (n_dead,), or None for NVT.

  • log_evidence (float) – Running log-evidence estimate at checkpoint time.

  • iteration (int) – NS iteration count at checkpoint time.

  • emax (float) – NS contour at checkpoint time (last enforced by ns_step). Legacy checkpoints lacking the emax field surface here as +inf; the first post-restart ns_step rewrites it from pop.energy, and run_loop suppresses adapt at the restored iter via the i > 0 gate so a stale +inf can’t leak into trial-walker constraints.

  • n_dead (int) – Number of dead points stored.

  • step_sizes (jax.jaxlib._jax.Array | None) – Adapted per-move step sizes for this slot’s live walkers, shape (K, n_moves), or None for legacy checkpoints that pre-date persisting them. When present, init_ns overrides the freshly-seeded population step sizes with these so a resumed run continues from the converged step instead of re-running burn-in adaptation from the configured initial step size.

  • rng_key_data (ndarray | None) – Raw uint32 PRNG buffer (output of jax.random.key_data) for this slot, or None for legacy checkpoints that pre-date persisting the PRNG state. init_ns re-wraps with jax.random.wrap_key_data when present, so resumed runs continue the saved random stream instead of silently reseeding from the CLI seed.

Parameters:
  • dead_energies (Array | None)

  • dead_positions (Array | None)

  • dead_volumes (Array | None)

  • log_evidence (float)

  • iteration (int)

  • emax (float)

  • n_dead (int)

  • step_sizes (Array | None)

  • rng_key_data (ndarray | None)