pymatgen.phasediagram.entries module

class GrandPotPDEntry(entry, chempots, name=None)[source]

Bases: pymatgen.phasediagram.entries.PDEntry

A grand potential pd entry object encompassing all relevant data for phase diagrams. Chemical potentials are given as a element-chemical potential dict.

Parameters:
  • entry – A PDEntry-like object.
  • chempots – Chemical potential specification as {Element: float}.
  • name – Optional parameter to name the entry. Defaults to the reduced chemical formula of the original entry.
as_dict()[source]
classmethod from_dict(d)[source]
is_element

True if the entry is an element.

class PDEntry(composition, energy, name=None, attribute=None)[source]

Bases: monty.json.MSONable

An object encompassing all relevant data for phase diagrams.

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.

Parameters:
  • comp – Composition as a pymatgen.core.structure.Composition
  • energy – Energy for composition.
  • name – Optional parameter to name the entry. Defaults to the reduced chemical formula.
  • attribute – Optional attribute of the entry. This can be used to specify that the entry is a newly found compound, or to specify a particular label for the entry, or else ... Used for further analysis and plotting purposes. An attribute can be anything but must be MSONable.
as_dict()[source]
energy_per_atom

Returns the final energy per atom.

classmethod from_dict(d)[source]
is_element

True if the entry is an element.

class PDEntryIO[source]

Bases: object

Utility class to export and import PDEntry to and from csv files, as well as to and from json.

static from_csv(filename)[source]

Imports PDEntries from a csv.

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

Exports PDEntries to a csv

Parameters:
  • filename – Filename to write to.
  • entries – PDEntries to export.
  • latexify_names – Format entry names to be LaTex compatible, e.g., Li_{2}O
class TransformedPDEntry(comp, original_entry)[source]

Bases: pymatgen.phasediagram.entries.PDEntry

This class repesents a TransformedPDEntry, which allows for a PDEntry to be transformed to a different composition coordinate space. It is used in the construction of phase diagrams that do not have elements as the terminal compositions.

Parameters:
  • comp – Transformed composition as a Composition.
  • energy – Energy for composition.
  • original_entry – Original entry that this entry arose from.
as_dict()[source]
classmethod from_dict(d)[source]