pyiron.dft.waves.electronic module¶

class pyiron.dft.waves.electronic.Band[source]

Bases: object

All data related to a single band for every k-point is stored in this module

property eigenvalue

The eigenvalue of a given band at a given k-point

Type

float

property occupancy

The occupancy of a given band at a given k-point

Type

float

property resolved_dos_matrix

2D matrix with n rows and m columns; n being the unmber of atoms and m being the number of orbitals

Type

numpy.ndarray instance

class pyiron.dft.waves.electronic.ElectronicStructure[source]

Bases: object

This is a generic module to store electronic structure data in a clean way. Kpoint and Band classes are used to store information related to kpoints and bands respectively. Every spin configuration has a set of k-points and every k-point has a set of bands associated with it. This is loosely adapted from the pymatgen electronic_structure modules. Many of the functions have been substantially modified for pyiron

add_kpoint(value, weight)[source]

Appends a Kpoint() instance to the kpoints attribute

Parameters
• value (list/numpy.ndarray) – Value of the k-point in cartesian reciprocal coordinates

• weight (float) – The weight of the particular k-point

property cbm

The Kohn-Sham CBM (value only) (eV)

Type

float

property dos_densities

A (SxN) vector containing the density of states for every spin configuration with S spin configurations and N grid points

Type

numpy.ndarray

property dos_energies

A (1xN) vector containing the energies with N grid points

Type

numpy.ndarray

property dos_idensities

A (SxN) vector containing the density of states for every spin configuration with S spin configurations and N grid points

Type

numpy.ndarray

property efermi

The Fermi-level of the system (eV). Please note that in the case of DFT this level is the Kohn-Sham Fermi level computed by the DFT code.

Type

float

property eg

The band gap (eV)

Type

float

property eigenvalue_matrix

A getter function to return the eigenvalue_matrix. The eigenvalue for a given kpoint index i and band index j is given by eigenvalue_matrix[i][j]

Type

numpy.ndarray

property eigenvalues

Eigenvalues of the bands

Type

numpy.ndarray

from_hdf(hdf, group_name='electronic_structure')[source]

Retrieve the object from the hdf5 file

Parameters
• hdf – Path to the hdf5 file/group in the file

• group_name – Name of the group under which the attributes are stored

from_hdf_old(hdf, group_name='electronic_structure')[source]

Retrieve the object from the hdf5 file

Parameters
• hdf – Path to the hdf5 file/group in the file

• group_name – Name of the group under which the attributes are stored

generate_from_matrices()[source]

Generate the Kpoints and Bands from the kpoint lists and sometimes grand_dos_matrix

get_band_gap(resolution=1e-06)[source]

Gets the band gap of the system

Parameters

resolution (float) – An occupancy above this value is considered occupied

Returns

“band gap” (float): The band gap (eV)

”vbm”: The dictionary associated with the VBM “cbm”: The dictionary associated with the CBM

Return type

dict

get_cbm(resolution=1e-06)[source]

Gets the conduction band minimum (CBM) of the system

Parameters

resolution (float) – An occupancy above this value is considered occupied

Returns

“value” (float): Absolute energy value of the CBM (eV)

”kpoint”: The Kpoint instance associated with the CBM “band”: The Band instance associated with the CBM

Return type

dict

get_dos(n_bins=100)[source]

Gives a pyiron.objects.waves.dos.Dos instance

Parameters

n_bins (int) – Number of histogram bins for the dos

Returns

Dos instance

Return type

pyiron.objects.waves.dos.Dos

get_resolved_dos(spin_indices=0, atom_indices=None, orbital_indices=None)[source]

Get resolved dos based on the specified spin, atom and orbital indices

Parameters
• spin_indices (int/list/numpy.ndarray) – spin indices

• atom_indices (int/list/numpy.ndarray) – stom indices

• orbital_indices (int/list/numpy.ndarray) – orbital indices (based on orbital_dict)

Returns

Required resolved dos

Return type

rdos (numpy.ndarray)

get_spin_resolved_dos(spin_indices=0)[source]

Gets the spin resolved DOS

Parameters

spin_indices (int) – The index of the spin for which the DOS is required

Returns

Spin resolved dos (numpy.ndarray instance)

get_vbm(resolution=1e-06)[source]

Gets the valence band maximum (VBM) of the system

Parameters

resolution (float) – An occupancy below this value is considered unoccupied

Returns

“value” (float): Absolute energy value of the VBM (eV) “kpoint”: The Kpoint instance associated with the VBM “band”: The Band instance associated with the VBM

Return type

dict

property grand_dos_matrix

Getter for the 5 dimensional grand_dos_matrix which gives the contribution of every spin, kpoint, band, atom and orbital to the total DOS. For example the dos contribution with spin index s, kpoint k, band b, atom a and orbital o is:

grand_dos_matrix[s, k, b, a, o]

The grand sum of this matrix would equal 1.0. The spatial, spin, and orbital resolved DOS can be computed using this matrix

Returns

numpy.ndarray (5 dimensional)

property is_metal

Tells if the given system is metallic or not. The Fermi level crosses bands in the cas of metals but is present in the band gap in the case of semi-conductors.

Type

bool

property kpoint_list

The list of kpoints in cartesian coordinates

Type

list

property kpoint_weights

The weights of the kpoints of the electronic structure in cartesian coordinates

Type

list

property occupancies

Occupancies of the bands

Type

numpy.ndarray

property occupancy_matrix

A getter function to return the occupancy_matrix. The occupancy for a given kpoint index i and band index j is given by occupancy_matrix[i][j]

Type

numpy.ndarray

property orbital_dict

A dictionary of the ordering of the orbitals

Examples

>>> self.orbital_dict[0]
's'

Type

dict

plot_fermi_dirac()[source]

Plots the obtained eigenvalue vs occupation plot

property resolved_densities

A (SxAxOxN) vector containing the density of states for every spin configuration with S spin configurations, A atoms, O orbitals and N grid points. The labels of the orbitals are found on the orbital_dict

Type

numpy.ndarray

property structure

The structure associated with the electronic structure object

Type

atomistics.structure.atoms.Atoms

to_hdf(hdf, group_name='electronic_structure')[source]

Store the object to hdf5 file

Parameters
• hdf – Path to the hdf5 file/group in the file

• group_name – Name of the group under which the attributes are o be stored

to_hdf_old(hdf, group_name='electronic_structure')[source]

Store the object to hdf5 file

Parameters
• hdf – Path to the hdf5 file/group in the file

• group_name – Name of the group under which the attributes are o be stored

property vbm

The Kohn-Sham VBM (value only) (eV)

Type

float

class pyiron.dft.waves.electronic.Kpoint[source]

Bases: object

All data related to a single k-point is stored in this module

bands

List of pyiron.objects.waves.settings.Band object

Type

list

.. value

Value of the k-point

Type

float

.. weight

Weight of the k-point used in integration of quantities

Type

float

.. eig_occ_matrix

A Nx2 matrix with the first column with eigenvalues and the second with occupancies of every band. N being the number of bands assoiated with the k-point

Type

numpy.ndarray

add_band(eigenvalue, occupancy)[source]

property eig_occ_matrix
property value
property weight