.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_fold2bloch.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_gallery_plot_fold2bloch.py: Unfolding with fold2bloch ========================= This example shows how to plot the results produced by fold2bloch. See .. GENERATED FROM PYTHON SOURCE LINES 9-25 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/images/sphx_glr_plot_fold2bloch_001.png :alt: Folded bands :srcset: /gallery/images/sphx_glr_plot_fold2bloch_001.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_fold2bloch_002.png :alt: Unfolded bands :srcset: /gallery/images/sphx_glr_plot_fold2bloch_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none ================================= File Info ================================= Name: h6_FOLD2BLOCH.nc Directory: /home/runner/work/abipy/abipy/abipy/data/refs Size: 35.26 kB Access Time: Wed Jul 2 08:07:28 2025 Modification Time: Wed Jul 2 08:00:59 2025 Change Time: Wed Jul 2 08:00:59 2025 ================================= Structure ================================= Full Formula (H6) Reduced Formula: H2 abc : 1.587532 3.175063 4.762595 angles: 90.000000 90.000000 90.000000 pbc : True True True Sites (6) # SP a b c --- ---- --- --- -------- 0 H 0 0 0 1 H 0 0 0.333333 2 H 0 0 0.666667 3 H 0 0.5 0 4 H 0 0.5 0.333333 5 H 0 0.5 0.666667 Abinit Spacegroup: spgid: 0, num_spatial_symmetries: 48, has_timerev: True, symmorphic: True ============================== Electronic Bands ============================== Number of electrons: 6.0, Fermi level: -1.060 (eV) nsppol: 1, nkpt: 42, mband: 4, nspinor: 1, nspden: 1 smearing scheme: none (occopt 1), tsmear_eV: 0.272, tsmear Kelvin: 3157.7 WARNING: Cannot compute direct and fundamental gap. Bandwidth: 11.116 (eV) Valence maximum located at kpt index 41: spin: 0, kpt: [+0.000, +0.000, +0.500], band: 2, eig: -1.060, occ: 2.000 TIP: Use `--verbose` to print k-point coordinates with more digits Direct lattice of the primitive cell: abc : 1.587532 1.587532 1.587532 angles: 90.000000 90.000000 90.000000 Diagonal folding: [1 2 3] | .. code-block:: Python from __future__ import division, print_function from abipy import abilab import abipy.data as abidata with abilab.abiopen(abidata.ref_file("h6_FOLD2BLOCH.nc")) as ncfile: print(ncfile) # Plot folded bands ncfile.ebands.plot(title="Folded bands") # Plot unfolded bands along the path defined by kbounds. kbounds = [0, 1/2, 0, 0, 0, 0, 0, 0, 1/2] klabels = ["Y", r"$\Gamma$", "X"] # sphinx_gallery_thumbnail_number = 2 ncfile.plot_unfolded(kbounds, klabels, title="Unfolded bands") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.233 seconds) .. _sphx_glr_download_gallery_plot_fold2bloch.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_fold2bloch.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_fold2bloch.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_fold2bloch.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_