pymatgen.io.lobster module

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

Bases: object

Class to read CHARGE files generated by LOBSTER :param 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=False, filename=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='DOSCAR.lobster', vasprun='vasprun.xml', dftprogram='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

Parameters
  • doscar – DOSCAR filename, typically “DOSCAR.lobster”

  • vasprun – vasprun filename, typically “vasprun.xml”

  • dftprogram – so far only “vasp” is implemented

completedos

LobsterCompleteDos Object

pdos
List of Dict including numpy arrays with pdos. Access as pdos[atomindex]['orbitalstring']['Spin.up/Spin.down']
tdos
Dos Object of the total density of states
energies
numpy array of the energies at which the DOS was calculated (in eV, relative to Efermi)
tdensities
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

is_spin_polarized
Boolean. Tells if the system is spin polarized
completedos
energies
is_spin_polarized
pdos
tdensities
tdos
class Fatband(filenames='.', vasprun='vasprun.xml', Kpointsfile='KPOINTS')[source]

Bases: object

reads in FATBAND_x_y.lobster files :param filenames: can be a list of file names or a path to a folder folder from which all “FATBAND_*” files will be read :type filenames: list or string :param vasprun: corresponding vasprun file :param Kpointsfile: KPOINTS file for bandstructure calculation, typically “KPOINTS” :param .. attribute: efermi :param efermi that was read in from vasprun.xml: :param .. attribute: eigenvals :param {Spin.up: [][],Spin.down:[][]}, the first index of the array

[][] refers to the band and the second to the index of the kpoint. The kpoints are ordered according to the order of the kpoints array. If the band structure is not spin polarized, we only store one data set under Spin.up.

Parameters
  • attribute (.) – is_spinpolarized

  • that tells you whether this was a spin-polarized calculation (Boolean) –

  • attribute

    kpoints_array list of kpoint as numpy arrays, in frac_coords of the

    given lattice by default

  • attribute

    label_dict

    (dict) of {} this link a kpoint (in frac coords or

    cartesian coordinates depending on the coords).

    lattice object of reciprocal lattice as read in from vasprun.xml

    number of bands used in the calculation

    dict of orbital projections as {spin: array of dict}. The indices of the array are [band_index, kpoint_index]. The dict is then built the following way: {“string of element”: “string of orbital as read in from FATBAND file”} If the band structure is not spin polarized, we only store one data set under Spin.up.

    structure read in from vasprun.xml

get_bandstructure()[source]

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

class Icohplist(are_coops=False, filename=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.

icohpcollection

IcohpCollection object

Type

Returns

icohplist

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 :param filename: filename of lobsterout :param .. attribute: basis_functions

list of basis functions that were used in lobster run as strings

Parameters
  • attribute (.) – basis_type list of basis type that were used in lobster run as strings

  • attribute – chargespilling list of charge spilling (first entry: result for spin 1, second entry: result for spin 2 or not present)

  • attribute – dftprogram string representing the dft program used for the calculation of the wave function

  • attribute – elements list of strings of elements that were present in lobster calculation

  • attribute – has_CHARGE Boolean, indicates that CHARGE.lobster is present

  • attribute – has_COHPCAR Boolean, indicates that COHPCAR.lobster and ICOHPLIST.lobster are present

  • attribute – has_COOPCAR Boolean, indicates that COOPCAR.lobster and ICOOPLIST.lobster are present

  • attribute – has_DOSCAR Boolean, indicates that DOSCAR.lobster is present

  • attribute – has_Projection Boolean, indcates that projectionData.lobster is present

  • attribute – has_bandoverlaps Boolean, indcates that bandOverlaps.lobster is present

  • attribute – has_density_of_energies Boolean, indicates that DensityOfEnergy.lobster is present

  • attribute – has_fatbands Boolean, indicates that fatband calculation was performed

  • attribute – has_grosspopulation Boolean, indicates that GROSSPOP.lobster is present

  • attribute – info_lines string with additional infos on the run

  • attribute – info_orthonormalization string with infos on orthonormalization

  • attribute – is_restart_from_projection Boolean that indicates that calculation was restartet from existing projection file

  • attribute – lobster_version string that indicates Lobster version

  • attribute – number_of_spins Integer indicating the number of spins

  • attribute – number_of_threads integer that indicates how many threads were used

  • attribute – timing dict with infos on timing

  • attribute – totalspilling list of values indicating the total spilling for spin channel 1 (and spin channel 2)

  • attribute – warninglines string with all warnings

get_doc()[source]

Returns: LobsterDict with all the information stored in lobsterout