{"library":"lobsterpy","title":"Lobsterpy","description":"Lobsterpy is a Python package designed for automatic bonding analysis derived from LOBSTER calculations, which themselves process VASP output. It helps researchers analyze chemical bonding in materials efficiently. The current version is 0.6.0, and the project is under active development with irregular but consistent releases.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install lobsterpy"],"cli":{"name":"lobsterpy","version":"usage: lobsterpy [-h]"}},"imports":["from lobsterpy.cohp.analyze import LobsterpyAnalysis","from lobsterpy.cohp.data import LobsterpyData"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pathlib import Path\nfrom lobsterpy.cohp.analyze import LobsterpyAnalysis\n\n# NOTE: Replace with the actual path to your LOBSTER/VASP calculation directory.\n# This directory should contain files like COHPCAR.lobster, vasprun.xml, POSCAR etc.\n# For a runnable example, you would need to set up such a directory locally.\npath_to_lobster_calc = Path('/path/to/your/lobster_calculation_output')\n\n# Create an instance of LobsterpyAnalysis\ntry:\n    analyzer = LobsterpyAnalysis(\n        path_to_lobster_calc=path_to_lobster_calc,\n        gaussian_smearing_width=0.05,\n        spin_type='none' # or 'up', 'down' for spin-polarized calculations\n    )\n\n    # Access bonding analysis results\n    bond_data = analyzer.bond_analysis\n    print(\"Bond Analysis:\\n\", bond_data)\n\n    # You can also get population data\n    population_data = analyzer.get_population_data()\n    print(\"Population Data:\\n\", population_data)\n\nexcept FileNotFoundError as e:\n    print(f\"Error: Calculation path not found or missing files. {e}\")\n    print(\"Please ensure 'path_to_lobster_calc' points to a valid LOBSTER/VASP calculation directory.\")\nexcept Exception as e:\n    print(f\"An error occurred during analysis: {e}\")","lang":"python","description":"This example demonstrates how to initialize `LobsterpyAnalysis` with a LOBSTER/VASP calculation directory and extract basic bonding and population data. Ensure the `path_to_lobster_calc` variable points to a directory containing all necessary LOBSTER and VASP output files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}