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
¶
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:
- |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the calculator object does not have the 'energy' and 'stress' properties implemented. |
elastic_constants_transformation
¶
Returns the transformation object used to apply distortions.
Returns:
| Name | Type | Description |
|---|---|---|
ElasticConstantsDeformationTransformation |
ElasticConstantsDeformationTransformation
|
The transformation object used to apply distortions. |