jaxrens.io.formats

Format conversion utilities: WalkerState <-> ASE Atoms <-> HDF5.

Serialization contract

The in-memory single-walker type is WalkerState. On disk / at the callback boundary a walker is a loose dict whose unit-cell key is box (extxyz/HDF5 convention), and a batched population is a dict with plural keys positions/types/energies/cells built by population_record(). This module is the only seam that converts between the two: ensure_walker_state() / WalkerState.from_record() on the way in, iter_walker_states() to expand a batched record, and the walker_to_* writers on the way out. Everything else works with typed WalkerState objects and attribute access.

Functions

ase_atoms_to_walker

Convert ASE Atoms to WalkerState.

ensure_walker_state

Normalize walker to a WalkerState, converting a loose dict once.

h5_group_to_walker

Read WalkerState from an HDF5 group.

iter_walker_states

Yield one WalkerState per walker from a batched population record.

population_record

Build the canonical batched-population serialization dict.

walker_to_ase_atoms

Convert a WalkerState (or loose walker dict) to ASE Atoms.

walker_to_h5_group

Write WalkerState arrays into an HDF5 group.