ELASTICITY task computes the second-order elastic tensor of a crystal by:
- Fully relaxing the structure with
OPT. - Applying a set of normal and shear strains to generate deformed structures via
pymatgen.analysis.elasticity.DeformedStructureSet. - Computing the stress tensor of each deformed structure.
- Fitting a linear stress-strain relationship to extract the 6×6 Voigt elastic tensor.
Function signature
Parameters
ase.Atoms
required
Input structure. A copy is made internally before relaxation.
ase.calculators.calculator.BaseCalculator
required
Calculator for energy, force, and stress evaluations.
Optimizer | str
default:"BFGSLineSearch"
Optimizer passed to the initial
OPT task. See structure optimization for valid values.dict | None
default:"None"
Extra keyword arguments forwarded to the optimizer constructor.
Filter | str | None
default:"FrechetCell"
Cell filter for the initial full relaxation. Defaults to
"FrechetCell" to allow both positions and cell to relax.dict | None
default:"None"
Extra keyword arguments forwarded to the filter constructor.
dict | None
default:"None"
Convergence criterion dict forwarded to the
OPT task (e.g. {"fmax": 0.001}).list[float] | ndarray
default:"np.linspace(-0.01, 0.01, 4)"
Normal strain magnitudes applied along each of the three Cartesian directions. Default covers ±1% in 4 steps. More points improve the linear fit accuracy.
list[float] | ndarray
default:"np.linspace(-0.06, 0.06, 4)"
Shear strain magnitudes applied for the off-diagonal components of the strain tensor. Default covers ±6% in 4 steps. Larger range needed because MLIPs often show weaker shear stiffness.
boolean
default:"true"
If
True, the OPT result is persisted to Prefect’s result store.boolean
default:"false"
If
True, the OPT result is cached and reused if the same structure and calculator are provided again.Return value
Returns adict on success, or a Prefect State if the initial relaxation fails:
The
ElasticTensor object provides derived moduli:
Example
1
Import and set up
2
Run ELASTICITY
3
Extract elastic moduli
For accurate elastic constants, use a tight convergence criterion (e.g.
fmax=0.001) for the initial relaxation. Poorly relaxed structures produce inconsistent stress-strain data.