Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 27 Jun 12:50
· 372 commits to main since this release
933adea

Removed

  • Python 3.11 support. oxyz now requires Python 3.12+, following
    SPEC 0 (a Python version is
    dropped three years after release; 3.11's window closed Q4 2025). Wheels are
    now abi3 for CPython 3.12+. Users on 3.11 can pin oxyz<0.3.

Added

  • oxyz.metatomic reads extxyz into metatomic.torch.Systems without an ASE
    round-trip. read/iread mirror oxyz.ase (the same index grammar, plus
    dtype/device/*_requires_grad matching systems_to_torch); a
    SystemSource handle parses a file once and serves systems() alongside
    array-native per_config / per_atom tensor extraction for targets. New
    optional extra oxyz[metatomic] (torch >=2, metatomic-torch). Parity tests
    hold the result equal to systems_to_torch(ase.io.read(...)).
  • oxyz.torch_sim reads extxyz into torch_sim.SimState, reproducing
    torch_sim.io.atoms_to_state(ase.io.read(...)) without the ASE round-trip.
    Because SimState is natively batched, read returns a single batched state
    (the whole selection) and iread streams the file as batched states (with
    oxyz.iter_batches's binning knobs); a SimStateSource serves the state plus
    array-native per_config / per_atom extraction. Cells use torch_sim's
    column convention, all systems share one pbc (frames that disagree raise), and
    masses come from a masses column or an ASE-parity atomic-weight table. New
    optional extra oxyz[torch-sim] (torch >=2, torch-sim-atomistic); parity
    tests hold the result equal to atoms_to_state(ase.io.read(...)).
  • oxyz.read_batch(path, indices=None) reads the whole file into one Batch in
    a single pass; an empty file yields the empty batch.
  • oxyz.iter_batches(memory_scales_with=..., max_scaler=...) packs frames into
    balanced bins (best-fit-decreasing) for roughly equal per-batch memory,
    weighting each frame by "n_atoms" or by "n_atoms_x_density"
    (n_atoms**2 / volume, a proxy for the neighbour-graph size that drives MLIP
    memory). A frame over the budget gets its own bin; provenance is kept in
    frame_indices.
  • oxyz.scan(path, with_volume=True) additionally records each frame's cell
    volume |det(Lattice)| in FrameIndex.volumes (NaN where a frame has no
    Lattice), reading one extra line per frame; it backs the density weight.