LobsterCalcQuality#

class lobsterpy.quality.analyze.LobsterCalcQuality(*, structure, lobsterin, lobsterout, potcar_symbols, charge=None, bandoverlaps=None, lobster_dos=None, vasp_dos=None)[source]#

Bases: object

Analyze and summarize LOBSTER calculation quality.

Parameters:
  • structure (Structure) – pymatgen Structure object

  • lobsterin (Lobsterin) – Lobsterin object

  • lobsterout (Lobsterout) – Lobsterout object

  • potcar_symbols (list[str]) – List of POTCAR symbols used in the calculation

  • charge (Charge | None) – Charge object (optional)

  • bandoverlaps (Bandoverlaps | None) – Bandoverlaps object (optional)

  • lobster_dos (LobsterCompleteDos | None) – LobsterCompleteDos object (optional)

  • vasp_dos (CompleteDos | None) – CompleteDos object from VASP (optional)

classmethod from_files(*, poscar, lobsterin, lobsterout, potcar=None, potcar_symbols=None, charge=None, bandoverlaps=None, doscar=None, vasprun=None)[source]#

Create LobsterCalcQuality instance from explicit file paths.

Parameters:
  • poscar (Path) – Path to CONTCAR/POSCAR file

  • lobsterin (Path) – Path to lobsterin file

  • lobsterout (Path) – Path to lobsterout file

  • potcar (Path | None) – Path to POTCAR file (optional if potcar_symbols or vasprun provided)

  • potcar_symbols (list[str] | None) – List of POTCAR symbols (optional if potcar or vasprun provided)

  • charge (Path | None) – Path to CHARGE.lobster file (optional)

  • bandoverlaps (Path | None) – Path to bandOverlaps.lobster file (optional)

  • doscar (Path | None) – Path to DOSCAR.lobster file (optional)

  • vasprun (Path | None) – Path to vasprun.xml file (optional)

Return type:

LobsterCalcQuality

classmethod from_directory(path_to_lobster_calc)[source]#

Create LobsterCalcQuality instance from a directory containing LOBSTER calculation files.

Parameters:

path_to_lobster_calc (Path | str) – Path to directory with LOBSTER calculation files

Return type:

LobsterCalcQuality

get_calculation_quality_summary(*, dos_comparison=False, bva_comp=False, e_range=[-5, 0], n_bins=None)[source]#

Get a summary of the LOBSTER calculation quality.

Parameters:
  • dos_comparison (bool) – Whether to include DOS comparison analysis (requires DOS data)

  • bva_comp (bool) – Whether to include bond valence analysis (requires CHARGE.l

  • e_range (list[int]) – Energy range for DOS comparison (default: [-5, 0] eV)

  • n_bins (int | None) – Number of bins for DOS comparison (default: None, uses maximum available bins in the specified energy range)

Returns:

Dictionary summarizing the calculation quality

Return type:

dict

static describe(quality_dict)[source]#

Generate a text description of the LOBSTER calculation quality.

Parameters:

quality_dict (dict) – python dictionary obtained from LobsterCalcQuality.get_calculation_quality_summary method

Returns:

list of strings describing the calculation quality

Return type:

list[str]

static print_description(text)[source]#

Print the calculation quality description to the screen.

Parameters:

text (list[str]) – list of strings obtained from LobsterCalcQuality.describe method