MoveInfo

class jaxrens.sampling.base.MoveInfo(accepted, log_likelihood, n_evaluations, reject_reason=np.int32(0), move_idx=np.int32(0), n_grad_evaluations=np.int32(0))[source]

Bases: NamedTuple

Metadata returned by every move step.

reject_reason is an int32 scalar:

0 = accepted 1 = rejected by likelihood constraint (energy >= emax) 2 = rejected by cell-geometry constraint (max/min vol, aspect) 3 = rejected by move-specific prior (e.g. volume V^N factor) 4 = rejected by a configuration constraint (e.g. minimum distance);

see jaxrens.constraints. Set by the MWG constraint gate, not by the move kernels themselves.

Moves that only reject by the likelihood constraint (random_walk, galilean, etc.) may leave reject_reason at 0 (default) — callers that want per-reason stats should rely on accepted for those moves.

move_idx is the integer index of the move type that was executed, as assigned by the MWG wrapper (0-based, matching move_descriptors order). Individual move kernels leave this at 0 (default); the MWG step_fn overwrites it with the actual chosen index before returning.

Parameters:
  • accepted (Array)

  • log_likelihood (Array)

  • n_evaluations (int)

  • reject_reason (Array)

  • move_idx (Array)

  • n_grad_evaluations (int)

accepted: Array

Alias for field number 0

log_likelihood: Array

Alias for field number 1

n_evaluations: int

Alias for field number 2

reject_reason: Array

Alias for field number 3

move_idx: Array

Alias for field number 4

n_grad_evaluations: int

Alias for field number 5