pymatgen.analysis.pourbaix.entry module

class IonEntry(ion, energy, name=None)[source]

Bases: pymatgen.phasediagram.entries.PDEntry

Object similar to PDEntry, but contains an Ion object instead of a Composition object.

Parameters:
  • comp – Ion object
  • energy – Energy for composition.
  • name – Optional parameter to name the entry. Defaults to the chemical formula.
name

A name for the entry. This is the string shown in the phase diagrams. By default, this is the reduced formula for the composition, but can be set to some other string for display purposes.

as_dict()[source]

Creates a dict of composition, energy, and ion name

energy_per_atom

Return final energy per atom

classmethod from_dict(d)[source]

Returns an IonEntry object from a dict.

class MultiEntry(entry_list, weights=None)[source]

Bases: pymatgen.analysis.pourbaix.entry.PourbaixEntry

PourbaixEntry-like object for constructing multi-elemental Pourbaix diagrams.

Initializes a MultiEntry.

Parameters:
  • entry_list – List of component PourbaixEntries
  • weights – Weights associated with each entry. Default is None
conc_term
normalization_factor

Normalize each entry by nM

class PourbaixEntry(entry, correction=0.0, entry_id=None)[source]

Bases: monty.json.MSONable

An object encompassing all data relevant to an ion in a pourbaix diagram. Each bulk solid/ion has a free energy g of the form: g = g0_ref + 0.0591 log10(conc) - nO mu_H2O + (nH - 2nO) pH + phi (-nH + 2nO + q)

Parameters:
  • entry (ComputedEntry/ComputedStructureEntry/PDEntry/IonEntry) – An entry object
  • energy – Energy of entry
as_dict()[source]

Returns dict which contains Pourbaix Entry data. Note that the pH, voltage, H2O factors are always calculated when constructing a PourbaixEntry object.

composition

Returns composition

conc_term

Returns the concentration contribution to the free energy.

energy
classmethod from_dict(d)[source]

Returns a PourbaixEntry by reading in an Ion

g0

Return g0 for the entry. Legacy function.

g0_add(term)[source]

Add a correction term to g0.

Parameters:term – Correction term to add to g0
g0_replace(term)[source]

Replace g0 by a different value.

Parameters:term – New value for g0
normalization_factor

Normalize each entry by nM

normalize(factor)[source]
num_atoms

Return number of atoms in current formula. Useful for normalization

reduced_entry()[source]

Calculate reduction factor for composition, and reduce parameters by this factor.

scale(factor)[source]

Normalize all entries by normalization factor.

Parameters:factor – Normalization factor
class PourbaixEntryIO[source]

Bases: object

Class to import and export Pourbaix entries from a csv file

static from_csv(filename)[source]

Imports PourbaixEntries from a csv.

Parameters:filename – Filename to import from.
Returns:List of Entries
static to_csv(filename, entries, latexify_names=False)[source]

Exports Pourbaix entries to a csv

Parameters:
  • filename – Filename to write to.
  • entries – Entries to export.
  • latexify_names – Format entry names to be LaTex compatible, e.g., Li_{2}O
ion_or_solid_comp_object(formula)[source]

Returns either an ion object or composition object given a formula.

Parameters:formula – String formula. Eg. of ion: NaOH(aq), Na[+]; Eg. of solid: Fe2O3(s), Fe(s), Na2O
Returns:Composition/Ion object