
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples\00-band_structure\plot_colinear.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_00-band_structure_plot_colinear.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_00-band_structure_plot_colinear.py:


.. _ref_plotting_colinear_bands:

Plotting band structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Plotting band structure example.

First download the example files with the code below. Then replace data_dir below.

.. code-block::
   :caption: Downloading example

    data_dir = pyprocar.download_example(save_dir='', 
                                material='Fe',
                                code='vasp', 
                                spin_calc_type='non-spin-polarized',
                                calc_type='bands')

.. GENERATED FROM PYTHON SOURCE LINES 24-25

importing pyprocar and specifying local data_dir

.. GENERATED FROM PYTHON SOURCE LINES 25-31

.. code-block:: Python

    import os
    import pyprocar

    data_dir = f"{pyprocar.utils.ROOT}{os.sep}data{os.sep}examples{os.sep}Fe{os.sep}vasp{os.sep}non-spin-polarized{os.sep}bands"









.. GENERATED FROM PYTHON SOURCE LINES 32-34

Plain mode
+++++++++++++++++++++++++++++++++++++++

.. GENERATED FROM PYTHON SOURCE LINES 34-41

.. code-block:: Python


    pyprocar.bandsplot(
                    code='vasp', 
                    mode='plain',
                    fermi=5.599480,
                    dirname=data_dir)




.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_001.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 1 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 42-49

Parametric mode
+++++++++++++++++++++++++++++++++++++++

For details on the meaning of the indices of the atomic projection please refer to the user guide :ref:'atomic_projections'




.. GENERATED FROM PYTHON SOURCE LINES 49-62

.. code-block:: Python

    atoms=[0]
    orbitals=[4,5,6,7,8]
    spins=[0]

    pyprocar.bandsplot(
                    code='vasp', 
                    mode='parametric',
                    fermi=5.599480,
                    atoms=atoms,
                    orbitals=orbitals,
                    spins=spins,
                    dirname=data_dir)




.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_002.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_002.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 63-70

parametric_linemode
+++++++++++++++++++++++++++++++++++++++

For details on the meaning of the indices of the atomic projection please refer to the user guide :ref:'atomic_projections'




.. GENERATED FROM PYTHON SOURCE LINES 70-85

.. code-block:: Python

    atoms=[0]
    orbitals=[4,5,6,7,8]
    spins=[0]

    pyprocar.bandsplot(
                    code='vasp', 
                    mode='parametric',
                    fermi=5.599480,
                    atoms=atoms,
                    orbitals=orbitals,
                    spins=spins,
                    dirname=data_dir)






.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_003.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_003.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 86-91

Scatter mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 91-105

.. code-block:: Python

    atoms=[0]
    orbitals=[4,5,6,7,8]
    spins=[0]

    pyprocar.bandsplot(
                    code='vasp', 
                    mode='scatter',
                    fermi=5.599480,
                    atoms=atoms,
                    orbitals=orbitals,
                    spins=spins,
                    dirname=data_dir)





.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_004.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_004.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 106-111

overlay_species mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 111-122

.. code-block:: Python

    orbitals=[4,5,6,7,8]
    spins=[0]

    pyprocar.bandsplot(
                    code='vasp', 
                    mode='overlay_species',
                    fermi=5.599480,
                    orbitals=orbitals,
                    spins=spins,
                    dirname=data_dir)




.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_005.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_005.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 123-128

overlay_orbtials mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 128-139

.. code-block:: Python

    atoms=[0]
    spins=[0]
    pyprocar.bandsplot(
                    code='vasp', 
                    mode='overlay_orbitals',
                    fermi=5.599480,
                    atoms=atoms,
                    spins=spins,
                    dirname=data_dir)





.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_006.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_006.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 4 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 140-145

overlay mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 145-154

.. code-block:: Python


    items={'Fe':[4,5,6,7,8]}
    pyprocar.bandsplot(
                    code='vasp', 
                    mode='overlay',
                    fermi=5.599480,
                    items=items,
                    dirname=data_dir)




.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_007.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_007.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)



.. GENERATED FROM PYTHON SOURCE LINES 155-160

overlay mode by orbital names
=============================




.. GENERATED FROM PYTHON SOURCE LINES 160-167

.. code-block:: Python


    items={'Fe':['p','d']}
    pyprocar.bandsplot(
                    code='vasp', 
                    mode='overlay',
                    fermi=5.599480,
                    items=items,
                    dirname=data_dir)


.. image-sg:: /examples/00-band_structure/images/sphx_glr_plot_colinear_008.png
   :alt: plot colinear
   :srcset: /examples/00-band_structure/images/sphx_glr_plot_colinear_008.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


                ----------------------------------------------------------------------------------------------------------
                There are additional plot options that are defined in the configuration file. 
                You can change these configurations by passing the keyword argument to the function.
                To print a list of all plot options set `print_plot_opts=True`

                Here is a list modes : plain , parametric , scatter , atomic , overlay , overlay_species , overlay_orbitals
                ----------------------------------------------------------------------------------------------------------
            
    C:\Users\lllang\miniconda3\envs\pyprocar_dev\lib\site-packages\spglib\spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['wyckoffs']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead
      warnings.warn(

    (<Figure size 900x600 with 2 Axes>, <Axes: xlabel='K vector', ylabel='E - E$_F$ (eV)'>)




.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 2.716 seconds)


.. _sphx_glr_download_examples_00-band_structure_plot_colinear.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_colinear.ipynb <plot_colinear.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_colinear.py <plot_colinear.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_colinear.zip <plot_colinear.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
