{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n\n# Plotting rashba spin splitting\n\nPlotting rashba spin splitting example. \nFrom our first paper we had an example to plot the different spin texture projections of BiSb at a constant energy surface 0.60eV above the fermei level and -0.90ev below the fermi level. \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='BiSb_monolayer',\n                                code='vasp', \n                                spin_calc_type='non-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    \"BiSb_monolayer\",\n    \"vasp\",\n    \"non-colinear\",\n    \"fermi\",\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = 0.60 sx projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=0.60,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"x\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = 0.60 sy projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=0.60,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"y\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = 0.60 sz projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=0.60,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"z\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = -0.90 sx projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=-0.90,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"x\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = -0.90 sy projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=-0.90,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"y\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = -0.90 sz projection no arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=-0.90,\n    fermi=-1.1904,\n    spin_texture=True,\n    no_arrow=True,\n    spin_projection=\"z\",\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = 0.60 sx projection with arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=0.60,\n    fermi=-1.1904,\n    spin_texture=True,\n    spin_projection=\"x\",\n    arrow_size=3,\n    arrow_density=6,\n    plot_color_bar=True,\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## energy = -0.90 sx projection with arrows\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "pyprocar.fermi2D(\n    code=\"vasp\",\n    dirname=data_dir,\n    energy=-0.90,\n    fermi=-1.1904,\n    spin_texture=True,\n    spin_projection=\"x\",\n    arrow_size=3,\n    arrow_density=6,\n    plot_color_bar=True,\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
}