pymatgen.io.lobster.outputs module

Module for reading Lobster output files. For more information on LOBSTER see www.cohp.de.

class Bandoverlaps(filename: str = 'bandOverlaps.lobster')[source]

Bases: object

Class to read in bandOverlaps.lobster files. These files are not created during every Lobster run. .. attribute: bandoverlapsdict is a dict of the following form:

{spin:{“kpoint as string”: {“maxDeviation”: float that describes the max deviation, “matrix”: 2D array of the size number of bands times number of bands including the overlap matrices with } }}

Parameters

filename – filename of the “bandOverlaps.lobster” file

has_good_quality_check_occupied_bands(number_occ_bands_spin_up: int, number_occ_bands_spin_down: Optional[int] = None, spin_polarized: bool = False, limit_deviation: float = 0.1) → bool[source]

will check if the deviation from the ideal bandoverlap of all occupied bands is smaller or equal to limit_deviation

Args: number_occ_bands_spin_up (int): number of occupied bands of spin up number_occ_bands_spin_down (int): number of occupied bands of spin down spin_polarized (bool): If True, then it was a spin polarized calculation limit_deviation (float): limit of the maxDeviation :returns: Boolean that will give you information about the quality of the projection

has_good_quality_maxDeviation(limit_maxDeviation: float = 0.1) → bool[source]

will check if the maxDeviation from the ideal bandoverlap is smaller or equal to limit_maxDeviation :param limit_maxDeviation: limit of the maxDeviation

Returns

Boolean that will give you information about the quality of the projection

class Charge(filename: str = 'CHARGE.lobster')[source]

Bases: object

Class to read CHARGE files generated by LOBSTER

Parameters

filename – filename for the CHARGE file, typically “CHARGE.lobster”

get_structure_with_charges(structure_filename)[source]

get a Structure with Mulliken and Loewdin charges as site properties :param structure_filename: filename of POSCAR

Returns

Structure Object with Mulliken and Loewdin charges as site properties

class Cohpcar(are_coops: bool = False, filename: str = None)[source]

Bases: object

Class to read COHPCAR/COOPCAR files generated by LOBSTER.

Parameters
  • are_coops – Determines if the file is a list of COHPs or COOPs. Default is False for COHPs.

  • filename – Name of the COHPCAR file. If it is None, the default file name will be chosen, depending on the value of are_coops.

class Doscar(doscar: str = 'DOSCAR.lobster', structure_file: str = 'POSCAR', dftprogram: str = 'Vasp')[source]

Bases: object

Class to deal with Lobster’s projected DOS and local projected DOS. The beforehand quantum-chemical calculation was performed with VASP

completedos[source]

LobsterCompleteDos Object

pdos[source]
List of Dict including numpy arrays with pdos. Access as pdos[atomindex]['orbitalstring']['Spin.up/Spin.down']
tdos[source]
Dos Object of the total density of states
energies[source]
numpy array of the energies at which the DOS was calculated (in eV, relative to Efermi)
tdensities[source]
tdensities[Spin.up]: numpy array of the total density of states for the Spin.up contribution at each of the
energies
tdensities[Spin.down]: numpy array of the total density of states for the Spin.down contribution at each of the
energies

if is_spin_polarized=False: tdensities[Spin.up]: numpy array of the total density of states

itdensities:
itdensities[Spin.up]: numpy array of the total density of states for the Spin.up contribution at each of the
energies[source]
itdensities[Spin.down]: numpy array of the total density of states for the Spin.down contribution at each of the
energies

if is_spin_polarized=False: itdensities[Spin.up]: numpy array of the total density of states

is_spin_polarized[source]
Boolean. Tells if the system is spin polarized
Parameters
  • doscar – DOSCAR filename, typically “DOSCAR.lobster”

  • structure_file – for vasp, this is typically “POSCAR”

  • dftprogram – so far only “vasp” is implemented

property completedos[source]

CompleteDos

Type

return

property energies[source]

Energies

Type

return

property is_spin_polarized[source]

Whether run is spin polarized.

Type

return

property itdensities[source]

integrated total densities as a np.array

Type

return

property pdos[source]

Projected DOS

Type

return

property tdensities[source]

total densities as a np.array

Type

return

property tdos[source]

Total DOS

Type

return

class Fatband(filenames='.', vasprun='vasprun.xml', Kpointsfile='KPOINTS')[source]

Bases: object

Reads in FATBAND_x_y.lobster files

Parameters
  • filenames (list or string) – can be a list of file names or a path to a folder folder from which all “FATBAND_*” files will be read

  • vasprun – corresponding vasprun file

  • Kpointsfile – KPOINTS file for bandstructure calculation, typically “KPOINTS”

get_bandstructure()[source]

returns a LobsterBandStructureSymmLine object which can be plotted with a normal BSPlotter

class Grosspop(filename: str = 'GROSSPOP.lobster')[source]

Bases: object

Class to read in GROSSPOP.lobster files.

Parameters

filename – filename of the “GROSSPOP.lobster” file

get_structure_with_total_grosspop(structure_filename: str)pymatgen.core.structure.Structure[source]

get a Structure with Mulliken and Loewdin total grosspopulations as site properties :param structure_filename: filename of POSCAR :type structure_filename: str

Returns

Structure Object with Mulliken and Loewdin total grosspopulations as site properties

class Icohplist(are_coops: bool = False, filename: str = None)[source]

Bases: object

Class to read ICOHPLIST/ICOOPLIST files generated by LOBSTER.

Parameters
  • are_coops – Determines if the file is a list of ICOHPs or ICOOPs. Defaults to False for ICOHPs.

  • filename – Name of the ICOHPLIST file. If it is None, the default file name will be chosen, depending on the value of are_coops.

property icohpcollection[source]

IcohpCollection object

Type

Returns

property icohplist[source]

icohplist compatible with older version of this class

Type

Returns

class Lobsterout(filename='lobsterout')[source]

Bases: object

Class to read in the lobsterout and evaluate the spilling, save the basis, save warnings, save infos

Parameters

filename – filename of lobsterout

get_doc()[source]

Returns: LobsterDict with all the information stored in lobsterout