Equation Of States Utility
Equation of state (EOS) utilities.
This module centralizes common equation-of-state formulas used across ReaxKit. It is responsible for reusable EOS computations and is not tied to a single workflow implementation.
Usage context
- fitting energy-volume relationships from parsed simulation outputs
- computing legacy trainset-style energies for translated generator logic
Notes
- The two Vinet implementations use different parameterizations/units, so they are conceptually related but not drop-in replacements for each other.
- Explanation for the Rose-Vinet equation of state can be found here: doi:10.1029/JB092iB09p09319
Function: vinet_energy_ev
Compute Vinet EOS energy from volume in eV units.
This evaluates the energy-volume form used for fitting E(V) data in ReaxKit workflows, with bulk modulus expressed in eV/Angstrom^3.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
V
|
ndarray
|
Volume(s) (Angstrom^3). |
required |
E0
|
float
|
Equilibrium energy (eV). |
required |
K0_eV_A3
|
float
|
Bulk modulus at equilibrium (eV/Angstrom^3). |
required |
V0
|
float
|
Equilibrium volume (Angstrom^3). |
required |
C
|
float
|
Vinet shape parameter (dimensionless). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Energy at each volume |
Examples:
>>> import numpy as np
>>> V = np.array([15.0, 16.0, 17.0])
>>> E = vinet_energy_ev(V, E0=-10.2, K0_eV_A3=0.75, V0=16.0, C=4.0)
>>> E.shape
(3,)
Function: vinet_energy_trainset
Compute legacy trainset-style EOS energy from scalar volume input.
This matches the translated Fortran elastic_energy_v2 bulk-block logic.
It returns energies in the generator's legacy energy units and preserves
the existing conversion convention through energy_conversion_factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume
|
float
|
Current volume |
required |
reference_volume
|
float
|
Reference volume |
required |
bulk_modulus_gpa
|
float
|
Bulk modulus |
required |
bulk_modulus_pressure_derivative
|
float
|
Pressure derivative |
required |
reference_energy
|
float
|
Reference energy offset |
0.0
|
energy_conversion_factor
|
float
|
Generator conversion factor currently used in trainset workflows. |
required |
Returns:
| Type | Description |
|---|---|
float
|
EOS energy in the generator's legacy energy units. |
Examples:
>>> e = vinet_energy_trainset(
... volume=16.0,
... reference_volume=16.2,
... bulk_modulus_gpa=180.0,
... bulk_modulus_pressure_derivative=4.2,
... reference_energy=0.0,
... energy_conversion_factor=160.21766208,
... )
>>> isinstance(e, float)
True