pymatgen.analysis.pourbaix.analyzer module

class PourbaixAnalyzer(pd)[source]

Bases: object

Class for performing analysis on Pourbaix Diagrams

Parameters:pd – Pourbaix Diagram to analyze.
g(entry, pH, V)[source]

Get free energy for a given pH, and V.


Computes the decomposition entries, species and hull energies for all the multi-entries which have the “material” as the only solid.

Parameters:single_entry – single entry for which to find all of the decompositions
Returns:(decomp_entries, hull_energies, decomp_species, entries) for all multi_entries containing the single_entry as the only solid
get_chempot_range_map(limits=[[-2, 16], [-4, 4]])[source]

Returns a chemical potential range map for each stable entry.

This function works by using scipy’s HalfspaceIntersection function to construct all of the 2-D polygons that form the boundaries of the planes corresponding to individual entry gibbs free energies as a function of pH and V. Hyperplanes of the form a*pH + b*V + 1 - g(0, 0) are constructed and supplied to HalfspaceIntersection, which then finds the boundaries of each pourbaix region using the intersection points.

Parameters:limits ([[float]]) – limits in which to do the pourbaix analysis
Returns:[boundary_points]}. The list of boundary points are the sides of the N-1 dim polytope bounding the allowable ph-V range of each entry.
Return type:Returns a dict of the form {entry

Provides the decomposition and energy above convex hull for an entry

Parameters:entry – A PourbaixEntry
Returns:(decomp, energy above convex hull) Stable entries should have energy above hull of 0.

Provides the decomposition at a particular composition

Parameters:comp – A composition
Return type:Decomposition as a dict of {PourbaixEntry

Provides the energy above convex hull for an entry

Parameters:entry – A PourbaixEntry object
Returns:Energy above convex hull of entry. Stable entries should have energy above hull of 0.
get_entry_stability(entry, pH, V)[source]

Get the energy difference between an entry and the most stable decomposition product (i.e. the pourbaix-stable entry) at a given pH and voltage.

  • entry (PourbaixEntry) – Pourbaix entry or MultiEntry corresponding to the stability to be calculated
  • pH (float) – pH at which to calculate stability of entry
  • V (float) – voltage at which to calculate stability of entry

Calculates the chemical potentials for each element within a facet.

Parameters:facet – Facet of the phase diagram.
Returns:chempot } for all elements in the phase diagram.
Return type:{ element
get_gibbs_free_energy(pH, V)[source]

Provides the gibbs free energy of the Pourbaix stable entry at a given pH and V

Parameters:pH – pH V: potential vs SHE
Returns:gibbs free energy (eV/atom)
numerical_tol = 1e-08