Materials Project¶
See Materials Project for examples.
pourbase.OfficialMaterialsProjectClient ¶
Fetch an official MP diagram using a caller-supplied API key.
pourbase.OfficialMaterialsProjectComparator ¶
Fetch MP and compare it with the publication's experimental diagram.
pourbase.OfficialMaterialsProjectComparison
dataclass
¶
OfficialMaterialsProjectComparison(experimental: PourbaixDiagram, materials_project: OfficialMaterialsProjectDiagram, same_thermodynamic_species: BooleanArray)
Experimental and official MP diagrams evaluated on one common grid.
pourbase.OfficialMaterialsProjectDiagram
dataclass
¶
OfficialMaterialsProjectDiagram(symbol: str, conditions: PourbaixConditions, phases: tuple[OfficialMaterialsProjectPhase, ...], pH: FloatArray, U_V: FloatArray, stable_phase_index: IntegerArray, minimum_energy_eV_metal: FloatArray, her_V: FloatArray, oer_V: FloatArray, database_version: str, mp_api_version: str, pymatgen_version: str, filter_solids: bool, use_gibbs_300K: bool)
Official MP single-element Pourbaix result evaluated on the requested grid.
pourbase.OfficialMaterialsProjectPhase
dataclass
¶
OfficialMaterialsProjectPhase(phase_id: str, label: str, formula: str, phase_type: str, source_url: str, metal_count: float, oxygen_per_metal: float, hydrogen_per_metal: float, protons_per_metal: float, electrons_per_metal: float, baseline_energy_eV_metal: float, log10_activity: float | None)
One stable entry returned by MP's official aqueous workflow.
pourbase.evaluate_official_materials_project_entries ¶
evaluate_official_materials_project_entries(symbol: str, conditions: PourbaixConditions, stable_entries: Sequence[Any], *, database_version: str, mp_api_version: str, pymatgen_version: str, filter_solids: bool, use_gibbs_300K: bool) -> OfficialMaterialsProjectDiagram
Evaluate corrected pymatgen Pourbaix entries on the experimental grid.
pourbase.thermodynamic_species_equivalence_key ¶
Create the composition/reaction key used for cross-dataset domain matching.
pourbase.plot_official_materials_project_comparison ¶
plot_official_materials_project_comparison(comparison: Any, *, title: str | None = None) -> tuple[Any, Any]
Plot experimental, live official MP, and domain-agreement panels.
pourbase.plot_official_materials_project_diagram ¶
plot_official_materials_project_diagram(diagram: Any, *, ax: Any | None = None, title: str | None = None, colors: Mapping[str, Any] | None = None, label_domains: bool = True, show_legend: bool = True) -> Any
Plot a phase map returned by Materials Project's official workflow.
pourbase.write_mp_thermochemistry_bundle ¶
write_mp_thermochemistry_bundle(database: ThermodynamicDatabase, output_dir: str | Path) -> dict[str, object]
Write the comparison figures, plotted rows, metrics, and method notes.
pourbase.comparison_metrics ¶
comparison_metrics(rows: Iterable[Mapping[str, object]], property_name: str) -> dict[str, dict[str, float | int]]
Calculate transparent per-method residual metrics in eV/atom.
pourbase.plot_mp_thermochemistry_comparison ¶
plot_mp_thermochemistry_comparison(rows: Iterable[Mapping[str, object]], property_name: str) -> tuple[Any, Any]
Return scatter and residual panels for one experimental property.