prometheus.thermo_data.parsers.shomate
Loader/validator for the hand-authored NIST Shomate database (shomate.json).
Unlike the other parsers, Shomate data has no machine-readable raw source format — coefficients are looked up manually from the NIST WebBook (https://webbook.nist.gov) and the F coefficient is computed by hand to encode ΔfH°(298.15 K). This module therefore acts as:
A loader that reads and validates an existing
shomate.json.A template helper that prints a ready-to-paste JSON stub for a new species, to be filled in from NIST WebBook data.
Adding a new Shomate species
Look up A–E and G on the NIST Chemistry WebBook (Shomate equation tab).
Note ΔfH°(298.15 K) from JANAF or NIST-JANAF tables (kJ/mol).
Compute F so that
H(298.15 K) = ΔfH°:t = 0.29815 # T / 1000 at 298.15 K polynomial_sum = A*t + B*t²/2 + C*t³/3 + D*t⁴/4 - E/t F = delta_f_H298_kJ_mol - polynomial_sum
Verify Cp and S at 298.15 K against literature.
Paste the output of
ShomateParser.template()intoshomate.json.
shomate.json schema
Keys starting with _ (e.g. _schema) are metadata and are skipped.
Each species entry:
"<ID>": {
"elements": {"Bi": 2, "O": 3},
"phase": "S",
"alias": "Bi2O3", // optional
"_note": "...", // optional verification note
"segments": [
{
"t_low": 298.0,
"t_high": 1097.0,
"coefficients": [A, B, C, D, E, F, G, H]
}
]
}
H (the 8th coefficient) is the NIST standard-enthalpy reference value
and is stored for documentation purposes; it is not used in any calculation.
Classes
Load and validate a |
- class prometheus_equilibrium.thermo_data.parsers.shomate.ShomateParser
Bases:
objectLoad and validate a
shomate.jsonfile.This is a passthrough loader: the JSON is already in the compiled schema and requires no format translation. The parser validates required fields and normalises optional ones.
Usage:
db = ShomateParser().parse("shomate.json") # db is a Dict[str, dict] ready for ThermoCompiler
- parse(path: str) Dict[str, dict]
Load path and return a validated dict keyed by species ID.
Entries whose keys start with
_are skipped (metadata). Species that fail validation are logged and excluded.- Returns:
{sp_id: record}in the shomate.json schema.
- static template(elements: Dict[str, float], phase: str, t_low: float = 298.0, t_high: float = 1000.0, alias: str | None = None, delta_f_H298_kJ_mol: float | None = None) str
Return a JSON stub for a new Shomate species, ready to paste into shomate.json.
- Parameters:
elements – Element dict, e.g.
{"Bi": 2, "O": 3}.phase – Phase character:
"G","L", or"S".t_low – Lower temperature bound (K), default 298.0.
t_high – Upper temperature bound (K), default 1000.0.
alias – Human-readable name (optional).
delta_f_H298_kJ_mol – ΔfH°(298.15 K) in kJ/mol (optional, for the note).
- Returns:
Formatted JSON string suitable for copy-pasting into
shomate.json.
Example:
print(ShomateParser.template({"Al": 2, "O": 3}, "S", alias="Al2O3"))