Skip to content

Database

The bundled database and its records.

pourbase.open_database

open_database(path: str | Path | None = None) -> ThermodynamicDatabase

Open the bundled publication database or a caller-supplied SQLite file.

pourbase.ThermodynamicDatabase

ThermodynamicDatabase(path: str | Path, policy: object | None = None)

Validated, read-only access to one pourbase SQLite file.

The file holds the evidence: every reported value with its source. The recommended value of each species and property is derived from that evidence by a selection policy, the bundled default unless policy names another, and every connection sees it as the temporary table selected_thermochemistry. The file is opened read-only, so metadata, systems and loaded species are cached.

policy property

policy

The selection policy that derives the recommended values.

selections cached property

selections: dict

{(record_id, property): Selection} of the active policy.

ligand_species cached property

ligand_species: dict[str, dict[str, tuple[str, ...]]]

{symbol: {ligand_id: species names}} for every ligand complex.

connect

connect() -> sqlite3.Connection

A new read-only connection with named-column rows and the recommended values.

recommended_value_ids

recommended_value_ids() -> frozenset[str]

The value IDs the active policy recommends.

available_systems

available_systems() -> tuple[tuple[str, str], ...]

(symbol, system name) of every element with species.

element_coverage

element_coverage() -> tuple[dict[str, object], ...]

The documented status of every periodic-table position.

source

source(source_id: str | None, locator: str | None = None) -> SourceReference | None

A source with a property-specific locator taking precedence over its general one.

species_records

species_records(record_ids: Iterable[str]) -> tuple[SpeciesRecord, ...]

Full evidence records in the requested order; unknown IDs are skipped.

materials_project_comparisons

materials_project_comparisons(symbol: str) -> tuple[dict[str, object], ...]

Reviewed phase matches and selected DFT energies for one element.

materials_project_thermochemistry

materials_project_thermochemistry(symbol: str | None = None, *, selected_only: bool = False) -> tuple[dict[str, object], ...]

Phase-matched experimental and MP formation energies, per atom.

load_system

load_system(symbol: str, *, ligand_ids: Iterable[str] = (), energy_policy: GibbsEnergyPolicy | str = GibbsEnergyPolicy.EXPERIMENTAL_ONLY, include_optional_gases: bool = False) -> MetalSystem

Calculation-ready species; optionally include gases marked optional_gas_phase.

These phases retain their selected properties while requiring explicit inclusion in a gas-fugacity calculation. Existing gas records keep their current inclusion rules. Results are cached separately for each gas selection.

pourbase.SpeciesRecord dataclass

SpeciesRecord(record_id: str, system: str, symbol: str, species: str, formula_ascii: str, phase: str, phase_detail: str, charge: float, metal_oxidation_state: float | None, thermochemistry: Thermochemistry, reported: tuple[ReportedValue, ...], fallback: ComputationalFallback | None, phase_identity: PhaseIdentity | None, warnings: tuple[RecordWarning, ...])

Everything the database holds about one species.

pourbase.SourceReference dataclass

SourceReference(source_id: str, citation: str | None, url: str | None, locator: str | None)

pourbase.MetalSystem dataclass

MetalSystem(system: str, symbol: str, species: tuple[ThermodynamicSpecies, ...], excluded: tuple[SpeciesExclusion, ...] = ())

Supported and excluded records for one elemental system.

missing_gibbs property

missing_gibbs: tuple[SpeciesExclusion, ...]

Ligand-free records without a Gibbs energy for this calculation.

require_complete

require_complete() -> None

Raise IncompleteSystemError when a Gibbs energy is missing.

pourbase.ThermodynamicSpecies dataclass

ThermodynamicSpecies(record_id: str, system: str, symbol: str, species: str, formula_ascii: str, phase: str, phase_detail: str, charge: float, metal_count: float, core_oxygen_count: float, core_hydrogen_count: float, ligand_id: str | None, ligand_count: float, ligand_charge: float, gibbs_energy_J_mol: float, gibbs_status: EvidenceStatus, source_id: str, ligand_gibbs_energy_J_mol: float | None = None, formal_metal_oxidation_state: float | None = None, electron_coefficient_per_metal: float | None = None, gibbs_uncertainty_J_mol: float | None = None, temperature_uncertainty_J_mol: float = 0.0, additional_components: tuple[BufferedComponent, ...] = ())

One supported thermodynamic species used by the calculation engine.

is_condensed property

is_condensed: bool

Return whether the species has unit activity as a pure condensed phase.

components property

components: tuple[BufferedComponent, ...]

All buffered components, including the legacy single-ligand fields once.

metal_oxidation_state property

metal_oxidation_state: float

Average formal metal oxidation state.

electrons_per_metal property

electrons_per_metal: float

Electron coefficient in the metal/water formation reaction.

pourbase.EvidenceStatus

Bases: str, Enum

Evidence behind a Gibbs energy record.

pourbase.ExclusionReason

Bases: str, Enum

Why a database record is left out of a calculation.