.. 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 Click :ref:`here ` to download the full example code or to run this example in your browser via Binder .. 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. .. GENERATED FROM PYTHON SOURCE LINES 9-25 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_fold2bloch_001.png :alt: Folded bands :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_fold2bloch_002.png :alt: Unfolded bands :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ================================= File Info ================================= Name: h6_FOLD2BLOCH.nc Directory: /Users/gmatteo/git_repos/abipy/abipy/data/refs Size: 35.26 kb Access Time: Mon Nov 11 03:43:05 2019 Modification Time: Wed Mar 20 16:53:35 2019 Change Time: Wed Mar 20 16:53:35 2019 ================================= Structure ================================= Full Formula (H6) Reduced Formula: H2 abc : 1.587532 3.175063 4.762595 angles: 90.000000 90.000000 90.000000 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 WARNING: Cannot compute direct and fundamental gap. Bandwidth: 11.116 (eV) Valence maximum located at: spin: 0, kpt: [+0.000, +0.000, +0.500], weight: 0.000, band: 2, eig: -1.060, occ: 2.000 TIP: Call set_fermie_to_vbm() to set the Fermi level to the VBM if this is a non-magnetic semiconductor 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:: default 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.389 seconds) .. _sphx_glr_download_gallery_plot_fold2bloch.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/abinit/abipy/gh-pages?filepath=notebooks/gallery/plot_fold2bloch.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_fold2bloch.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_fold2bloch.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_