.. 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 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_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:: /gallery/images/sphx_glr_plot_efatbands_lm_001.png :alt: LM fatbands for atom index 0 :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ================================= File Info ================================= Name: ni_kpath_FATBANDS.nc Directory: /Users/gmatteo/git_repos/abipy/abipy/data/refs/ni_ebands Size: 619.35 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 (Ni1) Reduced Formula: Ni abc : 2.489016 2.489016 2.489016 angles: 60.000000 60.000000 60.000000 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 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 =============================== 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:: default 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.858 seconds) .. _sphx_glr_download_gallery_plot_efatbands_lm.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_efatbands_lm.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_efatbands_lm.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_efatbands_lm.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_