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
Runs a relaxation on the unit cell and atoms
Repeats the unit cell a number of times to make it sufficiently large to capture many interesting vibrational models
Generatives a number of finite displacement structures by moving each atom of the unit cell a little bit in each direction
Running single point calculations on each of (3)
Gathering all of the calculations and calculating second derivatives (the hessian matrix!)
Calculating the eigenvalues/eigenvectors of the hessian matrix to find the vibrational modes of the material
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 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(
model_name="EquiformerV2-31M-OMAT24-MP-sAlex",
local_cache="./fairchem_checkpoint_cache/",
),
},
min_lengths=10.0, # set the minimum unit cell size smaller to be compatible with limited github runner ram
)
print(
f'The entropy at { result["results"]["thermal_properties"]["temperatures"][-1]:.0f} K is { result["results"]["thermal_properties"]["entropy"][-1]:.2f} kJ/mol'
)
Congratulations, you ran your first phonon calculation!