Skip to content

Params Analyzer Analysis

params (tunable-parameter list) analysis utilities.

This module provides helpers for working with ReaxFF params files via ParamsHandler, and optionally interpreting each params entry as a pointer into the corresponding ffield section via FFieldHandler.

Typical use cases include:

  • loading params tables with optional duplicate removal and sorting
  • translating (ff_section, ff_section_line, ff_parameter) into an ffield parameter name/value
  • attaching human-readable interaction labels (e.g., C-H, C-C-C) when available

get_params_data(handler, *, sort_by=None, ascending=True, drop_duplicate=True)

Retrieve params entries as a DataFrame with optional sorting and de-duplication.

Works on

ParamsHandler — params / params.in

Parameters:

Name Type Description Default
handler ParamsHandler

Parsed params handler.

required
sort_by str

Column name to sort by (e.g. ff_section, min_value, max_value). If None, rows are returned in file order.

None
ascending bool

Sort order when sort_by is specified.

True
drop_duplicate bool

If True, drop duplicate rows by (ff_section, ff_section_line, ff_parameter), keeping the first occurrence.

True

Returns:

Type Description
DataFrame

Params table with columns such as: ff_section, ff_section_line, ff_parameter, search_interval, min_value, max_value, inline_comment.

Examples:

>>> from reaxkit.io.handlers.params_handler import ParamsHandler
>>> from reaxkit.analysis.per_file.params_analyzer import get_params_data
>>> h = ParamsHandler("params")
>>> df = get_params_data(h, drop_duplicate=True)

interpret_params(params_handler, ffield_handler, *, add_term=True, sep='-')

Interpret each params row as a pointer into the corresponding ffield section.

Each params entry points to an ffield value using:

  • ff_section: section number (1..7 → general, atom, bond, off-diagonal, angle, torsion, hbond)
  • ff_section_line: 1-based row number within that ffield section
  • ff_parameter: 1-based index of the tunable parameter within that row
Works on

ParamsHandler + FFieldHandler — params + ffield

Parameters:

Name Type Description Default
params_handler ParamsHandler

Parsed params handler.

required
ffield_handler FFieldHandler

Parsed ffield handler.

required
add_term bool

If True, include a human-readable interaction label (term) for multi-body sections when available (e.g. C-H, C-C-C).

True
sep str

Separator used for building term labels.

"-"

Returns:

Type Description
DataFrame

Interpreted params table including the original params fields plus: - ffield_section_key and ffield_section_name - ffield_row_index (0-based row index) - ffield_param_name (parameter column name in ffield) - ffield_value (current value from ffield) - term (optional interaction label)

Examples:

>>> from reaxkit.io.handlers.params_handler import ParamsHandler
>>> from reaxkit.io.handlers.ffield_handler import FFieldHandler
>>> from reaxkit.analysis.per_file.params_analyzer import interpret_params
>>> p = ParamsHandler("params")
>>> f = FFieldHandler("ffield")
>>> df = interpret_params(p, f, add_term=True)