cp2kdata.pdos.pdos module#

class cp2kdata.pdos.pdos.Cp2kPdos(file_name, parse_file_name=True)[source]#

Bases: object

get_dos(sigma: float = 1, dos_type: str = 'total', usecols: Optional[Tuple[int]] = None)[source]#

Get the density of states (DOS) from the CP2K DOS file.

Parameters: - sigma (float): The standard deviation for Gaussian smoothing of the DOS. - dos_type (str): The type of DOS to retrieve. Can be “total”, “s”, “p”, “d”, or “f”. - usecols (Tuple[int]): The columns to use for custom DOS. Only applicable if dos_type is “custom”.

Returns: - smth_dos (np.ndarray): The smoothed DOS. - ener (np.ndarray): The energy values corresponding to the DOS.

get_homo_ener()[source]#

Get the energy of the highest occupied molecular orbital (HOMO).

Returns:

The energy of the HOMO.

Return type:

float

get_lumo_ener()[source]#

Get the energy of the lowest unoccupied molecular orbital (LUMO).

Returns:

The energy of the LUMO.

Return type:

lumo_ener (float)

get_raw_dos(dos_type='total', steplen=0.1, usecols=None)[source]#
property occupation#
read_dos_element()[source]#

Reads the element from the first line of the file.

Returns:

The element extracted from the first line of the file.

Return type:

str

read_dos_energies()[source]#

Reads the DOS energies from the file and converts them to electron volts (eV).

Returns:

An array of DOS energies in eV.

Return type:

numpy.ndarray

read_dos_fermi()[source]#

Reads the Fermi energy from the file.

Returns:

The Fermi energy in eV.

Return type:

float

cp2kdata.pdos.pdos.get_true_element(pdosobj, replace_dict=None)[source]#
cp2kdata.pdos.pdos.pdos_name_parser(filename)[source]#
cp2kdata.pdos.pdos.plot_single_pdos(pdosobj, ax, true_element, spin=1, raw=True)[source]#
cp2kdata.pdos.pdos.quick_plot_rks(pdos_dir)[source]#
cp2kdata.pdos.pdos.quick_plot_uks(pdos_dir, style=0, replace_dict=None)[source]#