Phonons

Phonons#

Phonon calculations are very important for inorganic materials science to

  • Calculate thermal conductivity

  • Understand the vibrational modes, and thus entropy and free energy, of a material

  • Predict the stability of a material at finite temperature (e.g. 300 K) among many others! We can run a similarly straightforward calculation that

  1. Runs a relaxation on the unit cell and atoms

  2. Repeats the unit cell a number of times to make it sufficiently large to capture many interesting vibrational models

  3. Generatives a number of finite displacement structures by moving each atom of the unit cell a little bit in each direction

  4. Running single point calculations on each of (3)

  5. Gathering all of the calculations and calculating second derivatives (the hessian matrix!)

  6. Calculating the eigenvalues/eigenvectors of the hessian matrix to find the vibrational modes of the material

  7. Analyzing the thermodynamic properties of the vibrational modes.

Note that this analysis assumes that all vibrational modes are harmonic, which is a pretty reasonable approximately for low/moderate temperature materials, but becomes less realistic at high temperatures.

from __future__ import annotations

from ase.build import bulk
from quacc.recipes.mlp.phonons import phonon_flow

# Make an Atoms object of a bulk Cu structure
atoms = bulk("Cu")

# Run a phonon (hessian) calculation with our favorite MLP potential
result = phonon_flow(
    atoms,
    method="fairchem",
    job_params={
        "all": dict(
            name_or_path="uma-s-1p1",
            task_name="omat",
        ),
    },
    min_lengths=10.0,  # set the minimum unit cell size smaller to be compatible with limited github runner ram
)
WARNING:root:device was not explicitly set, using device='cuda'.
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:Calculation will run at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2025-08-26-17-42-05-103020-40240
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2025-08-26-17-42-05-103020-40240
INFO:quacc.runners.prep:Calculation will run at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/tmp-quacc-2025-08-26-17-42-05-887158-31762
/home/runner/work/_tool/Python/3.12.11/x64/lib/python3.12/site-packages/seekpath/hpkot/__init__.py:172: DeprecationWarning: dict interface is deprecated. Use attribute interface instead
  conv_lattice = dataset["std_lattice"]
INFO:quacc.runners.prep:Calculation results stored at /home/runner/work/fairchem/fairchem/docs/inorganic_materials/examples_tutorials/quacc-2025-08-26-17-42-05-887158-31762
print(
    f'The entropy at { result["results"]["thermal_properties"]["temperatures"][-1]:.0f} K is { result["results"]["thermal_properties"]["entropy"][-1]:.2f} kJ/mol'
)
The entropy at 1000 K is 61.83 kJ/mol

Congratulations, you ran your first phonon calculation!