pymatgen.entries.computed_entries module

This module implements equivalents of the basic ComputedEntry objects, which is the basic entity that can be used to perform many analyses. ComputedEntries contain calculated information, typically from VASP or other electronic structure codes. For example, ComputedEntries can be used as inputs for phase diagram analysis.

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: pymatgen.entries.Entry

Lightweight Entry object for computed data. Contains facilities for applying corrections to the .energy attribute and for storing calculation 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]
Returns

MSONable dict.

property energy

the corrected energy of the entry.

Type

return

classmethod from_dict(d) → pymatgen.entries.computed_entries.ComputedEntry[source]
Parameters

d – Dict representation.

Returns

ComputedEntry

normalize(mode: str = 'formula_unit') → None[source]

Normalize the entry’s composition and energy.

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]
Returns

MSONAble dict.

classmethod from_dict(d) → pymatgen.entries.computed_entries.ComputedStructureEntry[source]
Parameters

d – Dict representation.

Returns

ComputedStructureEntry