This Python script allows for quick calculation of the average ICOBI values between two atom types using files generated by LOBSTER, with an optional plotting feature for COBI (Chemical Orbital Bond Index) curves as a function of energy.
To function properly, this script requires the following files in the current directory:
ICOBILIST.lobsterCOBICAR.lobster(for plotting)POSCAR(structure)
-
Clone this repository:
git clone https://github.com/your-username/quick-cobi.git cd quick-cobi -
Install Python dependencies:
pip install pymatgen matplotlib palettable
💡 It is recommended to use a virtual environment (
venvorconda).
python quick_cobi.py [--plot] atom1 atom2 [min_dist max_dist]atom1 atom2: atom types to analyze (e.g.,Pb N)min_dist max_dist(optional): bond distance range in Å. If only one value is provided, it is used asmax_distwithmin_dist = 0.0.--plotor-p(optional): generates a COBI vs energy plot
--emin: minimum energy for plot (default: -5.0 eV)--emax: maximum energy for plot (default: 5.0 eV)
-
Basic analysis without plotting:
python quick_cobi.py Pb N 3.0
-
With minimum and maximum distances:
python quick_cobi.py Pb N 2.0 3.5
-
With plotting:
python quick_cobi.py --plot Fe O 1.5 2.8
-
With custom energy range:
python quick_cobi.py --plot --emin -4 --emax 4 Cu O 1.8 3.0
If no arguments are provided, the script will launch in interactive mode:
python quick_cobi.py- Displays statistics:
- Number of bonds
- Average ICOBI and standard deviation
- Saves plot as:
cobi_atom1_atom2_min-maxA.png
This script was created to simplify ICOBI analysis from LOBSTER outputs, focusing on flexibility and ease of use.