Elastic Tensors#
Let’s do something more interesting that normally takes quite a bit of work in DFT: calculating an elastic constant! Elastic properties are important to understand how strong or easy to deform a material is, or how a material might change if compressed or expanded in specific directions (i.e. the Poisson ratio!).
We don’t have to change much code from above, we just use a built-in recipe to calculate the elastic tensor from quacc
. This recipe
(optionally) Relaxes the unit cell using the MLIP
Generates a number of deformed unit cells by applying strains
For each deformation, a relaxation using the MLIP and (optionally) a single point calculation is run
Finally, all of the above calculations are used to calculate the elastic properties of the material
For more documentation, see the quacc docs for quacc.recipes.mlp.elastic_tensor_flow
from ase.build import bulk
from quacc.recipes.mlp.elastic import elastic_tensor_flow
# Make an Atoms object of a bulk Cu structure
atoms = bulk("Cu")
# Run an elastic property calculation with our favorite MLP potential
result = elastic_tensor_flow(
atoms,
job_params={
"all": dict(
method="fairchem",
model_name="EquiformerV2-31M-OMAT24-MP-sAlex",
local_cache="./fairchem_checkpoint_cache/",
),
},
)
result["elasticity_doc"].bulk_modulus
Congratulations, you ran your first elastic tensor calculation!