Skip to content

Sylvain-pitie/cobi_plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

🔬 Quick COBI - Fast ICOBI Bond Analysis with LOBSTER

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.

📦 Required Files

To function properly, this script requires the following files in the current directory:

  • ICOBILIST.lobster
  • COBICAR.lobster (for plotting)
  • POSCAR (structure)

⚙️ Installation

  1. Clone this repository:

    git clone https://github.com/your-username/quick-cobi.git
    cd quick-cobi
  2. Install Python dependencies:

    pip install pymatgen matplotlib palettable

💡 It is recommended to use a virtual environment (venv or conda).

🚀 Usage

Basic Command

python quick_cobi.py [--plot] atom1 atom2 [min_dist max_dist]

Arguments

  • 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 as max_dist with min_dist = 0.0.
  • --plot or -p (optional): generates a COBI vs energy plot

Additional Options

  • --emin: minimum energy for plot (default: -5.0 eV)
  • --emax: maximum energy for plot (default: 5.0 eV)

Examples

  • 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

🧪 Interactive Mode

If no arguments are provided, the script will launch in interactive mode:

python quick_cobi.py

📤 Output

  • Displays statistics:
    • Number of bonds
    • Average ICOBI and standard deviation
  • Saves plot as: cobi_atom1_atom2_min-maxA.png

🧱 Python Dependencies

🔧 Development

This script was created to simplify ICOBI analysis from LOBSTER outputs, focusing on flexibility and ease of use.

🙌 Acknowledgements

  • LOBSTER for chemical bonding analysis in solids
  • pymatgen for structure and electronic data management in Python

About

Plot the COBI between a pair of atoms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages