Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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

  1. (optionally) Relaxes the unit cell using the MLIP

  2. Generates a number of deformed unit cells by applying strains

  3. For each deformation, a relaxation using the MLIP and (optionally) a single point calculation is run

  4. Finally, all of the above calculations are used to calculate the elastic properties of the material

For more documentation, see the quacc docs for the elastic_tensor_flow recipe. The example below uses the MLP-specific wrapper quacc.recipes.mlip.elastic.elastic_tensor_flow, which drives this flow with MLIP relax/static jobs.

INFO:httpx2:HTTP Request: HEAD https://huggingface.co/facebook/UMA/resolve/main/checkpoints/uma-s-1p2p1.pt "HTTP/1.1 302 Found"
INFO:httpx2:HTTP Request: HEAD https://huggingface.co/facebook/UMA/resolve/main/references/iso_atom_elem_refs.yaml "HTTP/1.1 200 OK"
INFO:httpx2:HTTP Request: HEAD https://huggingface.co/facebook/UMA/resolve/main/references/form_elem_refs.yaml "HTTP/1.1 200 OK"
WARNING:root:device was not explicitly set, using device='cuda'.
WARNING:root:UMA Nitro cannot serve this request: nitro mode supports only CUDA compute capability 8.x-12.x, not 7.5.
WARNING:root:Now running with nitro=False, execution_mode='umas_fast_gpu' (TF32).
INFO:root:Adding 5 untrained task(s): ['oc22_stress', 'omol_stress', 'oc25_stress', 'oc20_stress', 'odac_stress']
WARNING:root:Running in a reduced-precision mode: some values, such as higher-order derivatives and phonon calculations, will be less accurate. For standard FP32 precision, use inference_settings='high-precision'.
WARNING:root:The 'seed' argument is deprecated and will be removed in future versions. Please set the seed in the MLIPPredictUnit configuration instead.
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-31-57-471163-59941
WARNING:root:Model is being compiled. This might take a while the first time.
WARNING:root:Running (unknown commit) with inference settings: multigpu
W1117 18:32:00.449000 13508 site-packages/torch/_logging/_internal.py:1345] [0/0] Profiler record function <class 'torch.autograd.profiler.record_function'> will be ignored
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-31-57-471163-59941
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-33-347039-53545
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-33-347039-53545
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-33-533100-40240
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-33-533100-40240
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-33-718253-31762
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-33-718253-31762
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-33-903688-60545
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-33-903688-60545
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-34-089580-85751
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-34-089580-85751
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-34-862304-47153
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-34-862304-47153
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-35-054361-82490
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-35-054361-82490
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-35-246731-46278
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-35-246731-46278
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-35-437486-60271
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-35-437486-60271
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-35-626905-85553
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-35-626905-85553
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-35-813893-11222
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-35-813893-11222
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-005004-42646
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-005004-42646
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-197863-96714
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-197863-96714
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-377714-12403
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-377714-12403
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-563198-67592
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-563198-67592
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-746354-30322
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-746354-30322
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-36-929021-29639
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-36-929021-29639
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-37-109439-51796
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-37-109439-51796
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-37-294665-31955
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-37-294665-31955
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-37-478122-43752
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-37-478122-43752
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-37-663720-95806
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-37-663720-95806
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-38-346641-91366
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-38-346641-91366
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-38-532786-86518
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-38-532786-86518
INFO:quacc.runners.prep:Run directory = /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2026-11-17-18-32-38-717989-17798
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2026-11-17-18-32-38-717989-17798
BulkModulus(voigt=146.429, reuss=146.429, vrh=146.429)

Congratulations, you ran your first elastic tensor calculation!