CollisionCheckCallback

class jaxrens.cli.monitor.CollisionCheckCallback(threshold, interval=100, max_offenders=4)[source]

Bases: object

Periodically scans walkers for unphysically close atom pairs.

Computes the minimum interatomic distance per walker using the minimum-image convention when population.cell is present, and plain all-pairs otherwise. When any walker falls below threshold, a warning is logged identifying the worst-offender replicas + walkers and their minimum pair distance.

Diagnostic only — never feeds back into the run. Works for SingleRun, VmapRuns, and PmapVmapRuns shape conventions via info["_batcher"].

Parameters:
  • threshold (float) – Pair distance below which a warning fires. Backend length units (typically Å).

  • interval (int) – Fire every interval iterations. Default 100 — this is a diagnostic, not a per-iter signal.

  • max_offenders (int) – Cap on the number of (run, walker) entries included in the warning message. Default 4.