prometheus.thermo_data.parsers.janaf
Parser for JANAF thermochemical table data (.jnf format).
Produces rows in the janaf.csv schema used by SpeciesDatabase._load_janaf.
Raw source file: JANAF.jnf
File format
Each species block begins with a header line:
{HillFormula} {phase_code}
followed immediately by a fixed column-header line, then one CSV data row per temperature point:
T,Cp,S,[G-H(Tr)]/T,H-H(Tr),Delta_fH,Delta_fG,log(Kf)
0.0,0.0,0.0,inf,-6.197,904.858,,
100.0,20.786,...
The next species block starts at the next line that begins with an uppercase
letter and does not start with T,.
Classes
Parse a JANAF.jnf file into janaf.csv rows. |
- class prometheus_equilibrium.thermo_data.parsers.janaf.JANAFParser
Bases:
objectParse a JANAF.jnf file into janaf.csv rows.
Usage:
rows = JANAFParser().parse("raw/JANAF.jnf") # rows is a list of lists; first row is the header
The first row of the return value is always
JANAF_COLUMNS.- parse(path: str, source: str = '') List[List[str]]
Parse path and return all rows (header + data) as string lists.
Each data row has 11 fields matching
JANAF_COLUMNS. Empty fields are represented as empty strings.- Parameters:
path – Path to the JANAF.jnf file.
source – Human-readable label for this data source (e.g.
"JANAF-4th-Ed"). Logged at INFO level; not embedded in CSV rows (schema is fixed).
- Returns:
List of rows; first row is the column-header list.