Skip to content

Summary Analyzer Analysis

summary.txt analysis utilities.

This module provides helper functions for accessing scalar, per-frame summary quantities written by ReaxFF into summary.txt files via SummaryHandler.

Typical use cases include:

  • extracting a single summary quantity (e.g. potential energy) as a time series
  • selecting subsets of frames for post-processing or plotting
  • working with canonical column names and legacy aliases transparently

get_summary_data(handler, feature, frames=None)

Extract a single summary quantity from summary.txt as a pandas Series.

Canonical column names (e.g. E_pot) and legacy aliases (e.g. Epot(kcal/mol)) are both supported.

Works on

SummaryHandler — summary.txt

Parameters:

Name Type Description Default
handler SummaryHandler

Parsed summary.txt handler.

required
feature str

Name or alias of the summary quantity to extract.

required
frames slice or sequence of int

Frame indices to include. If None, all frames are returned.

None

Returns:

Type Description
Series

Series containing the requested summary quantity, indexed by frame.

Examples:

>>> from reaxkit.io.handlers.summary_handler import SummaryHandler
>>> from reaxkit.analysis.per_file.summary_analyzer import get_summary_data
>>> h = SummaryHandler("summary.txt")
>>> epot = get_summary_data(h, "E_pot")
>>> epot_head = get_summary_data(h, "Epot(kcal/mol)", frames=slice(0, 10))