.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_lobster_cohp.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_lobster_cohp.py: Lobster COHPCAR =============== This example shows how to analyze the COHPCAR file produced by Lobster code Use `abiopen.py FILE` with --expose or --print for a command line interface and --notebook to generate a jupyter notebook. .. GENERATED FROM PYTHON SOURCE LINES 12-35 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_lobster_cohp_001.png :alt: GaAs COHP :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_lobster_cohp_002.png :alt: GaAs integrated COHP :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_lobster_cohp_003.png :alt: COHP total overlap for site index 0 :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_lobster_cohp_004.png :alt: COHP with orbital projections from site index 0 :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Creating temporary file: /var/folders/nc/k69spyd12qv2tk3stk2xrxg40000gr/T/tmpjy3kv2_xGaAs_COHPCAR.lobster COHP: Number of energies: 401, from -14.035 to 6.015 (eV) with E_fermi set 0 (was 2.298) has_partial_projections: True, nsppol: 1 Number of pairs: 2 [0] Ga@0 --> As@1 [1] As@1 --> Ga@0
| .. code-block:: default import os import abipy.data as abidata from abipy.abilab import abiopen dirpath = os.path.join(abidata.dirpath, "refs", "lobster_gaas") filename = os.path.join(dirpath, "GaAs_COHPCAR.lobster.gz") # Open the COHPCAR.lobster file (same API for COOPCAR.lobster) cohp_file = abiopen(filename) print(cohp_file) # Plot COHP. cohp_file.plot(title="GaAs COHP") # Plot integrated COHP. cohp_file.plot(what="i", title="GaAs integrated COHP") # Plot total overlap for all sites listed in `from_site_index` cohp_file.plot_site_pairs_total(from_site_index=[0], title="COHP total overlap for site index 0") # Plot partial crystal orbital projections for all sites listed in `from_site_index` cohp_file.plot_site_pairs_partial(from_site_index=[0], title="COHP with orbital projections from site index 0") .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.518 seconds) .. _sphx_glr_download_gallery_plot_lobster_cohp.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_lobster_cohp.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_lobster_cohp.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_lobster_cohp.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_