Skip to content

Elastic Constants

ElasticConstantsAnalyzer

ElasticConstantsAnalyzer(
    num_deform: int = 5,
    max_deform: float = 2,
    calculator: BaseCalculator | None = None,
    elastic_constant_transformation: ElasticConstantsDeformationTransformation
    | None = None,
)

A class used to calculate the elastic constant tensor for a given structure.

Computes the elastic constant tensor from deformation and energy-volume data, along with derived mechanical properties such as bulk modulus, shear modulus, Young's modulus, and Poisson's ratio.

Initializes the ElasticConstantsAnalyzer object.

Parameters:

Name Type Description Default
num_deform int

The number of deformations to apply. Defaults to 5.

5
max_deform float

The maximum deformation size in percent and degrees. Defaults to 2%.

2
calculator BaseCalculator | None

The calculator object used for energy calculations.

None
elastic_constant_transformation ElasticConstantsDeformationTransformation | None

The transformation object used to apply cubic distortions.

None

calculate

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

Calculates the elastic constants of a given structure.

Uses stress-strain data from a series of deformation modes to fit the elastic constants.

Parameters:

Name Type Description Default
structure Structure | Atoms

The input structure to calculate the elastic constants.

required
is_relaxed bool

A flag to indicate whether the input structure is already relaxed. Defaults to False.

False

Returns:

Type Description
dict[str, float]

dict[str, float]: Dictionary with keys: - C_ij entries: Elastic constants in GPa for all fitted tensor components. - youngs_modulus: Young's modulus in GPa. - voigt_bulk_modulus: Voigt bulk modulus in GPa. - voigt_shear_modulus: Voigt shear modulus in GPa. - reuss_bulk_modulus: Reuss bulk modulus in GPa. - reuss_shear_modulus: Reuss shear modulus in GPa. - voigt_reuss_hill_bulk_modulus: Voigt-Reuss-Hill bulk modulus in GPa. - voigt_reuss_hill_shear_modulus: Voigt-Reuss-Hill shear modulus in GPa. - poisson_ratio: Poisson ratio. - pugh_ratio: Pugh ratio. - chen_vickers_hardness: Chen-Vickers hardness in GPa.

Raises:

Type Description
ValueError

If the calculator object does not have the 'energy' and 'stress' properties implemented.

elastic_constants_transformation

elastic_constants_transformation() -> (
    ElasticConstantsDeformationTransformation
)

Returns the transformation object used to apply distortions.

Returns:

Name Type Description
ElasticConstantsDeformationTransformation ElasticConstantsDeformationTransformation

The transformation object used to apply distortions.