pymatgen.entries package


Module contents

Entries are containers for calculated information, which is used in many analyses. This module contains entry related tools and implements the base Entry class, which is the basic entity that can be used to store calculated information. Other Entry classes such as ComputedEntry and PDEntry inherit from this class.

class Entry(composition: pymatgen.core.composition.Composition, energy: float)[source]

Bases: monty.json.MSONable

A lightweight object containing the energy associated with a specific chemical composition. This base class is not intended to be instantiated directly. Note that classes which inherit from Entry must define a .energy property.

Initializes an Entry.

  • 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.

as_dict() → dict[source]

MSONable dict.

abstract property energy[source]

the energy of the entry.



property energy_per_atom[source]

the energy per atom of the entry.



property is_element[source]

Whether composition of entry is an element.



normalize(mode: str = 'formula_unit', inplace: bool = True) → Optional[pymatgen.entries.Entry][source]

Normalize the entry’s composition and energy.

  • 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.

  • inplace – “True” is the default which normalises the current Entry object. Setting inplace to “False” returns a normalized copy of the Entry object.