Skip to content

Molfra Handler

ReaxFF molecular fragment analysis (molfra.out) handler.

This module provides a handler for parsing ReaxFF molfra.out and molfra_ig.out files, which report molecule/fragment compositions and their frequencies as a function of simulation iteration.

Typical use cases include:

  • tracking molecular species formation and decay
  • monitoring reaction pathways and fragment distributions
  • computing molecule counts and system-level mass summaries

MolFraHandler

Bases: BaseHandler

Parser for ReaxFF molecular fragment output files (molfra.out, molfra_ig.out).

This class parses molecular fragment frequency data and exposes both per-molecule and per-iteration summary information as structured tabular datasets.

Parsed Data

Molecule table One row per (iteration, molecular species), returned by dataframe(), with columns: ["iter", "molecular_formula", "freq", "molecular_mass"]

Totals table One row per iteration, accessible via totals(), with columns: ["iter", "total_molecules", "total_atoms", "total_molecular_mass"]

Metadata Returned by metadata(), containing: ["n_records", "n_iters", "iter_min", "iter_max", "molecular_formulas"]

Notes
  • Molecular species are identified by their chemical formula strings.
  • Frequency values represent counts per iteration.
  • Totals are parsed from summary blocks following molecule listings.
  • This handler is iteration-based rather than frame-based, but exposes a minimal frame-like API for consistency.

by_type(mtype)

Return rows for a given molecule type.

frame(i)

Return a per-iter 'frame' view:

n_frames()

molfra.out is not frame-based; expose unique iters instead.

totals()

Return total molecules/atoms/molecular_mass per iter.