Phonon Band structures (Plotly version)ΒΆ

This example shows how to plot the phonon band structure of AlAs with plotly. See tutorial/lesson_rf2.html

from abipy.abilab import abiopen
import as abidata

# Open the PHBST file produced by anaddb and get the phonon bands.
with abiopen(abidata.ref_file("")) as ncfile:
    phbands = ncfile.phbands

# Read the Phonon DOS from the netcd file produced by anaddb (prtdos 2)
with abiopen(abidata.ref_file("")) as ncfile:
    phdos = ncfile.phdos


Warning: file /Users/gmatteo/git_repos/abipy/abipy/data/refs/alas_phonons/ does not contain atomic_numbers.
Particular methods need them!

plot phonon bands and DOS. shows how to treat the LO-TO splitting.

phbands.plotly(title="AlAs Phonon bands and DOS in eV")

plot phonon bands with DOS.

phbands.plotly_with_phdos(phdos, units="cm-1", title="AlAs Phonon bands + DOS in cm-1")

plot phonon DOS.

phdos.plotly(units="cm-1", title="Phonon DOS and IDOS in cm-1")

# Plot the phonon band structure with different color for each line.
#                             title="AlAs with different color for each line.")

# sphinx_gallery_thumbnail_path = '_static/plotly_logo.png'

Total running time of the script: ( 0 minutes 0.564 seconds)

Gallery generated by Sphinx-Gallery