jaxrens.constraints.cell_geometry

Cell-geometry configuration constraint.

Rejects simulation cells outside the allowed volume-per-atom band or below a minimum aspect ratio — the hard geometric guard that the cell-move kernels (volume / shear / stretch) apply to keep walkers in physically reasonable boxes (MoveInfo.reject_reason == 2).

This expresses that guard in the constraints vocabulary (a depends_on={"cell"} predicate) so its definition lives in one place and the cell kernels consult it rather than each owning the geometry logic.

Kernel-claimed, not gate-registered. Every cell-mutating move already checks this predicate internally — it must, because the result also gates the move’s neighbor-bucket bookkeeping (a sub-min-volume cell can inflate the neighbor count ~10x, which should not leak into the outer-loop bucket) and its reject-reason ordering (energy > cell > prior). Registering it with the central MWG gate as well would evaluate it a second time on exactly those moves for no benefit, since the kernel has already enforced it. So the resolver does not add this as a gate descriptor; the cell_geometry_descriptor() factory exists for completeness / future moves that don’t self-check. The stochastic volume V^N prior (reject_reason == 3) is intentionally not part of this — it stays in the volume kernel, being a proposal-dependent Metropolis factor, not a hard predicate on the configuration.

Functions

build_cell_geometry

Build a cell-geometry predicate.

cell_geometry_descriptor

Wrap the cell-geometry guard as a ConstraintDescriptor.