Expand description
Binary data I/O for OxiPhysics trajectory files.
Provides a compact binary header, frame-level read/write of atomic positions, little-endian byte-conversion helpers, and lossy quantized compression for trajectory data.
Structs§
- Binary
Header - Binary file header for an OxiPhysics trajectory file.
Constants§
- HEADER_
SIZE - Byte size of a serialised
BinaryHeader.
Functions§
- compress_
positions_ quantized - Lossy quantization of positions to
i16. - decompress_
positions_ quantized - Reconstruct positions from quantized
i16data. - f32_
from_ bytes_ le - Decode a
f32value from 4 little-endian bytes. - f32_
to_ bytes_ le - Encode a
f32value as 4 little-endian bytes. - f64_
from_ bytes_ le - Decode a
f64value from 8 little-endian bytes. - f64_
to_ bytes_ le - Encode a
f64value as 8 little-endian bytes. - read_
binary_ header - Read a
BinaryHeaderfrompath. - read_
frame_ binary - Read one frame of
n_atomsatomic positions from an open file. - write_
binary_ header - Write a
BinaryHeadertopath, creating or truncating the file. - write_
frame_ binary - Write one frame of atomic positions to an open file.