.. 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 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_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:: /gallery/images/sphx_glr_plot_scr_001.png :alt: KS energies used to compute the SCR file. :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_scr_002.png :alt: Macroscopic dielectric function of $SiO_2$ with local-field effects. :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_scr_003.png :alt: Electron Energy Loss Function of $SiO_2$ :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ================================= File Info ================================= Name: sio2_SCR.nc Directory: /Users/gmatteo/git_repos/abipy/abipy/data/refs/sio2_screening Size: 426.16 kb Access Time: Wed Mar 20 21:31:02 2019 Modification Time: Wed Mar 20 16:53:35 2019 Change Time: Wed Mar 20 16:53:35 2019 ================================= Structure ================================= Full Formula (Si3 O6) Reduced Formula: SiO2 abc : 4.913040 4.913040 5.404630 angles: 90.000000 90.000000 120.000000 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], weight: 0.000 1) [+0.250, +0.000, +0.000], weight: 0.000 2) [+0.500, +0.000, +0.000], weight: 0.000 3) [+0.250, +0.250, +0.000], weight: 0.000 4) [+0.000, +0.000, +0.333], weight: 0.000 5) [+0.250, +0.000, +0.333], weight: 0.000 6) [+0.500, +0.000, +0.333], weight: 0.000 7) [-0.250, +0.000, +0.333], weight: 0.000 8) [+0.250, +0.250, +0.333], weight: 0.000 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:: default 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.353 seconds) .. _sphx_glr_download_gallery_plot_scr.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_scr.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_scr.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_scr.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_