{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# LM-fatbands\n\nThis example shows how to plot the LM-projected fatbands.\nThe FATBANDS file must have benn produced with prtdos 3 and prtdosm 1.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import abipy.abilab as abilab\nimport abipy.data as abidata\n\nfbnc_kpath = abilab.abiopen(abidata.ref_file(\"ni_kpath_FATBANDS.nc\"))\nprint(fbnc_kpath)\n\n# NC files have contributions up to L = 4 (g channel)\n# but here we are intererested in s,p,d terms only so we use the optional argument lmax\nlmax = 2\n\n# we are not interested in a small energy window around the Fermi level.\nelims = [-1.5, +1]\n\n# and a subset of bands (remember that in python we start to count from 0)\nblist = list(range(4, 10))\n\n# Plot fatbands with LM character up to lmax.\n# The grid contains (lmax + 1) columns, each column has (2l + 1) subplots\n# corresponding to the LM character for M in [-l, -l-1, ... 0, 1, +l].\nfbnc_kpath.plot_fatbands_mview(iatom=0, fact=1.5, lmax=lmax,\n ylims=elims, blist=list(range(4, 10)),\n title=\"LM fatbands for atom index 0\")\n\nfbnc_kpath.close()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.0" } }, "nbformat": 4, "nbformat_minor": 0 }