Fort99 Analyzer Analysis
fort.99 (training-set and EOS) analysis utilities.
This module provides helpers for analyzing ReaxFF training-set output
stored in fort.99 files, including error inspection, two-body ENERGY
term parsing, and equation-of-state (EOS) analysis for bulk modulus
extraction.
Typical use cases include:
- inspecting QMโFF energy differences for training targets
- parsing pairwise ENERGY terms from fort.99 titles
- constructing energyโvolume datasets using fort.74
- computing bulk modulus via a Vinet equation-of-state fit
fort99_energy_vs_volume(fort99_handler, fort74_handler)
Construct an energyโvolume table from fort.99 and fort.74 data.
Pairwise ENERGY terms from fort.99 are matched with corresponding volumes extracted from fort.74 based on shared identifiers.
Works on
Fort99Handler + Fort74Handler โ fort.99 + fort.74
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fort99_handler
|
TemplateHandler
|
Parsed |
required |
fort74_handler
|
TemplateHandler
|
Parsed |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
Table with columns:
|
Examples:
>>> df = fort99_energy_vs_volume(f99, f74)
get_fort99_bulk_modulus(fort99_handler, fort74_handler, *, iden, source='ffield', shift_min_to_zero=True, flip_sign=False, dropna=True)
Compute the bulk modulus using a Vinet EOS fit to E(V) data.
Energyโvolume points are obtained from pairwise ENERGY terms in
fort.99 and corresponding volumes from fort.74.
Works on
Fort99Handler + Fort74Handler โ fort.99 + fort.74
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fort99_handler
|
TemplateHandler
|
Parsed |
required |
fort74_handler
|
TemplateHandler
|
Parsed |
required |
iden
|
str
|
Identifier ( |
required |
source
|
('ffield', 'qm')
|
Energy source used for fitting. |
"ffield"
|
shift_min_to_zero
|
bool
|
Shift minimum energy to zero to improve numerical conditioning. |
True
|
flip_sign
|
bool
|
Flip the sign of energies before fitting. |
False
|
dropna
|
bool
|
Drop rows with NaN energy or volume values. |
True
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing:
|
Examples:
>>> res = get_fort99_bulk_modulus(
... f99, f74, iden="bulk_0", source="ffield"
... )
>>> res["K0_GPa"]
get_fort99_data(handler, *, sortby='lineno', ascending=True)
Retrieve fort.99 data and compute QMโFF energy differences.
A new column qm_ff_difference is added as:
qm_value - ffield_value.
Works on
Fort99Handler โ fort.99
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handler
|
TemplateHandler
|
Parsed |
required |
sortby
|
str
|
Column name to sort by (e.g. |
"lineno"
|
ascending
|
bool
|
Sort order. |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
fort.99 table including the additional |
Examples:
>>> df = get_fort99_data(h, sortby="error", ascending=False)
parse_fort99_two_body_energy_terms(handler)
Parse pairwise ENERGY terms from the ENERGY section of fort.99.
Only ENERGY titles containing exactly two / separators are kept,
corresponding to two-body interaction terms.
Works on
Fort99Handler โ fort.99
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handler
|
TemplateHandler
|
Parsed |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
ENERGY rows augmented with parsed columns:
|
Examples:
>>> df = parse_fort99_two_body_energy_terms(h)