Skip to content

Equation of State

EOSAnalyzer

EOSAnalyzer(
    start: float = -0.1,
    stop: float = 0.1,
    num: int = 11,
    eos_name: Literal[
        "murnaghan",
        "birch",
        "birch_murnaghan",
        "pourier_tarantola",
        "vinet",
        "deltafactor",
        "numerical_eos",
    ] = "birch_murnaghan",
    calculator: BaseCalculator | None = None,
    eos_transformation: EOSTransformation | None = None,
)

A class used to perform Equation of State (EOS) analysis for a given structure.

Generates a series of structures with varying volumes via deformation transformations, calculates their energies, and fits the energy-volume data to an EOS (such as Birch-Murnaghan) to determine properties such as the bulk modulus.

Initializes the EOSAnalyzer object.

Parameters:

Name Type Description Default
start float

The starting strain value to apply to the structure. Defaults to -0.1.

-0.1
stop float

The stopping strain value to apply to the structure. Defaults to 0.1.

0.1
num int

The number of strain values to generate between the start and stop. Defaults to 11.

11
eos_name str

The name of the equation of state (EOS) used for fitting. Defaults to "birch_murnaghan".

'birch_murnaghan'
calculator BaseCalculator | None

The calculator used for energy calculations.

None
eos_transformation EOSTransformation | None

The transformation used to generate deformed structures. Defaults to EOSTransformation.

None

calculate

calculate(
    structure: Structure | Atoms, is_relaxed: bool = False
) -> dict[str, list | float]

Calculates the potential energies and volumes to construct the EOS for the given undeformed structure.

Applies a series of volume deformations to the input structure, calculates the potential energy of each strained structure, and fits the data to the specified equation of state (EOS).

Parameters:

Name Type Description Default
structure Structure | Atoms

The undeformed structure to be analyzed.

required
is_relaxed bool

Whether the structure is already relaxed. Defaults to False.

False

Returns:

Type Description
dict[str, list | float]

dict[str, list | float]: Dictionary with keys: - volumes: Volume for each deformed structure. - energies: Potential energy for each deformed structure. - e0: Minimum energy from EOS fit. - b0: Bulk modulus in eV/A^3. - b0_GPa: Bulk modulus in GPa. - b1: Pressure derivative of bulk modulus. - v0: Equilibrium volume in A^3.

Raises:

Type Description
ValueError

If the calculator object does not have the 'energy' property implemented.

eos_transformation

eos_transformation() -> EOSTransformation

Returns the EOS transformation object used to generate deformed structures.

Returns:

Name Type Description
EOSTransformation EOSTransformation

The transformation object used for EOS analysis.