Base Engine Utility
Base file-handler abstraction for ReaxKit.
This module defines the abstract FileHandler class, which provides the
common interface and lifecycle used by all ReaxKit file handlers
(e.g., XmoloutHandler, Fort7Handler, SummaryHandler).
The base class standardizes how ReaxFF output files are:
- loaded from disk
- parsed lazily into structured tabular data
- exposed via a uniform DataFrame-based API
- accompanied by lightweight metadata
All ReaxKit analysis functions rely on FileHandler subclasses to provide
a consistent, predictable view of parsed ReaxFF files.
Usage context
- ReaxFF parsing: Read ReaxFF text outputs into normalized tabular structures.
- Workflow ingestion: Provide canonical handler interfaces used by adapters/workflows.
- Diagnostics/export: Preserve parsed metadata for reporting and downstream conversion.
Class: BaseHandler
Bases: ABC
Abstract base class for ReaxKit file handlers.
This class defines the minimal public interface that all ReaxKit file handlers must implement. Subclasses are responsible for parsing a specific ReaxFF file format and exposing its contents as structured pandas DataFrames.
Parsed Data
Main table
A pandas.DataFrame returned by dataframe(), whose columns
depend on the specific file type.
Metadata
A dictionary of lightweight metadata returned by metadata(),
typically including global or per-file attributes.
Notes
- Parsing is performed lazily and cached after the first access.
- Parsed payloads are also cached across handler instances using: 1) an in-process memory cache 2) an on-disk cache
- Subclasses must implement the private
_parse()method.