.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_edos_vs_broad.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_edos_vs_broad.py: Multiple e-DOSes ================ This example shows how to compute and plot multiple electron DOSes obtained with different values of the gaussian broadening. .. GENERATED FROM PYTHON SOURCE LINES 9-39 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_001.png :alt: e-DOS as function of the Gaussian broadening :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_002.png :alt: gridplot version, $\sigma = 0.1$ (eV), $\sigma = 0.2$ (eV), $\sigma = 0.3$ (eV) :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_003.png :alt: plot edos vs broad :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_004.png :alt: plot edos vs broad :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_005.png :alt: gridplot version, $\sigma = 0.1$ (eV), $\sigma = 0.2$ (eV), $\sigma = 0.3$ (eV) :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_edos_vs_broad_006.png :alt: $\sigma = 0.1$ (eV), $\sigma = 0.2$ (eV), $\sigma = 0.3$ (eV) :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none
| .. code-block:: default import abipy.data as abidata from abipy import abilab # Open the wavefunction file computed with a homogeneous sampling of the BZ # and extract the band structure on the k-mesh. with abilab.abiopen(abidata.ref_file("si_scf_WFK.nc")) as gs_wfk: gs_bands = gs_wfk.ebands # Compute the DOS with different values of the Gaussian smearing. widths = [0.1, 0.2, 0.3] edos_plotter = gs_bands.compare_gauss_edos(widths, step=0.1) # Invoke ElectronDosPlotter methods to plot results. edos_plotter.combiplot(title="e-DOS as function of the Gaussian broadening") edos_plotter.gridplot(title="gridplot version") with abilab.abiopen(abidata.ref_file("ni_666k_GSR.nc")) as gsr: ni_ebands_kmesh = gsr.ebands edos_plotter = ni_ebands_kmesh.compare_gauss_edos(widths=[0.1, 0.2, 0.3], step=0.2) title = "e-DOS as function of the Gaussian broadening" edos_plotter.combiplot(dos_mode="idos+dos") edos_plotter.combiplot(dos_mode="dos", spin_mode="resolved") edos_plotter.gridplot(title="gridplot version") edos_plotter.gridplot(spin_mode="resolved") .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.857 seconds) .. _sphx_glr_download_gallery_plot_edos_vs_broad.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/abinit/abipy/gh-pages?filepath=notebooks/gallery/plot_edos_vs_broad.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_edos_vs_broad.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_edos_vs_broad.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_