Note
Go to the end to download the full example code.
Lobster COHPCAR¶
This example shows how to analyze the COHPCAR file produced by Lobster code <http://schmeling.ac.rwth-aachen.de/cohp/>
Use abiopen.py FILE with –expose or –print for a command line interface and –notebook to generate a jupyter notebook.
Creating temporary file: /tmp/tmpelkw8l_oGaAs_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
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")
Total running time of the script: (0 minutes 0.361 seconds)