TrajectoryWriter

class jaxrens.io.trajectory.TrajectoryWriter(*args, **kwargs)[source]

Bases: Protocol

Protocol for trajectory output backends.

The three writers below implement it structurally (no inheritance); TrajectoryCallback in jaxrens.cli.monitor only ever calls these three methods.

write_dead_point(iteration, walker, energy, cull_rank=None)[source]

Write one dead point.

cull_rank is the walker’s position (0 = highest energy) among the n_cull walkers culled in this iteration; None when n_cull == 1, so single-cull output is unchanged.

Parameters:
Return type:

None