Skip to content

Xmolout Handler

ReaxFF trajectory output (xmolout) handler.

This module provides a handler for parsing ReaxFF xmolout files, which store atomic trajectories from MD runs or MM minimizations.

xmolout files contain repeated coordinate frames with associated cell parameters and energies and are commonly used for visualization and structural analysis.

XmoloutHandler

Bases: BaseHandler

Parser for ReaxFF trajectory output files (xmolout).

This class parses xmolout files and exposes both a per-frame summary table and per-frame atomic coordinate tables.

Parsed Data

Summary table One row per frame, returned by dataframe(), with columns: ["num_of_atoms", "iter", "E_pot", "a", "b", "c", "alpha", "beta", "gamma"]

Duplicate iteration indices are removed by keeping the last
occurrence.

Per-frame atom tables Stored in self._frames, one table per frame, where each table has at least the columns: ["atom_type", "x", "y", "z"]

Any additional per-atom columns present in the file are preserved
per frame. If their names are not provided explicitly, they are
auto-named as ``unknown_1``, ``unknown_2``, …

Metadata Returned by metadata(), containing: ["simulation_name", "n_atoms", "n_frames", "has_time"]

Notes
  • Frames are inferred from the repeating #atoms → header → atoms pattern.
  • The number of atoms is assumed constant across all frames.
  • This handler supports lightweight frame access via frame(i) and streaming access via iter_frames(step=...).

frame(i)

Return a lightweight frame dict: coords + atom_types + iter for frame i.