Fort78 Analyzer Analysis
fort.78 (external field schedule) analysis utilities.
This module provides helpers for extracting and aligning electric-field
schedule data written by ReaxFF into fort.78 files via Fort78Handler.
Typical use cases include:
- extracting electric-field components versus iteration
- matching field values to other outputs sampled at
iout2frequency - preparing aligned field profiles for plotting with xmolout or summaries
get_fort78_data(handler, variables)
Extract iteration versus one or more variables from a fort.78 file.
Works on
Fort78Handler — fort.78
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handler
|
Fort78Handler
|
Parsed |
required |
variables
|
str or sequence of str
|
Field variable name(s) to extract. Aliases are supported
(e.g. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
Table with columns |
Examples:
>>> from reaxkit.io.handlers.fort78_handler import Fort78Handler
>>> from reaxkit.analysis.per_file.fort78_analyzer import get_fort78_data
>>> h = Fort78Handler("fort.78")
>>> df = get_fort78_data(h, variables=["E_field_z", "E_field_x"])
match_electric_field_to_iout2(f78, ctrl, target_iters, field_var='E_field_z')
Match electric-field values from fort.78 to target iterations.
The matching follows a piecewise-constant rule:
for each target iteration, the last available fort.78 value with
iter <= target_iter is used. By convention, iter = 0 maps to 0.0.
Works on
Fort78Handler + ControlHandler — fort.78 + control
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
f78
|
Fort78Handler
|
Parsed |
required |
ctrl
|
ControlHandler
|
Parsed control handler (used to access |
required |
target_iters
|
sequence of int
|
Iteration numbers to which the electric field should be matched. |
required |
field_var
|
str
|
Electric-field component to use (aliases supported). |
"E_field_z"
|
Returns:
| Type | Description |
|---|---|
Series
|
Series indexed by |
Examples:
>>> field = match_electric_field_to_iout2(
... f78, ctrl, target_iters=[0, 80, 160], field_var="E_field_z"
... )