Analysis#
- class lobsterpy.cohp.analyze.Analysis(path_to_poscar, path_to_icohplist, path_to_cohpcar, path_to_charge=None, path_to_madelung=None, icohplist_obj=None, completecohp_obj=None, charge_obj=None, madelung_obj=None, are_cobis=False, are_coops=False, cutoff_icohp=0.1, noise_cutoff=0.1, orbital_cutoff=0.05, orbital_resolved=False, start=None, summed_spins=True, type_charge=None, which_bonds='cation-anion')[source]#
Bases:
object
Class to automatically analyze COHP/COOP/COBI populations from Lobster.
- Parameters:
are_cobis (bool) – bool indicating if file contains COBI/ICOBI data
are_coops (bool) – bool indicating if file contains COOP/ICOOP data
cutoff_icohp (float) – Cutoff in percentage for evaluating neighbors based on ICOHP values. cutoff_icohp*max_icohp limits the number of considered neighbours for evaluating environments.
path_to_cohpcar (str | Path | None) – path to COHPCAR.lobster or COBICAR.lobster or COOPCAR.lobster .
path_to_charge (str | Path | None) – path to CHARGE.lobster.
path_to_icohplist (str | Path | None) – path to ICOHPLIST.lobster or ICOBILIST.lobster or ICOOPLIST.lobster.
path_to_poscar (str | Path | None) – path to structure (e.g., CONTCAR (preferred), POSCAR or POSCAR.lobster)
path_to_madelung (str | Path | None) – path to MadelungEnergies.lobster.
charge_obj (Charge | None) – pymatgen lobster.io.charge object
completecohp_obj (CompleteCohp | None) – pymatgen.electronic_structure.cohp.CompleteCohp object
icohplist_obj (Icohplist | None) – pymatgen lobster.io.Icohplist object
madelung_obj (MadelungEnergies | None) – pymatgen lobster.io.MadelungEnergies object
noise_cutoff (float) – Sets the lower limit tolerance for ICOHPs or ICOOPs or ICOBIs considered in analysis.
orbital_cutoff (float) – Sets the minimum percentage for the orbital contribution considered to be relevant in orbital resolved analysis. (Affects only when orbital_resolved argument is set to True) Set it to 0 to get results of all orbitals in the detected relevant bonds. Default is to 0.05 i.e. only analyzes if orbital contribution is 5 % or more.
orbital_resolved (bool) – bool indicating whether orbital wise analysis is performed
type_charge (str | None) – If no path_to_charge is given, Valences will be used. Otherwise, Mulliken charges. Löwdin charges cannot be selected at the moment.
which_bonds (str) – Selects kinds of bonds that are analyzed. cation-anion is the default. Alternatively, all bonds can also be selected. Support to other kinds of bonds will be added soon.
summed_spins (bool) – if True, COHP Spin.up and Spin.down populations will be summed
start (float | None) – sets the lower limit of energy for evaluation of bonding and antibonding percentages below efermi. Defaults to None (i.e., all populations below efermi are included)
- Variables:
condensed_bonding_analysis (-) – dict including a summary of the most important bonding properties
final_dict_bonds (-) – dict including information on ICOHPs per bond type
final_dict_ions (-) – dict including information on environments of cations
chemenv (-) – pymatgen.io.lobster.lobsterenv.LobsterNeighbors object
lse (-) – LightStructureEnvironment from pymatgen
anion_types (-) – Set of Element objects from pymatgen
list_equivalent_sites (-) – list of site indices of sites that indicate which sites are equivalent e.g., [0 1 2 2 2] where site 0, 1, 2 indicate sites that are independent from each other
seq_cohps (-) – list of cohps
seq_coord_ions (-) – list of co-ordination environment strings for each cation
seq_equivalent_sites (-) – seq of inequivalent sites
seq_ineq_ions (-) – seq of inequivalent cations/sites in the structure
seq_infos_bonds (-) – information on cation anion bonds (lists of pymatgen.io.lobster.lobsterenv.ICOHPNeighborsInfo)
spg (-) – space group information
structure (-) – Structure object
- setup_env()[source]#
Set up the light structure environments based on COHPs using this method.
- Returns:
None
- get_information_all_bonds(summed_spins=True)[source]#
Gather all information on the bonds within the compound with this method.
- Returns:
None
- Parameters:
summed_spins (bool)
- get_site_bond_resolved_labels()[source]#
Return relevant bond labels for each symmetrically independent site.
- Returns:
dict with bond labels for each site, e.g. {‘Na1: Na-Cl’: [‘21’, ‘23’, ‘24’, ‘27’, ‘28’, ‘30’]}
- get_site_orbital_resolved_labels()[source]#
Return relevant orbitals and bond labels for each symmetrically independent site.
- Returns:
dict with bond labels for each site for relevant orbitals, e.g. {‘Na1: Na-Cl’: {‘3p-3s’: {‘bond_labels’: [‘21’, ‘23’, ‘24’, ‘27’, ‘28’, ‘30’], ‘relevant_sub_orbitals’: [‘3py-3s’, ‘3pz-3s’, ‘3px-3s’]}}
- set_condensed_bonding_analysis()[source]#
Condense the bonding analysis into a summary dictionary.
- Returns:
None
- set_summary_dicts()[source]#
Set summary dict that can be used for correlations.
bond_dict that includes information on each bond
“has_antbd” tells if there are antbonding states “ICOHP_mean” shows the mean of all ICOHPs in EV
{‘Yb-Sb’: { ‘has_antbdg’: False, ‘ICOHP_mean’: -1.7448}, ‘Mn-Sb’: { ‘has_antbdg’: True, ‘ICOHP_mean’: -1.525}}
a cation dict that includes all different coordination environments and counts for them {‘Na’: {‘T:4’: 4, ‘A:2’: 4}, ‘Si’: {‘T:6’: 4, ‘PP:6’: 4}}
- Returns:
None
- static get_lobster_calc_quality_summary(path_to_poscar=None, path_to_lobsterout=None, path_to_lobsterin=None, path_to_potcar=None, potcar_symbols=None, path_to_charge=None, path_to_bandoverlaps=None, path_to_doscar=None, path_to_vasprun=None, structure_obj=None, lobsterin_obj=None, lobsterout_obj=None, charge_obj=None, bandoverlaps_obj=None, lobster_completedos_obj=None, vasprun_obj=None, dos_comparison=False, e_range=[-5, 0], n_bins=None, bva_comp=False)[source]#
Analyze LOBSTER calculation quality.
- Parameters:
path_to_poscar (str | Path | None) – path to structure file (e.g., CONTCAR (preferred), POSCAR or POSCAR.lobster)
path_to_lobsterout (str | Path | None) – path to lobsterout file
path_to_lobsterin (str | Path | None) – path to lobsterin file
path_to_potcar (str | Path | None) – path to VASP potcar file
potcar_symbols (list | None) – list of potcar symbols from potcar file (can be used if no potcar available)
path_to_charge (str | Path | None) – path to CHARGE.lobster file
path_to_bandoverlaps (str | Path | None) – path to bandOverlaps.lobster file
path_to_doscar (str | Path | None) – path to DOSCAR.lobster or DOSCAR.LSO.lobster file
path_to_vasprun (str | Path | None) – path to vasprun.xml file
structure_obj (Structure | None) – pymatgen pymatgen.core.structure.Structure object
lobsterin_obj (Lobsterin | None) – pymatgen.lobster.io.Lobsterin object
lobsterout_obj (Lobsterout | None) – pymatgen lobster.io.Lobsterout object
charge_obj (Charge | None) – pymatgen lobster.io.Charge object
bandoverlaps_obj (Bandoverlaps | None) – pymatgen lobster.io.BandOverlaps object
lobster_completedos_obj (LobsterCompleteDos | None) – pymatgen.electronic_structure.dos.LobsterCompleteDos object
vasprun_obj (Vasprun | None) – pymatgen vasp.io.Vasprun object
dos_comparison (bool) – will compare DOS from VASP and LOBSTER and return tanimoto index
e_range (list) – energy range for DOS comparisons
n_bins (int | None) – number of bins to discretize DOS for comparisons
bva_comp (bool) – Compares LOBSTER charge signs with Bond valence charge signs
- Returns:
A dict of summary of LOBSTER calculation quality by analyzing basis set used, charge spilling from lobsterout/ PDOS comparisons of VASP and LOBSTER / BVA charge comparisons
- Return type:
dict