Electron DOSΒΆ

This example shows how to compute the DOS from the eigenvalues stored in the WFK file with the gaussian method.

  • ../_images/sphx_glr_plot_edos_001.png
  • ../_images/sphx_glr_plot_edos_002.png

Out:

/Users/gmatteo/git_repos/pymatgen/pymatgen/util/plotting.py:550: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
/Users/gmatteo/git_repos/pymatgen/pymatgen/util/plotting.py:550: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()

import abipy.data as abidata
from abipy.abilab import abiopen

# Open the wavefunction file computed with a homogeneous sampling of the BZ
# and extract the band structure on the k-mesh.
with abiopen(abidata.ref_file("si_scf_WFK.nc")) as gs_wfk:
    gs_ebands = gs_wfk.ebands

# Compute the DOS with the Gaussian method (default)
edos = gs_ebands.get_edos(method="gaussian", step=0.01, width=0.1)

# Plot electron DOS and IDOS
edos.plot(title="Silicon DOS")

# Plot electron DOS and IDOS
edos.plot_dos_idos(title="DOS and Integrated DOS")

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

Gallery generated by Sphinx-Gallery