.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_ejdos.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_ejdos.py: Joint Density of States ======================= This example shows how plot the different contributions to the electronic joint density of states of Silicon. .. GENERATED FROM PYTHON SOURCE LINES 9-30 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/images/sphx_glr_plot_ejdos_001.png :alt: plot ejdos :srcset: /gallery/images/sphx_glr_plot_ejdos_001.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_ejdos_002.png :alt: plot ejdos :srcset: /gallery/images/sphx_glr_plot_ejdos_002.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_ejdos_003.png :alt: plot ejdos :srcset: /gallery/images/sphx_glr_plot_ejdos_003.png :class: sphx-glr-multi-img .. code-block:: Python import abipy.data as abidata from abipy.abilab import abiopen # Extract the bands computed with the SCF cycle on a Monkhorst-Pack mesh. with abiopen(abidata.ref_file("si_scf_WFK.nc")) as wfk_file: ebands = wfk_file.ebands # Select the valence and conduction bands to include in the JDOS # Here we include valence bands from 0 to 3 and the first conduction band (4). vrange = range(0, 4) crange = range(4, 5) # Plot joint-DOS. ebands.plot_ejdosvc(vrange, crange) # Plot decomposition of joint-DOS in terms of v --> c transitions ebands.plot_ejdosvc(vrange, crange, cumulative=False) # Show optical (vertical) transitions of energy 2.8 eV with abiopen(abidata.ref_file("si_nscf_GSR.nc")) as gsr_file: gsr_file.ebands.plot_transitions(2.8) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.552 seconds) .. _sphx_glr_download_gallery_plot_ejdos.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ejdos.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ejdos.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ejdos.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_