.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples_generated/gallery/bs.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_generated_gallery_bs.py: .. _galleryband: Band-structure ============== .. GENERATED FROM PYTHON SOURCE LINES 8-18 .. image-sg:: /examples_generated/gallery/images/sphx_glr_bs_001.png :alt: bs :srcset: /examples_generated/gallery/images/sphx_glr_bs_001.png :class: sphx-glr-single-img .. image-sg:: /examples_generated/gallery/images/sphx_glr_bs_002.png :alt: bs :srcset: /examples_generated/gallery/images/sphx_glr_bs_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none | .. code-block:: Python from ase.build import bulk from ase.calculators.test import FreeElectrons atoms = bulk('Cu') band_path = atoms.cell.bandpath('GXWLGK', npoints=200) atoms.calc = FreeElectrons(nvalence=1, kpts=band_path) atoms.get_potential_energy() bs = atoms.calc.band_structure() bs.plot(emin=0, emax=20, filename='cu.png') .. _sphx_glr_download_examples_generated_gallery_bs.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: bs.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: bs.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: bs.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_