:orphan:

.. _ref_examples:

Examples
===================================

Here is a gallery of several examples demonstrating what PyProcar can
do!




.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. thumbnail-parent-div-close

.. raw:: html

    </div>

Band Structure
-------------------------------

These examples demonstrate the band structure plotting capabilities.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="One of the most powerful capabilities of PyProcar is allowing to correlate real space with elec...">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_autobands_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_autobands.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Autobands plotting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparing band structures example.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_compare_bands_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_compare_bands.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing band structures</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to plot atomic energy levels for the compound hBN-CNCN at the GAMM...">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_atomic_levels_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_atomic_levels.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting Atomic Levels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting non colinear band structures in VASP.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_noncolinear_vasp_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_noncolinear_vasp.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting non colinear band structures in VASP</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting non colinear band structures in Quantum Espresso.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_noncolinear_qe_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_noncolinear_qe.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting non colinear band structures in Quantum Espresso</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Often it is needed to search for localized modes within the band structure, typical examples ar...">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_ipr_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_ipr.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting Inverse participation ratio</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Unfolding Band Structure example.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_unfolding_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_unfolding.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Unfolding Band Structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting spin polarized band structures.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_spin_polarized_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_spin_polarized.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting spin polarized band structures</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting band structure example.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_colinear_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_colinear.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting band structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to utilize various configurations for plotting band structures usi...">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_bandsplot_configurations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_bandsplot_configurations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting with Configurations in pyprocar</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting 2D band structure example.">

.. only:: html

  .. image:: /examples/00-band_structure/images/thumb/sphx_glr_plot_2d_bands_thumb.png
    :alt:

  :ref:`sphx_glr_examples_00-band_structure_plot_2d_bands.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting 2D band structure</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

Density of States
-------------------------------

These examples demonstrate the density of states plotting capabilities.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting non colinear dos in VASP.">

.. only:: html

  .. image:: /examples/01-dos/images/thumb/sphx_glr_plot_noncolinear_dos_vasp_thumb.png
    :alt:

  :ref:`sphx_glr_examples_01-dos_plot_noncolinear_dos_vasp.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting non colinear dos in VASP</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting non colinear dos in Quantum Espresso.">

.. only:: html

  .. image:: /examples/01-dos/images/thumb/sphx_glr_plot_noncolinear_dos_qe_thumb.png
    :alt:

  :ref:`sphx_glr_examples_01-dos_plot_noncolinear_dos_qe.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting non colinear dos in Quantum Espresso</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to utilize various configurations for plotting the density of stat...">

.. only:: html

  .. image:: /examples/01-dos/images/thumb/sphx_glr_plot_dosplot_configurations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_01-dos_plot_dosplot_configurations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting with Configurations in pyprocar</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting density example.">

.. only:: html

  .. image:: /examples/01-dos/images/thumb/sphx_glr_plot_colinear_dos_thumb.png
    :alt:

  :ref:`sphx_glr_examples_01-dos_plot_colinear_dos.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting density of states</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting spin-polarized density of states example.">

.. only:: html

  .. image:: /examples/01-dos/images/thumb/sphx_glr_plot_spin_polarized_dos_thumb.png
    :alt:

  :ref:`sphx_glr_examples_01-dos_plot_spin_polarized_dos.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting spin-polarized density of states</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

Bands and Dos plot
-------------------------------

These examples demonstrate the bandsdosplot plotting capabilities.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting bandsdosplot example.">

.. only:: html

  .. image:: /examples/02-bands_dos/images/thumb/sphx_glr_plot_bandsdosplot_thumb.png
    :alt:

  :ref:`sphx_glr_examples_02-bands_dos_plot_bandsdosplot.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting bandsdosplot</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to utilize various configurations for plotting both band structure...">

.. only:: html

  .. image:: /examples/02-bands_dos/images/thumb/sphx_glr_plot_bandsdosplot_configurations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_02-bands_dos_plot_bandsdosplot_configurations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting bandsdosplot</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

Fermi 2D
-------------------------------

These examples demonstrate the Fermi2D plotting capabilities.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting fermi2d noncolinear example. For more information about fermi2d refer to fermi2d">

.. only:: html

  .. image:: /examples/03-fermi2d/images/thumb/sphx_glr_plot_fermi2d_spin_texture_thumb.png
    :alt:

  :ref:`sphx_glr_examples_03-fermi2d_plot_fermi2d_spin_texture.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi2d noncolinear</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting fermi2d example.">

.. only:: html

  .. image:: /examples/03-fermi2d/images/thumb/sphx_glr_plot_fermi2d_thumb.png
    :alt:

  :ref:`sphx_glr_examples_03-fermi2d_plot_fermi2d.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi2d</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to utilize various configurations for plotting the 2D Fermi surfac...">

.. only:: html

  .. image:: /examples/03-fermi2d/images/thumb/sphx_glr_plot_fermi2d_configurations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_03-fermi2d_plot_fermi2d_configurations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting with Configurations in pyprocar</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting rashba spin splitting example.  From our first paper we had an example to plot the dif...">

.. only:: html

  .. image:: /examples/03-fermi2d/images/thumb/sphx_glr_plot_rashba_spin_spliting_thumb.png
    :alt:

  :ref:`sphx_glr_examples_03-fermi2d_plot_rashba_spin_spliting.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting rashba spin splitting</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

Fermi 3D
-------------------------------

These examples demonstrate the Fermi3D plotting capabilities.

Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_spin_texture_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_spin_texture.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d spin_texture</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_plain_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_plain.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d plain</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_isoslider_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_isoslider.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d isoslider</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_isovalue_gif_thumb.gif
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_isovalue_gif.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d isovalue_gif</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_spin-polarized_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_spin-polarized.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d spin-polarized</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_de_hass_van_alphen_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_de_hass_van_alphen.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Showing how to get van alphen fequencies from the fermi surface</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to utilize various configurations for plotting the 3D Fermi surfac...">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_configurations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_configurations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting with Configurations in pyprocar</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Symmetry does not currently work! Make sure for fermi surface calculations turn off symmetry">

.. only:: html

  .. image:: /examples/04-fermi3d/images/thumb/sphx_glr_plot_fermi3d_cross_section_thumb.png
    :alt:

  :ref:`sphx_glr_examples_04-fermi3d_plot_fermi3d_cross_section.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting fermi3d cross_section</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

Other
-------------------------------

These examples demonstrate other capabilities.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The bandgap of a calculation can be found by:">

.. only:: html

  .. image:: /examples/05-other/images/thumb/sphx_glr_plot_bandgap_thumb.png
    :alt:

  :ref:`sphx_glr_examples_05-other_plot_bandgap.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Example of finding the bandgap</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This utility can be used to generate a 2D k-mesh centered at a given k-point and in a given k-p...">

.. only:: html

  .. image:: /examples/05-other/images/thumb/sphx_glr_plot_2dkmesh_generation_thumb.png
    :alt:

  :ref:`sphx_glr_examples_05-other_plot_2dkmesh_generation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Example of kmesh_generator</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In order to plot a band structure, one must define a set of k-points following a desired k-path...">

.. only:: html

  .. image:: /examples/05-other/images/thumb/sphx_glr_plot_kpath_generation_thumb.png
    :alt:

  :ref:`sphx_glr_examples_05-other_plot_kpath_generation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Example of kpath_generator</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The ElectronicBandStructure is used to handle the information  related to the electronic band s...">

.. only:: html

  .. image:: /examples/05-other/images/thumb/sphx_glr_plot_ebs_thumb.png
    :alt:

  :ref:`sphx_glr_examples_05-other_plot_ebs.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Example of finding the bandgap</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>

PyPoscar
-------------------------------

These examples demonstrate the PyPoscar module


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we&#x27;ll explore the atomic clusters within a slab of Bi2Se3. The slab structure ...">

.. only:: html

  .. image:: /examples/06-PyPoscar/images/thumb/sphx_glr_plot_clusters_pyposcar_thumb.gif
    :alt:

  :ref:`sphx_glr_examples_06-PyPoscar_plot_clusters_pyposcar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualizing Clusters in Bi2Se3 Slab</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we&#x27;ll demonstrate how to automatically find defects in a POSCAR file">

.. only:: html

  .. image:: /examples/06-PyPoscar/images/thumb/sphx_glr_plot_finding_defects_pyposcar_thumb.gif
    :alt:

  :ref:`sphx_glr_examples_06-PyPoscar_plot_finding_defects_pyposcar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Finding defects in a POSCAR file</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we&#x27;ll explore the radial distribution functions (RDF) of an atomic structure. ...">

.. only:: html

  .. image:: /examples/06-PyPoscar/images/thumb/sphx_glr_plot_rdf_cutoff_pyposcar_thumb.png
    :alt:

  :ref:`sphx_glr_examples_06-PyPoscar_plot_rdf_cutoff_pyposcar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Analyzing Radial Distribution Functions (RDF)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we&#x27;ll demonstrate how to substitute atoms in a POSCAR file using the pyprocar ...">

.. only:: html

  .. image:: /examples/06-PyPoscar/images/thumb/sphx_glr_plot_subsitution_pyposcar_thumb.png
    :alt:

  :ref:`sphx_glr_examples_06-PyPoscar_plot_subsitution_pyposcar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Substituting Atoms in a POSCAR File</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we&#x27;ll demonstrate several modifications on a POSCAR file using the pyprocar pa...">

.. only:: html

  .. image:: /examples/06-PyPoscar/images/thumb/sphx_glr_plot_utils_pyposcar_thumb.gif
    :alt:

  :ref:`sphx_glr_examples_06-PyPoscar_plot_utils_pyposcar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Modifying a POSCAR File: Scaling, Supercells, and Defects</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:
   :includehidden:


   /examples/00-band_structure/index.rst
   /examples/01-dos/index.rst
   /examples/02-bands_dos/index.rst
   /examples/03-fermi2d/index.rst
   /examples/04-fermi3d/index.rst
   /examples/05-other/index.rst
   /examples/06-PyPoscar/index.rst


.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-gallery

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

      :download:`Download all examples in Python source code: examples_python.zip </examples/examples_python.zip>`

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

      :download:`Download all examples in Jupyter notebooks: examples_jupyter.zip </examples/examples_jupyter.zip>`


.. only:: html

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

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