partition_function

jaxrens.postprocess.thermodynamics.partition_function(beta, dead_energies, live_energies, n_live, n_cull=1, dead_volumes=None, live_volumes=None)[source]

Log partition function log Z(beta) at inverse temperature beta.

Z(beta) = Σ_i w_i exp(-beta · E_i) over the merged dead+live ensemble.

Parameters:
  • beta – Inverse temperature 1/(k_B T).

  • dead_energies – Dead point energies, shape (*batch, n_dead).

  • live_energies – Live walker energies, shape (*batch, n_live) or (n_live,).

  • n_live – Number of live walkers.

  • n_cull (int) – Number culled per iteration.

  • dead_volumes – Optional P V terms added to dead_energies, for energies that do not include them yet. Shape must broadcast with dead_energies. Energies streamed by an NPT run are already H = U + P V: pass nothing then.

  • live_volumes – Optional P V terms added to live_energies, same rules as dead_volumes.

Returns:

log Z(beta) with shape batch — scalar for 1-D input.

Return type:

ndarray