.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_scr.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_scr.py: Dielectric function with LFE ============================ This examples shows how to plot the macroscopic dielectric function computed in the GW code (optdriver 3) .. GENERATED FROM PYTHON SOURCE LINES 9-24 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/images/sphx_glr_plot_scr_001.png :alt: KS energies used to compute the SCR file. :srcset: /gallery/images/sphx_glr_plot_scr_001.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_scr_002.png :alt: Macroscopic dielectric function of $SiO_2$ with local-field effects. :srcset: /gallery/images/sphx_glr_plot_scr_002.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_scr_003.png :alt: Electron Energy Loss Function of $SiO_2$ :srcset: /gallery/images/sphx_glr_plot_scr_003.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none ================================= File Info ================================= Name: sio2_SCR.nc Directory: /home/runner/work/abipy/abipy/abipy/data/refs/sio2_screening Size: 426.16 kB Access Time: Wed Jul 2 08:05:39 2025 Modification Time: Wed Jul 2 08:00:59 2025 Change Time: Wed Jul 2 08:00:59 2025 ================================= Structure ================================= Full Formula (Si3 O6) Reduced Formula: SiO2 abc : 4.913040 4.913040 5.404630 angles: 90.000000 90.000000 120.000000 pbc : True True True Sites (9) # SP a b c --- ---- ------ ------ --------- 0 Si 0.465 0 0 1 Si 0 0.465 0.666667 2 Si -0.465 -0.465 0.333333 3 O 0.415 0.272 0.12 4 O -0.143 -0.415 0.453333 5 O -0.272 0.143 0.786667 6 O 0.143 -0.272 -0.12 7 O 0.272 0.415 0.546667 8 O -0.415 -0.143 0.213333 Abinit Spacegroup: spgid: 0, num_spatial_symmetries: 6, has_timerev: True, symmorphic: True ====================== K-points for screening function ====================== 0) [+0.000, +0.000, +0.000] 1) [+0.250, +0.000, +0.000] 2) [+0.500, +0.000, +0.000] 3) [+0.250, +0.250, +0.000] 4) [+0.000, +0.000, +0.333] 5) [+0.250, +0.000, +0.333] 6) [+0.500, +0.000, +0.333] 7) [-0.250, +0.000, +0.333] 8) [+0.250, +0.250, +0.333] Number of G-vectors in screening matrices: 9 Number of frequencies: 35 (real: 30, imaginary: 5) Setting Fermi energy to zero since `fermie_energy` is not initialized in Abinit v8.2 | .. code-block:: Python import abipy.data as abidata from abipy.abilab import abiopen with abiopen(abidata.ref_file("sio2_SCR.nc")) as ncfile: # The SCR file contains a structure and electron bands in the IBZ. # We can thus use the ebands object to plot bands + DOS. print(ncfile) edos = ncfile.ebands.get_edos() ncfile.ebands.plot_with_edos(edos, title="KS energies used to compute the SCR file.") # sphinx_gallery_thumbnail_number = 2 ncfile.plot_emacro(title="Macroscopic dielectric function of $SiO_2$ with local-field effects.") ncfile.plot_eelf(title="Electron Energy Loss Function of $SiO_2$") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.238 seconds) .. _sphx_glr_download_gallery_plot_scr.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_scr.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_scr.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_scr.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_