{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n\n# Plotting non colinear dos in Quantum Espresso\n\nPlotting non colinear dos in Quantum Espresso.\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='qe', \n                                spin_calc_type='non-colinear',\n                                calc_type='dos')\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, \"examples\", \"Fe\", \"qe\", \"non-colinear\", \"dos\"\n)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Parametric mode\nQuantum Espresso expresses the projections in the coupled basis,\ntherefore orbitals takes different meanings.\nFor details on the meaning of the indices of the atomic projection please refer to the user guide :ref:'atomic_projections'\n\n\n\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "atoms = [0]\nspins = [0]\norbitals = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]\n\npyprocar.dosplot(\n    code=\"qe\",\n    mode=\"parametric\",\n    fermi=18.0536,\n    atoms=atoms,\n    orbitals=orbitals,\n    clim=[0, 1],\n    spins=spins,\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
}