Skip to main content

pourbase pourbase

pourbase is a source-linked database of experimental standard thermochemistry and a Python package for calculating Pourbaix diagrams. The bundled SQLite database holds 1,788 aqueous, solid, liquid and gas species across 75 elemental systems, with

5,206 reported values. Every value keeps its citation, its exact location in

the source, an evidence status, its uncertainty where reported, and every alternative value.

Documentation · Dataset statistics · Contributing · Data dictionary

The pourbase periodic table: the stable species of every element at pH 7 and 0 V vs SHE The pourbase periodic table: the stable species of every element at pH 7 and 0 V vs SHE

Install

pip install pourbase                           # database, Python API and command line
pip install "pourbase[gui]"                    # plus the desktop application
pip install "pourbase[gui,materials-project]"  # plus Materials Project comparisons
pip install "pourbase[mcp]"                    # plus the MCP server for language-model agents

Python 3.11 or newer. The database ships inside the package; calculations run offline with no download, API key or data path. For development, clone the repository, run pip install -e ".[gui]" and test with python -m unittest discover -s tests.

Desktop application

Run pourbase-gui or pourbase gui to open the periodic table. Select an element to explore its Pourbaix diagram, inspect species and their sources, and compare published values. The app supports fixed-activity and closed mass-balance calculations, temperature changes and

33 buffered ligands. Interactive probes, uncertainty views and sensitivity

analysis help show how the selected data affect a prediction.

You can compare conditions or Materials Project diagrams, save sessions, and export figures, data and Python code. Materials Project comparisons require the materials-project extra and an API key.

See the desktop application documentation for a guide to the views, controls and workflows. On Windows, pourbase gui prints startup errors in the terminal.

Python

import pourbase as pb

calculation = pb.calculate(pb.Scenario("Fe", concentration=10, concentration_unit="ppm"))
pb.plot_diagram(calculation.diagram)

probe = calculation.probe(pH=7, U_V=0)
print(probe.species.species)
for boundary in calculation.boundaries:
    print(boundary.reaction, boundary.equation, boundary.source_ids)

Scenario takes the other settings in everyday units:

pb.Scenario("Zn", mode="mass_balance", concentration=1e-6, concentration_unit="molar",
            davies_ionic_strength_mol_L=0.01)
pb.Scenario("Ag", ligands=(pb.LigandActivity("chloride-cl", log10_free_activity=-2),))
pb.Scenario("Cu", temperature_K=353.15)
pb.Scenario("Pt", energy_policy="experimental_then_mp")  # fill terminal gaps with Materials Project estimates

Analyses of a calculation:

Function Answers
stability_margin, stability_uncertainty how firmly a species is stable, given the uncertainties
selection_sensitivity how the diagram moves with each alternative published value
stability_region, screen_window where a species or kind is stable; which elements are passive in a window
phase_path the stable species and boundary crossings along a path
screen_periodic_table the stable species of every element at one point
speciation_profile, solubility, ligand_predominance fractions along pH, and fixed-potential diagrams
ConcentrationSweepEngine diagrams over a range of metal activities
OfficialMaterialsProjectComparator agreement with the official Materials Project diagram
region = pb.stability_region(calculation, "passivation", min_margin_J_mol=5000)
print(f"{region.fraction:.0%} passive, pH {region.pH_range}")

Species without a recommended Gibbs energy are left out and listed with every result. allow_incomplete=False instead raises IncompleteSystemError when a system contains such species.

Your own data: pb.with_user_species(pb.open_database(), "own.csv") adds or replaces species (format in pourbase.user_data; results mark them user_supplied), and pb.open_dataset("own.csv") calculates with your species alone. Both open in the application from the File menu.

With the same water energy and Nernst slope, every bundled system reproduces pymatgen's PourbaixEntry evaluation; scripts/pymatgen_crosscheck.py writes the comparison to docs/validation/.

Command line

pourbase systems
pourbase plot Fe --concentration 10 --unit ppm --output fe.png --grid-csv fe.csv
pourbase plot Zn --mode mass_balance --total-metal 1e-6 --output zn.png
pourbase sweep Fe --minimum -10 --maximum 0 --points 7 --output fe-sweep.png

Agents (MCP)

pourbase-mcp is a Model Context Protocol server that gives language-model agents the database and the engine:

claude mcp add pourbase -- pourbase-mcp

Its tools list systems and ligands, search species, return full evidence records, calculate and render diagrams, probe a point, and compare selection policies. --dataset, --species and --policy start it on your own data or policy.

How values are selected

The database retains every published value. A selection policy, selection-policy.toml, determines the recommended value for each species and property at runtime. It ranks sources by evidence class (A international critical reviews, B critical compilations, C single-system evaluations, D single experimental papers, E estimates, F computed values) and lists every exception with its reason. Values are never averaged, and missing values stay visible as evidence gaps. Materials Project estimates for the

six species without a usable published Gibbs energy are stored separately

and used only on request (energy_policy="experimental_then_mp").

Edit a copy of the policy to calculate with your own rule:

policy = pb.SelectionPolicy.load("my-policy.toml")
calculation = pb.calculate(pb.Scenario("Fe"), pb.with_policy(pb.open_database(), policy))
changes = pb.compare_policies(pb.open_database(), pb.SelectionPolicy.default(), policy)

Scientific limits

  • 1 bar, in water; 0–100 °C, with enthalpies and entropies of formation held at their 298.15 K values. Away from 25 °C, species without entropy data and all ligand species are left out.
  • One conserved metal per calculation; ligands are buffered reservoirs.
  • The Davies model applies up to an ionic strength of 0.1 mol L⁻¹.
  • Differences between experimental and DFT formation energies are diagnostics, not error estimates.

Contributing, citation and licence

Report a wrong value, a missing species or a better source with the data issue form; CONTRIBUTING.md describes what to include.

pourbase is released under GPL-3.0. Cite this release (CITATION.cff) and the sources of the values you use. THIRD_PARTY_NOTICES.md lists the terms of the data sources.

Acknowledgements

We thank the OECD Nuclear Energy Agency Thermochemical Database Project for confirming the terms under which pourbase redistributes NEA-TDB selected values. Its selected data are used with acknowledgment of the OECD and the Nuclear Energy Agency:

  • Grenthe, I., Fuger, J., Konings, R. J. M., Lemire, R. J., Muller, A. B., Nguyen-Trung, C. and Wanner, H. Chemical Thermodynamics of Uranium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 1 (1992).
  • Rard, J. A., Rand, M. H., Anderegg, G. and Wanner, H. Chemical Thermodynamics of Technetium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 3 (1999).
  • Guillaumont, R., Fanghänel, T., Fuger, J., Grenthe, I., Neck, V., Palmer, D. A. and Rand, M. H. Update on the Chemical Thermodynamics of Uranium, Neptunium, Plutonium, Americium and Technetium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 5 (2003).
  • Gamsjäger, H., Bugajski, J., Gajda, T., Lemire, R. J. and Preis, W. Chemical Thermodynamics of Nickel. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 6 (2005).
  • Olin, Å., Noläng, B., Osadchii, E. G., Öhman, L.-O. and Rosén, E. Chemical Thermodynamics of Selenium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 7 (2005).
  • Brown, P. L., Curti, E. and Grambow, B., with Ekberg, C. Chemical Thermodynamics of Zirconium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 8 (2005).
  • Rand, M., Fuger, J., Grenthe, I., Neck, V. and Rai, D. Chemical Thermodynamics of Thorium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 11 (2008).
  • Gamsjäger, H., Gajda, T., Sangster, J., Saxena, S. K. and Voigt, W. Chemical Thermodynamics of Tin. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 12 (2012).
  • Lemire, R. J., Berner, U., Musikas, C., Palmer, D. A., Taylor, P. and Tochiyama, O. Chemical Thermodynamics of Iron, Part 1. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 13a (2013).
  • Lemire, R. J., Palmer, D. A., Taylor, P. and Schlenz, H. Chemical Thermodynamics of Iron, Part 2. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 13b (2020).
  • Grenthe, I., Gaona, X., Plyasunov, A. V., Rao, L., Runde, W. H., Grambow, B., Konings, R. J. M., Smith, A. L. and Moore, E. E. Second Update on the Chemical Thermodynamics of Uranium, Neptunium, Plutonium, Americium and Technetium. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 14 (2020).
  • Rand, M., Palmer, D. A., Fuger, J. and Gajda, T. Chemical Thermodynamics of Selected Ancillary Compounds of Interest to Radioactive Waste Management. OECD Nuclear Energy Agency, Chemical Thermodynamics Series Volume 15 (2024).

Materials Project data are used under CC BY 4.0 and keep their IDs, versions and attribution.

Metadata

Release files for pourbase 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pourbase 0.1.0
File Size Uploaded Provenance Actions
pourbase-0.1.0.tar.gz 2.6 MB With provenance Details for pourbase-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pourbase 0.1.0
File Interpreter ABI Platform Actions
pourbase-0.1.0-py3-none-any.whl Python 3 none any Details for pourbase-0.1.0-py3-none-any.whl

Total release size: 4.7 MB

Release files / pourbase-0.1.0.tar.gz

Download URL pourbase-0.1.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
4b438de1e384ea61628d0b5fd7f859d8aeb44cd9f34a10bbcfdabfcb3acc3465
BLAKE2b-256 checksum
How to use checksums
83242e9d2eae64750ee96898066d612594dfbda88f94743d2b1a7a10669942da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / pourbase-0.1.0-py3-none-any.whl

Download URL pourbase-0.1.0-py3-none-any.whl
Size 2.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
97b62c4c42f1d8dc64b7feb70d13a9d4a1da10ae54bf70e58d7c80c8425f9157
BLAKE2b-256 checksum
How to use checksums
2bd18a19834b0b6eb4c5347eb528880b64fae58eb5f82b9843debb0eb27b3cd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for pourbase 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pourbase-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page