{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n\n# Plotting fermi2d\n\nPlotting fermi2d example.\n\nFirst download the example files with the code below. Then replace data_dir below.\n\n.. code-block::\n   :caption: Downloading example\n\n    data_dir = pyprocar.download_example(save_dir='', \n                                material='Fe',\n                                code='vasp', \n                                spin_calc_type='spin-polarized-colinear',\n                                calc_type='fermi')\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "importing pyprocar and specifying local data_dir\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import os\n\nimport pyprocar\n\ndata_dir = os.path.join(\n    pyprocar.utils.DATA_DIR,\n    \"examples\",\n    \"Fe\",\n    \"vasp\",\n    \"spin-polarized-colinear\",\n    \"fermi\",\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Plain mode\n\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(code=\"vasp\", mode=\"plain\", fermi=5.590136, dirname=data_dir)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## plain_bands mode\n\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\", mode=\"plain_bands\", add_legend=True, fermi=5.590136, dirname=data_dir\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## parametric mode\n\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "atoms = [0]\norbitals = [4, 5, 6, 7, 8]\nspins = [0, 1]\npyprocar.fermi2D(\n    code=\"vasp\",\n    mode=\"parametric\",\n    atoms=atoms,\n    orbitals=orbitals,\n    spins=spins,\n    dirname=data_dir,\n    fermi=5.590136,\n    spin_texture=False,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Selecting band indices\n\nYou can specify specfic bands with the band indices keyword.\nband_indices will be a list of list that contain band indices to plot for a given spin. Below I only plot bands 6 and 7 for spin 0\nAlso you can specify the colors of the bands as well with band_colors\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "band_indices = [[4, 5], []]\nband_colors = [[\"blue\", \"navy\"], []]\npyprocar.fermi2D(\n    code=\"vasp\",\n    mode=\"plain_bands\",\n    band_indices=band_indices,\n    band_colors=band_colors,\n    add_legend=True,\n    fermi=5.590136,\n    dirname=data_dir,\n)"
      ]
    }
  ],
  "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.9.20"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}