.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_lobster_files.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_files.py: Lobster COHP/COP/DOS ==================== This example shows how to analyze the output files produced by Lobster code < Use `abiview.py lobster DIRPATH` for a command line interface. .. GENERATED FROM PYTHON SOURCE LINES 11-33 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_lobster_files_001.png :alt: COOP + COHP + DOS :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_lobster_files_002.png :alt: plot lobster files :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_lobster_files_003.png :alt: plot lobster files :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ================================= COOP File ================================= COOP: 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 ================================= COHP File ================================= 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 ============================== ICHOHPLIST File ============================== Number of pairs: 2 index0 index1 type0 type1 spin average distance n_bonds pair 0 1 Ga As 0 -4.36062 2.49546 None (0, 1) 1 0 As Ga 0 -4.36062 2.49546 None (1, 0) =============================== Lobster DOSCAR =============================== Number of energies: 401, from -14.035 to 6.015 (eV) with E_fermi set to 0 (was 2.298) nsppol: 1 Number of sites in projected DOS: 2 0 --> {4s, 4p_y, 4p_z, 4p_x} 1 --> {4s, 4p_y, 4p_z, 4p_x}
| .. code-block:: default import os import abipy.data as abidata from abipy.abilab import LobsterAnalyzer dirpath = os.path.join(abidata.dirpath, "refs", "lobster_gaas") # Open the all the lobster files produced in directory dirpath # with the (optional) prefix GaAs_ lobana = LobsterAnalyzer.from_dir(dirpath, prefix="GaAs_") print(lobana) # Plot COOP + COHP + DOS. lobana.plot(title="COOP + COHP + DOS") # Plot COHP for all sites in from_site_index and Lobster DOS. lobana.plot_coxp_with_dos(from_site_index=[0, 1]) # Plot orbital projections. lobana.plot_coxp_with_dos(from_site_index=[0], with_orbitals=True) #lobana.plot_with_ebands(ebands="out_GSR.nc") .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.688 seconds) .. _sphx_glr_download_gallery_plot_lobster_files.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_files.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_lobster_files.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_lobster_files.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_