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

.. only:: html

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

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

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

.. _sphx_glr_examples_01-dos_plot_colinear_dos.py:


.. _ref_plotting_colinear_dos:

Plotting density of states
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Plotting density 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='SrVO3',
                                code='vasp', 
                                spin_calc_type='non-spin-polarized',
                                calc_type='fermi')

.. GENERATED FROM PYTHON SOURCE LINES 23-24

importing pyprocar and specifying local data_dir

.. GENERATED FROM PYTHON SOURCE LINES 24-33

.. code-block:: Python

    import os

    import pyprocar

    data_dir = os.path.join(
        pyprocar.utils.DATA_DIR, "examples", "SrVO3", "vasp", "non-spin-polarized", "fermi"
    )









.. GENERATED FROM PYTHON SOURCE LINES 34-36

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

.. GENERATED FROM PYTHON SOURCE LINES 36-39

.. code-block:: Python


    pyprocar.dosplot(code="vasp", mode="plain", fermi=5.3017, dirname=data_dir)




.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_001.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------

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



.. GENERATED FROM PYTHON SOURCE LINES 40-47

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 47-62

.. code-block:: Python

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

    pyprocar.dosplot(
        code="vasp",
        mode="parametric",
        fermi=5.3017,
        atoms=atoms,
        orbitals=orbitals,
        clim=[0, 1],
        spins=spins,
        dirname=data_dir,
    )




.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_002.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------

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



.. GENERATED FROM PYTHON SOURCE LINES 63-70

parametric_line 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 70-86

.. code-block:: Python

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

    pyprocar.dosplot(
        code="vasp",
        mode="parametric_line",
        fermi=5.3017,
        atoms=atoms,
        orbitals=orbitals,
        clim=[0, 1],
        spins=spins,
        dirname=data_dir,
    )





.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_003.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------

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



.. GENERATED FROM PYTHON SOURCE LINES 87-92

stack_species mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 92-104

.. code-block:: Python

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

    pyprocar.dosplot(
        code="vasp",
        mode="stack_species",
        fermi=5.3017,
        orbitals=orbitals,
        spins=spins,
        dirname=data_dir,
    )




.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_004.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------
    The plot only considers orbitals [4, 5, 6, 7, 8]

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



.. GENERATED FROM PYTHON SOURCE LINES 105-110

stack_orbtials mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 110-122

.. code-block:: Python

    atoms = [2, 3, 4]
    spins = [0]
    pyprocar.dosplot(
        code="vasp",
        mode="stack_orbitals",
        fermi=5.3017,
        atoms=atoms,
        spins=spins,
        dirname=data_dir,
    )





.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_005.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------
    The plot only considers atoms ['O' 'O' 'O']

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



.. GENERATED FROM PYTHON SOURCE LINES 123-128

stack mode
+++++++++++++++++++++++++++++++++++++++




.. GENERATED FROM PYTHON SOURCE LINES 128-133

.. code-block:: Python


    items = dict(Sr=[0], O=[1, 2, 3], V=[4, 5, 6, 7, 8])
    pyprocar.dosplot(code="vasp", mode="stack", fermi=5.3017, items=items, dirname=data_dir)





.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_006.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------

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



.. GENERATED FROM PYTHON SOURCE LINES 134-139

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




.. GENERATED FROM PYTHON SOURCE LINES 139-151

.. code-block:: Python

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

    pyprocar.dosplot(
        code="vasp",
        mode="overlay_species",
        fermi=5.3017,
        orbitals=orbitals,
        spins=spins,
        dirname=data_dir,
    )




.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_007.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------
    The plot only considers orbitals [4, 5, 6, 7, 8]

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



.. GENERATED FROM PYTHON SOURCE LINES 152-157

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




.. GENERATED FROM PYTHON SOURCE LINES 157-169

.. code-block:: Python

    atoms = [0]
    spins = [0]
    pyprocar.dosplot(
        code="vasp",
        mode="overlay_orbitals",
        fermi=5.3017,
        atoms=atoms,
        spins=spins,
        dirname=data_dir,
    )





.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_008.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_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 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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------
    The plot only considers atoms ['Sr']

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



.. GENERATED FROM PYTHON SOURCE LINES 170-175

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




.. GENERATED FROM PYTHON SOURCE LINES 175-180

.. code-block:: Python


    items = dict(Sr=[0], O=[1, 2, 3], V=[4, 5, 6, 7, 8])
    pyprocar.dosplot(
        code="vasp", mode="overlay", fermi=5.3017, items=items, dirname=data_dir
    )



.. image-sg:: /examples/01-dos/images/sphx_glr_plot_colinear_dos_009.png
   :alt: plot colinear dos
   :srcset: /examples/01-dos/images/sphx_glr_plot_colinear_dos_009.png
   :class: sphx-glr-single-img


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

 .. code-block:: none


                --------------------------------------------------------
                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 , parametric , parameteric_line , stack , stack_orbitals , stack_species , overlay , overlay_orbitals , overlay_species
                --------------------------------------------------------

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




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

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


.. _sphx_glr_download_examples_01-dos_plot_colinear_dos.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_dos.ipynb <plot_colinear_dos.ipynb>`

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

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

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

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


.. only:: html

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

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