Formation Energy¶
FormationEnergyAnalyzer
¶
FormationEnergyAnalyzer(
calculator: BaseCalculator | None = None,
formation_energy_transformation: FormationEnergyTransformation
| None = None,
)
A class used to calculate the formation energy of materials.
The FormationEnergyAnalyzer class computes the formation energy of a material from its
composition and structure.
Initializes the FormationEnergyAnalyzer object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
BaseCalculator | None
|
The calculator object used for energy calculations. |
None
|
formation_energy_transformation
|
FormationEnergyTransformation
|
The transformation object used to generate structures required for the calculation of formation energies. |
None
|
calculate
¶
calculate(
structure: Atoms | Structure, is_relaxed: bool = False
) -> dict[
str,
float | dict[str, dict[str, float | bool | Structure]],
]
Calculates the formation energy of the given structure.
For elemental references, each element's known experimental ground-state structure
(see FormationEnergyTransformation) is relaxed with the same calculator. For the
few elements whose ground state can't be constructed directly, several candidate
crystal structures are relaxed instead and the lowest energy per atom is used. Each
element's reference energy is cached on this analyzer instance, so calling calculate()
again (even on a different structure) reuses it instead of relaxing it again; construct
a new analyzer to force fresh relaxations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Atoms | Structure
|
The structure for which the formation energy is calculated. |
required |
is_relaxed
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
dict[str, float | dict[str, dict[str, float | bool | Structure]]]
|
dict[str, float]: Dictionary with keys:
- |
formation_energy_transformation
¶
Returns the transformation object used to apply distortions.
Returns:
| Name | Type | Description |
|---|---|---|
FormationEnergyTransformation |
FormationEnergyTransformation
|
The transformation object used to generate structures. |