jaxrens.utils.cell

Cell/box utility functions for periodic systems.

All functions are jit-compatible: no Python conditionals on traced values.

Functions

check_cell_shape

Check whether cell shape satisfies geometric criteria.

get_cell_transformation

Compute transformation matrix T such that new_cell = old_cell @ T.

get_volume

Return the volume of a cell: |det(cell)|.

min_aspect_ratio

Minimum aspect ratio across 3 cell vector pairs.

nonperiodic_safe_cell

Substitute a large cubic dummy box when cell is degenerate.

transform_positions

Transform positions from old cell to new cell.

wrap_positions

Wrap atom positions into the home unit cell (fractional coords in [0, 1)).