.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_gw_spectral_functions.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_gw_spectral_functions.py: G0W0 spectral function ====================== This examples shows how to plot the G0W0 spectral functions A(w) at the gamma point. See also lesson tgw2_4 .. GENERATED FROM PYTHON SOURCE LINES 9-22 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_gw_spectral_functions_001.png :alt: K-point: [+0.000, +0.000, +0.000] :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_gw_spectral_functions_002.png :alt: K-point: [+0.000, +0.000, +0.000] :class: sphx-glr-multi-img .. code-block:: default import abipy.data as abidata from abipy.abilab import abiopen # Open the file with the GW results sigres = abiopen(abidata.ref_file("al_g0w0_sigmaw_SIGRES.nc")) # Plot A(w) for the first spin, the gamma point, and all bands sigres.plot_spectral_functions() # Only bands in [0, 1, 2] sigres.plot_spectral_functions(spin=0, kpoint=(0, 0, 0), include_bands=range(0, 3)) sigres.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.431 seconds) .. _sphx_glr_download_gallery_plot_gw_spectral_functions.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_gw_spectral_functions.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_gw_spectral_functions.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_gw_spectral_functions.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_