vaspparser.dft.waves.electronic.ElectronicStructure#
- class vaspparser.dft.waves.electronic.ElectronicStructure[source]#
Bases:
objectThis 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
Methods
__init__()add_kpoint(value, weight)Appends a Kpoint() instance to the kpoints attribute
Generate the Kpoints and Bands from the kpoint lists and sometimes grand_dos_matrix
get_band_gap([resolution])Gets the band gap of the system for each spin value
get_cbm([resolution])Gets the conduction band minimum (CBM) of the system for each spin value
get_dos([n_bins])Gives a pyiron_atomistics.objects.waves.dos.Dos instance
get_resolved_dos([spin_indices, ...])Get resolved dos based on the specified spin, atom and orbital indices
get_spin_resolved_dos([spin_indices])Gets the spin resolved DOS
get_vbm([resolution])Gets the valence band maximum (VBM) of the system for each spin value
Plots the obtained eigenvalue vs occupation plot
to_dict()Serialize the electronic structure to a dictionary.
Attributes
The Kohn-Sham conduction band minimum for each spin channel
A (SxN) vector containing the density of states for every spin configuration with S spin configurations and N grid points
A (1xN) vector containing the energies with N grid points
A (SxN) vector containing the density of states for every spin configuration with S spin configurations and N grid points
The Fermi-level of the system (eV).
The band gap for each spin channel
A getter function to return the eigenvalue_matrix.
Returns the eigenvalues for each spin value
Getter for the 5 dimensional grand_dos_matrix which gives the contribution of every spin, kpoint, band, atom and orbital to the total DOS.
Tells if the given system is metallic or not in each spin channel (up and down respectively).
The list of kpoints in cartesian coordinates
The weights of the kpoints of the electronic structure in cartesian coordinates
Returns the occupancies for each spin value
A getter function to return the occupancy_matrix.
A dictionary of the ordering of the orbitals
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 structure associated with the electronic structure object
The Kohn-Sham valence band maximum for each spin channel
- 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 conduction band minimum for each spin channel
- Returns:
list of conduction band minimum values for each spin channel
- Return type:
list
- 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 for each spin channel
- Returns:
list of band gap values for each spin channel
- Return type:
list
- 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#
Returns the eigenvalues for each spin value
numpy.ndarray: Eigenvalues of the bands
- 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 for each spin value
- 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 for each spin value
- 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_atomistics.objects.waves.dos.Dos instance
- Parameters:
n_bins (int) – Number of histogram bins for the dos
- Returns:
Dos instance
- Return type:
pyiron_atomistics.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 for each spin value
- 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 in each spin channel (up and down respectively). The Fermi level crosses bands in the cas of metals but is present in the band gap in the case of semi-conductors.
- Returns:
List of boolean values for each spin channel
- Return type:
list
- 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#
Returns the occupancies for each spin value
numpy.ndarray: Occupancies of the bands
- 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
- 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_dict() dict[source]#
Serialize the electronic structure to a dictionary.
- Returns:
- Dictionary with keys
"TYPE","k_points","k_weights", "eig_matrix","occ_matrix", optionally"efermi","structure", and a"dos"sub-dictionary containing total and resolved DOS data.
- Dictionary with keys
- Return type:
dict
- property vbm#
The Kohn-Sham valence band maximum for each spin channel
- Returns:
list of valence band maximum values for each spin channel
- Return type:
list