uclchem.makerates.heating#
Heating and cooling calculations for UCLCHEM reactions.
Provides functions to set reaction exothermicities from thermochemical databases or custom CSV files with various units.
Module Contents#
Functions#
|
Convert exothermicity to erg per reaction. |
|
Load custom exothermicities from CSV. |
|
Find matching reaction in list. |
|
Parse species list from CSV row. |
|
Set reaction exothermicities from custom CSV. |
Attributes#
- uclchem.makerates.heating.convert_to_erg(value: float, unit: str) float[source]#
Convert exothermicity to erg per reaction.
- uclchem.makerates.heating.load_custom_exothermicities(csv_path: str | pathlib.Path) pandas.DataFrame[source]#
Load custom exothermicities from CSV.
Expected columns: reactant1-3, product1-4, exothermicity, unit
- Parameters:
csv_path (str | Path) – Path to CSV file
- Returns:
df – DataFrame with custom exothermicities
- Return type:
pd.DataFrame
- Raises:
ValueError – If the csv is missing certain columns.
- uclchem.makerates.heating.match_reaction(reactants: list[str], products: list[str], reactions: list[uclchem.makerates.reaction.Reaction]) uclchem.makerates.reaction.Reaction | None[source]#
Find matching reaction in list.
- uclchem.makerates.heating.parse_species_from_row(row: pandas.Series, prefix: str) list[str][source]#
Parse species list from CSV row.
- uclchem.makerates.heating.set_custom_exothermicities(reactions: list[uclchem.makerates.reaction.Reaction], csv_path: str | pathlib.Path, overwrite: bool = True) tuple[int, int][source]#
Set reaction exothermicities from custom CSV.
- Parameters:
- Returns:
matched (int) – number of matched reactions
unmatched (int) – number of unmatched reactions