.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\03-fermi2d\plot_fermi2d_configurations.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_03-fermi2d_plot_fermi2d_configurations.py: .. _ref_plotting_fermi2d_configurations: Plotting with Configurations in `pyprocar` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This example illustrates how to utilize various configurations for plotting the 2D Fermi surface with non-colinear spin textures using the `pyprocar` package. It provides a structured way to explore and demonstrate different configurations for the `fermi2D` function. For more information about `fermi2D`, refer to :ref:`fermi2d`. Preparation ----------- Before diving into plotting, we need to download the example files. Use the following code to do this. Once downloaded, specify the `data_dir` to point to the location of the downloaded data. .. code-block:: :caption: Downloading example data_dir = pyprocar.download_example(save_dir='', material='Fe', code='vasp', spin_calc_type='non-colinear', calc_type='fermi') .. GENERATED FROM PYTHON SOURCE LINES 22-28 .. 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-colinear{os.sep}fermi" .. GENERATED FROM PYTHON SOURCE LINES 29-44 .. code-block:: Python # Section 1: Locating and Printing Configuration Files # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # This section demonstrates where the configuration files are located in the package. # It also shows how to print the configurations by setting print_plot_opts=True. # # Path to the configuration files in the package config_path = os.path.join(pyprocar.__path__[0], 'cfg') print(f"Configuration files are located at: {config_path}") # Print the configurations pyprocar.fermi2D(code='vasp', dirname=data_dir,fermi=5.599480, print_plot_opts=True) .. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_001.png :alt: plot fermi2d configurations :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Configuration files are located at: z:\research projects\pyprocar\pyprocar\cfg ____ ____ | _ \ _ _| _ \ _ __ ___ ___ __ _ _ __ | |_) | | | | |_) | '__/ _ \ / __/ _` | '__| | __/| |_| | __/| | | (_) | (_| (_| | | |_| \__, |_| |_| \___/ \___\__,_|_| |___/ A Python library for electronic structure pre/post-processing. Version 6.2.0 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 : Z:\Research Projects\pyprocar\data\examples\Fe\vasp\non-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 -------------------------------------------------------- add_axes_labels : {'description': 'Boolean to add axes labels', 'value': True} add_legend : {'description': 'Boolean to add legend', 'value': False} plot_color_bar : {'description': 'Boolean to plot the color bar', 'value': False} cmap : {'description': 'The colormap used for the plot.', 'value': 'jet'} clim : {'description': 'The color scale for the color bar', 'value': [None, None]} color : {'description': 'The colors for the spin plot lines.', 'value': ['blue', 'red']} linestyle : {'description': 'The linestyles for the spin plot lines.', 'value': ['solid', 'dashed']} linewidth : {'description': 'The linewidth of the fermi surface', 'value': 0.2} no_arrow : {'description': 'Boolean to use no arrows to represent the spin texture', 'value': False} arrow_color : {'description': 'The linestyles for the spin plot lines.', 'value': None} arrow_density : {'description': 'The arrow density for the spin texture', 'value': 10} arrow_size : {'description': 'The arrow size for the spin texture', 'value': 3} spin_projection : {'description': 'The projection for the color scale for spin texture', 'value': 'z^2'} marker : {'description': 'Controls the marker used for the spin plot', 'value': '.'} dpi : {'description': 'The dpi value to save the image as', 'value': 'figure'} x_label : {'description': 'The x label of the plot', 'value': '$k_{x}$ ($\\AA^{-1}$)'} y_label : {'description': 'The x label of the plot', 'value': '$k_{y}$ ($\\AA^{-1}$)'} WARNING : Make sure the kmesh has kz points with kz=0.0 +- 0.01 ---------------------------------------------------------------------------------------------------------- _____________________________________________________ Useful band indices for spin-0 : [4 5 6 7 8 9] .. GENERATED FROM PYTHON SOURCE LINES 45-65 .. code-block:: Python # Section 2: Spin Texture Projection with Custom Settings # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # This section demonstrates how to customize the appearance of the spin texture arrows. # We'll adjust the colormap, color limits. # pyprocar.fermi2D(code='vasp', fermi=5.599480, dirname=data_dir, spin_texture=True, spin_projection='x', arrow_size=3, arrow_density=10, plot_color_bar=True, cmap='jet', clim=[0, 1]) .. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_002.png :alt: plot fermi2d configurations :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_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.2.0 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 : Z:\Research Projects\pyprocar\data\examples\Fe\vasp\non-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 : True -------------------------------------------------------- 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 : [4 5 6 7 8 9] .. GENERATED FROM PYTHON SOURCE LINES 66-86 .. code-block:: Python # Section 3: Adjusting DPI # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # This section demonstrates how to adjust the dots per inch (DPI) for the combined plot. # pyprocar.fermi2D(code='vasp', dirname=data_dir, fermi=5.599480, spin_texture=True, spin_projection='z', arrow_size=3, arrow_density=10, plot_color_bar=True, cmap='jet', clim=[0, 1], dpi=300) .. image-sg:: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_003.png :alt: plot fermi2d configurations :srcset: /examples/03-fermi2d/images/sphx_glr_plot_fermi2d_configurations_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.2.0 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 : Z:\Research Projects\pyprocar\data\examples\Fe\vasp\non-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 : True -------------------------------------------------------- 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 : [4 5 6 7 8 9] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 12.888 seconds) .. _sphx_glr_download_examples_03-fermi2d_plot_fermi2d_configurations.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_configurations.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_fermi2d_configurations.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_