.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_efatbands_lm.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_efatbands_lm.py: LM-fatbands =========== This example shows how to plot the LM-projected fatbands. The FATBANDS file must have benn produced with prtdos 3 and prtdosm 1. .. GENERATED FROM PYTHON SOURCE LINES 9-33 .. image-sg:: /gallery/images/sphx_glr_plot_efatbands_lm_001.png :alt: LM fatbands for atom index 0 :srcset: /gallery/images/sphx_glr_plot_efatbands_lm_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none ================================= File Info ================================= Name: ni_kpath_FATBANDS.nc Directory: /home/runner/work/abipy/abipy/abipy/data/refs/ni_ebands Size: 619.35 kB Access Time: Wed Jul 2 08:06:00 2025 Modification Time: Wed Jul 2 08:00:59 2025 Change Time: Wed Jul 2 08:00:59 2025 ================================= Structure ================================= Full Formula (Ni1) Reduced Formula: Ni abc : 2.489016 2.489016 2.489016 angles: 60.000000 60.000000 60.000000 pbc : True True True Sites (1) # SP a b c --- ---- --- --- --- 0 Ni 0 0 0 Abinit Spacegroup: spgid: 225, num_spatial_symmetries: 48, has_timerev: True, symmorphic: False ============================== Electronic Bands ============================== ================================= Structure ================================= Full Formula (Ni1) Reduced Formula: Ni abc : 2.489016 2.489016 2.489016 angles: 60.000000 60.000000 60.000000 pbc : True True True Sites (1) # SP a b c --- ---- --- --- --- 0 Ni 0 0 0 Abinit Spacegroup: spgid: 225, num_spatial_symmetries: 48, has_timerev: True, symmorphic: False Number of electrons: 18.0, Fermi level: 11.296 (eV) nsppol: 2, nkpt: 101, mband: 12, nspinor: 1, nspden: 2 smearing scheme: gaussian (occopt 7), tsmear_eV: 0.204, tsmear Kelvin: 2368.3 =============================== Fatbands Info =============================== prtdos: 3, prtdosm: 1, mbesslang: 5, pawprtdos: 0, usepaw: 0 nsppol: 2, nkpt: 101, mband: 12 Idx Symbol Reduced_Coords Lmax Ratsph [Bohr] Has_Atom ----- -------- ----------------------- ------ --------------- ---------- 0 Ni 0.00000 0.00000 0.00000 4 2 Yes | .. code-block:: Python import abipy.abilab as abilab import abipy.data as abidata fbnc_kpath = abilab.abiopen(abidata.ref_file("ni_kpath_FATBANDS.nc")) print(fbnc_kpath) # NC files have contributions up to L = 4 (g channel) # but here we are intererested in s,p,d terms only so we use the optional argument lmax lmax = 2 # we are not interested in a small energy window around the Fermi level. elims = [-1.5, +1] # and a subset of bands (remember that in python we start to count from 0) blist = list(range(4, 10)) # Plot fatbands with LM character up to lmax. # The grid contains (lmax + 1) columns, each column has (2l + 1) subplots # corresponding to the LM character for M in [-l, -l-1, ... 0, 1, +l]. fbnc_kpath.plot_fatbands_mview(iatom=0, fact=1.5, lmax=lmax, ylims=elims, blist=list(range(4, 10)), title="LM fatbands for atom index 0") fbnc_kpath.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.317 seconds) .. _sphx_glr_download_gallery_plot_efatbands_lm.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_efatbands_lm.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_efatbands_lm.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_efatbands_lm.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_