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

.. only:: html

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

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

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

.. _sphx_glr_examples_03-fermi2d_plot_fermi2d.py:


.. _ref_plotting_fermi2d:

Plotting fermi2d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Plotting fermi2d 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='spin-polarized-colinear',
                                calc_type='fermi')

.. 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}spin-polarized-colinear{os.sep}fermi"









.. GENERATED FROM PYTHON SOURCE LINES 32-36

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



.. GENERATED FROM PYTHON SOURCE LINES 36-43

.. code-block:: Python


    pyprocar.fermi2D(code = 'vasp', 
                   mode='plain',
                   fermi=5.590136,
                   dirname=data_dir)





.. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_001.png
   :alt: plot fermi2d
   :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_001.png
   :class: sphx-glr-single-img


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

 .. code-block:: none

     ____        ____
    |  _ \ _   _|  _ \ _ __ ___   ___ __ _ _ __ 
    | |_) | | | | |_) | '__/ _ \ / __/ _` | '__|
    |  __/| |_| |  __/| | | (_) | (_| (_| | |   
    |_|    \__, |_|   |_|  \___/ \___\__,_|_|
           |___/
    A Python library for electronic structure pre/post-processing.

    Version 6.3.1 created on Jun 10th, 2021

    Please cite:
     Uthpala Herath, Pedram Tavadze, Xu He, Eric Bousquet, Sobhit Singh, Francisco Muñoz and Aldo Romero.,
     PyProcar: A Python library for electronic structure pre/post-processing.,
     Computer Physics Communications 251 (2020):107080.


    Developers:
    - Francisco Muñoz
    - Aldo Romero
    - Sobhit Singh
    - Uthpala Herath
    - Pedram Tavadze
    - Eric Bousquet
    - Xu He
    - Reese Boucher
    - Logan Lang
    - Freddy Farah
    
    dirname         :  C:\Users\lllang\Desktop\Current_Projects\pyprocar\data\examples\Fe\vasp\spin-polarized-colinear\fermi
    bands           :  None
    atoms           :  None
    orbitals        :  None
    spin comp.      :  None
    energy          :  None
    rot. symmetry   :  1
    origin (trasl.) :  [0, 0, 0]
    rotation        :  [0, 0, 0, 1]
    save figure     :  None
    spin_texture    :  False

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

                Here is a list modes : plain , plain_bands , parametric
                --------------------------------------------------------
            
    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(

                WARNING : Make sure the kmesh has kz points with kz=0.0 +- 0.01
                ----------------------------------------------------------------------------------------------------------
            
    _____________________________________________________
    Useful band indices for spin-0 : [2 3 4 5]
    Useful band indices for spin-1 : [2 3]




.. GENERATED FROM PYTHON SOURCE LINES 44-48

plain_bands mode
+++++++++++++++++++++++++++++++++++++++



.. GENERATED FROM PYTHON SOURCE LINES 48-59

.. code-block:: Python


    pyprocar.fermi2D(code = 'vasp', 
                   mode='plain_bands',
                   add_legend=True,
                   fermi=5.590136,
                   dirname=data_dir)








.. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_002.png
   :alt: plot fermi2d
   :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_002.png
   :class: sphx-glr-single-img


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

 .. code-block:: none

     ____        ____
    |  _ \ _   _|  _ \ _ __ ___   ___ __ _ _ __ 
    | |_) | | | | |_) | '__/ _ \ / __/ _` | '__|
    |  __/| |_| |  __/| | | (_) | (_| (_| | |   
    |_|    \__, |_|   |_|  \___/ \___\__,_|_|
           |___/
    A Python library for electronic structure pre/post-processing.

    Version 6.3.1 created on Jun 10th, 2021

    Please cite:
     Uthpala Herath, Pedram Tavadze, Xu He, Eric Bousquet, Sobhit Singh, Francisco Muñoz and Aldo Romero.,
     PyProcar: A Python library for electronic structure pre/post-processing.,
     Computer Physics Communications 251 (2020):107080.


    Developers:
    - Francisco Muñoz
    - Aldo Romero
    - Sobhit Singh
    - Uthpala Herath
    - Pedram Tavadze
    - Eric Bousquet
    - Xu He
    - Reese Boucher
    - Logan Lang
    - Freddy Farah
    
    dirname         :  C:\Users\lllang\Desktop\Current_Projects\pyprocar\data\examples\Fe\vasp\spin-polarized-colinear\fermi
    bands           :  None
    atoms           :  None
    orbitals        :  None
    spin comp.      :  None
    energy          :  None
    rot. symmetry   :  1
    origin (trasl.) :  [0, 0, 0]
    rotation        :  [0, 0, 0, 1]
    save figure     :  None
    spin_texture    :  False

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

                Here is a list modes : plain , plain_bands , parametric
                --------------------------------------------------------
            

                WARNING : Make sure the kmesh has kz points with kz=0.0 +- 0.01
                ----------------------------------------------------------------------------------------------------------
            
    _____________________________________________________
    Useful band indices for spin-0 : [2 3 4 5]
    Useful band indices for spin-1 : [2 3]




.. GENERATED FROM PYTHON SOURCE LINES 60-64

parametric mode
+++++++++++++++++++++++++++++++++++++++



.. GENERATED FROM PYTHON SOURCE LINES 64-79

.. code-block:: Python


    atoms=[0]
    orbitals=[4,5,6,7,8]
    spins=[0,1]
    pyprocar.fermi2D(code = 'vasp',
                   mode='parametric', 
                    atoms=atoms,
                    orbitals=orbitals,
                    spins=spins,
                    dirname=data_dir,
                    fermi=5.590136,
                    spin_texture=False)






.. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_003.png
   :alt: plot fermi2d
   :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_003.png
   :class: sphx-glr-single-img


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

 .. code-block:: none

     ____        ____
    |  _ \ _   _|  _ \ _ __ ___   ___ __ _ _ __ 
    | |_) | | | | |_) | '__/ _ \ / __/ _` | '__|
    |  __/| |_| |  __/| | | (_) | (_| (_| | |   
    |_|    \__, |_|   |_|  \___/ \___\__,_|_|
           |___/
    A Python library for electronic structure pre/post-processing.

    Version 6.3.1 created on Jun 10th, 2021

    Please cite:
     Uthpala Herath, Pedram Tavadze, Xu He, Eric Bousquet, Sobhit Singh, Francisco Muñoz and Aldo Romero.,
     PyProcar: A Python library for electronic structure pre/post-processing.,
     Computer Physics Communications 251 (2020):107080.


    Developers:
    - Francisco Muñoz
    - Aldo Romero
    - Sobhit Singh
    - Uthpala Herath
    - Pedram Tavadze
    - Eric Bousquet
    - Xu He
    - Reese Boucher
    - Logan Lang
    - Freddy Farah
    
    dirname         :  C:\Users\lllang\Desktop\Current_Projects\pyprocar\data\examples\Fe\vasp\spin-polarized-colinear\fermi
    bands           :  None
    atoms           :  [0]
    orbitals        :  [4, 5, 6, 7, 8]
    spin comp.      :  [0, 1]
    energy          :  None
    rot. symmetry   :  1
    origin (trasl.) :  [0, 0, 0]
    rotation        :  [0, 0, 0, 1]
    save figure     :  None
    spin_texture    :  False

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

                Here is a list modes : plain , plain_bands , parametric
                --------------------------------------------------------
            

                WARNING : Make sure the kmesh has kz points with kz=0.0 +- 0.01
                ----------------------------------------------------------------------------------------------------------
            
    _____________________________________________________
    Useful band indices for spin-0 : [2 3 4 5]
    Useful band indices for spin-1 : [2 3]




.. GENERATED FROM PYTHON SOURCE LINES 80-86

Selecting band indices
+++++++++++++++++++++++++++++++++++++++

You can specify specfic bands with the band indices keyword. 
band_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
Also you can specify the colors of the bands as well with band_colors

.. GENERATED FROM PYTHON SOURCE LINES 86-94

.. code-block:: Python

    band_indices = [[4,5],[]]
    band_colors = [['blue','navy'], []]
    pyprocar.fermi2D(code = 'vasp', 
                   mode='plain_bands',
                   band_indices = band_indices,
                   band_colors=band_colors,
                   add_legend=True,
                   fermi=5.590136,
                   dirname=data_dir)


.. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_004.png
   :alt: plot fermi2d
   :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_004.png
   :class: sphx-glr-single-img


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

 .. code-block:: none

     ____        ____
    |  _ \ _   _|  _ \ _ __ ___   ___ __ _ _ __ 
    | |_) | | | | |_) | '__/ _ \ / __/ _` | '__|
    |  __/| |_| |  __/| | | (_) | (_| (_| | |   
    |_|    \__, |_|   |_|  \___/ \___\__,_|_|
           |___/
    A Python library for electronic structure pre/post-processing.

    Version 6.3.1 created on Jun 10th, 2021

    Please cite:
     Uthpala Herath, Pedram Tavadze, Xu He, Eric Bousquet, Sobhit Singh, Francisco Muñoz and Aldo Romero.,
     PyProcar: A Python library for electronic structure pre/post-processing.,
     Computer Physics Communications 251 (2020):107080.


    Developers:
    - Francisco Muñoz
    - Aldo Romero
    - Sobhit Singh
    - Uthpala Herath
    - Pedram Tavadze
    - Eric Bousquet
    - Xu He
    - Reese Boucher
    - Logan Lang
    - Freddy Farah
    
    dirname         :  C:\Users\lllang\Desktop\Current_Projects\pyprocar\data\examples\Fe\vasp\spin-polarized-colinear\fermi
    bands           :  [[4, 5], []]
    atoms           :  None
    orbitals        :  None
    spin comp.      :  None
    energy          :  None
    rot. symmetry   :  1
    origin (trasl.) :  [0, 0, 0]
    rotation        :  [0, 0, 0, 1]
    save figure     :  None
    spin_texture    :  False

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

                Here is a list modes : plain , plain_bands , parametric
                --------------------------------------------------------
            

                WARNING : Make sure the kmesh has kz points with kz=0.0 +- 0.01
                ----------------------------------------------------------------------------------------------------------
            
    _____________________________________________________
    Useful band indices for spin-0 : [2 3 4 5]
    Useful band indices for spin-1 : [2 3]





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

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


.. _sphx_glr_download_examples_03-fermi2d_plot_fermi2d.py:

.. only:: html

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

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

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

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

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

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

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


.. only:: html

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

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