pchemdb package¶
Physical Chemistry Database.
Submodules¶
pchemdb.crc module¶
Utilities for parsing CRC data.
Example: Parse CRC CSV into data structure
>>> from csv import DictReader
>>> from pchemdb.crc import parse_crc
>>> with Path(...).open(mode="r", encoding=...) as file:
... reader = DictReader(file)
... data = []
... for row in reader:
... data.extend(parse_crc)
- pchemdb.crc.load_crc_database() list[tuple[dict[str, str], dict[str, list[str]], list[str]]][source]¶
Load the CRC database.
- pchemdb.crc.parse_crc(d: dict[str, Any]) list[tuple[dict[str, Any], dict[str, list[tuple[str, str]]], list[tuple[str, str]]]][source]¶
Parse data from CRC.
- Parameters:
d – A dictionary corresponding to a row in a CRC .csv file.
- Returns:
A list of 3-tuples (
solution,solute_data,solution_data), where each item represents a property entry.solutionis a dictionary mappingpyEQL.solution.Solutionconstructor parameter names to their values.solute_datais a dictionary mapping solutes formulae to list of property-value pairs.solution_datais a list of property-value pairs.
pchemdb.utils module¶
Utilities for parsin molar conductivity data from CRC.
- pchemdb.utils.condense(dataset: list[tuple[dict[str, str], dict[str, list[str]], list[str]]]) list[tuple[dict[str, str], dict[str, list[str]], list[str]]][source]¶
Condense a solution dataset.
- Parameters:
dataset – A list of Solution, SoluteData, SolutionData 3-tuples.
# Should: Combine data with same anion and cation into single entry