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. |
None
|
ascending
|
bool
|
Sort order when |
True
|
drop_duplicate
|
bool
|
If True, drop duplicate rows by |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Params table with columns such as:
|
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 sectionff_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 ( |
True
|
sep
|
str
|
Separator used for building |
"-"
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Interpreted params table including the original params fields plus:
- |
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)