Skip to content

Phonopy

Optional dependency

PhonopyAnalyzer requires the phonopy extra.

uv add "materialsframework[phonopy]"
pip install "materialsframework[phonopy]"

Computes harmonic phonon frequencies, density of states, and thermal properties from finite-displacement force constants.

from ase.build import bulk
from materialsframework.analysis import PhonopyAnalyzer
from materialsframework.calculators import RandomCalculator

struct = bulk("Cu", "fcc", a=3.6, cubic=True)
calc = RandomCalculator()

phonopy = PhonopyAnalyzer(calculator=calc)
res = phonopy.calculate(struct)

print(res["total_dos"])
print(res["projected_dos"])
print(res["thermal_properties"])

See Theory for the derivation, or the API Reference for the full parameter list.