pymatgen.entries.computed_entries module

class ComputedEntry(composition: pymatgen.core.composition.Composition, energy: float, correction: float = 0.0, parameters: dict = None, data: dict = None, entry_id: object = None)[source]

Bases: monty.json.MSONable

An lightweight ComputedEntry object containing key computed data for many purposes. Extends a PDEntry so that it can be used for phase diagram generation. The difference between a ComputedEntry and a standard PDEntry is that it includes additional parameters like a correction and run_parameters.

Initializes a ComputedEntry.

Parameters
  • composition (Composition) – Composition of the entry. For flexibility, this can take the form of all the typical input taken by a Composition, including a {symbol: amt} dict, a string formula, and others.

  • energy (float) – Energy of the entry. Usually the final calculated energy from VASP or other electronic structure codes.

  • correction (float) – A correction to be applied to the energy. This is used to modify the energy for certain analyses. Defaults to 0.0.

  • parameters (dict) – An optional dict of parameters associated with the entry. Defaults to None.

  • data (dict) – An optional dict of any additional data associated with the entry. Defaults to None.

  • entry_id (obj) – An optional id to uniquely identify the entry.

as_dict() → dict[source]

A JSON serializable dict representation of an object.

property energy

Returns the corrected energy of the entry.

property energy_per_atom
classmethod from_dict(d)[source]
property is_element
normalize(mode: str = 'formula_unit') → None[source]

Normalize the entry’s composition, energy and any corrections. Generally, this would not have effect on any

Parameters

mode – “formula_unit” is the default, which normalizes to composition.reduced_formula. The other option is “atom”, which normalizes such that the composition amounts sum to 1.

class ComputedStructureEntry(structure: pymatgen.core.structure.Structure, energy: float, correction: float = 0.0, parameters: dict = None, data: dict = None, entry_id: object = None)[source]

Bases: pymatgen.entries.computed_entries.ComputedEntry

A heavier version of ComputedEntry which contains a structure as well. The structure is needed for some analyses.

Initializes a ComputedStructureEntry.

Parameters
  • structure (Structure) – The actual structure of an entry.

  • energy (float) – Energy of the entry. Usually the final calculated energy from VASP or other electronic structure codes.

  • correction (float) – A correction to be applied to the energy. This is used to modify the energy for certain analyses. Defaults to 0.0.

  • parameters (dict) – An optional dict of parameters associated with the entry. Defaults to None.

  • data (dict) – An optional dict of any additional data associated with the entry. Defaults to None.

  • entry_id (obj) – An optional id to uniquely identify the entry.

as_dict() → dict[source]

A JSON serializable dict representation of an object.

classmethod from_dict(d)[source]