PAOFLOW.spectrum.do_bands#
Attributes#
Functions#
|
Compute band eigenvalues and eigenvectors scattered over MPI pools. |
|
Evaluate the Bloch Hamiltonian \(H(\mathbf{k})\) on a set of k-points. |
|
Compute the electronic band structure along a k-path via Fourier interpolation. |
Module Contents#
- PAOFLOW.spectrum.do_bands.bands_calc(data_controller)[source]#
Compute band eigenvalues and eigenvectors scattered over MPI pools.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)),kq(shape(3, nkpi)),R(shape(nrtot, 3)). Required attribute:npool.- Returns:
E_kp_aux (np.ndarray, shape
(nkpi_local, nawf, nspin)) – Eigenvalues on the local k-point subset. Complex ifkqis complex (e.g. for complex band structures), float otherwise.v_kp_aux (np.ndarray, shape
(nkpi_local, nawf, nawf, nspin), complex) – Eigenvectors on the local k-point subset.
Notes
Each MPI rank operates on a local slice of the k-path obtained via
scatter_full(). Eigenvalues are computed withscipy.linalg.eigh(real k) orscipy.linalg.eig(complex k).
- PAOFLOW.spectrum.do_bands.band_loop_H(data_controller, kq_aux)[source]#
Evaluate the Bloch Hamiltonian \(H(\mathbf{k})\) on a set of k-points.
- Parameters:
data_controller (DataController) – Object providing
data_arrays. Required arrays:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)),R(shape(nrtot, 3)).kq_aux (np.ndarray, shape
(3, nksize)) – Local k-points (Cartesian, units of \(2\pi/a\)) for which \(H(\mathbf{k})\) is evaluated.
- Returns:
\(H(\mathbf{k})\) evaluated at each k-point in
kq_aux.- Return type:
np.ndarray, shape
(nawf, nawf, nksize, nspin), complex
Notes
Uses the Fourier sum
\[H(\mathbf{k}) = \sum_{\mathbf{R}} H(\mathbf{R})\, e^{2\pi i \mathbf{k} \cdot \mathbf{R}}\]implemented as a tensor contraction between the flattened
HRsand the phase factors \(e^{2\pi i \mathbf{k}\cdot\mathbf{R}}\).
- PAOFLOW.spectrum.do_bands.do_bands(data_controller)[source]#
Compute the electronic band structure along a k-path via Fourier interpolation.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)),b_vectors(shape(3, 3)). Required attributes:alat,npool. Eitheribravor a pre-loadedkqarray must be present.- Returns:
Adds or updates the following entries in
data_controller.data_arrays:E_k: np.ndarray, shape(nkpi, nawf, nspin)— band eigenvalues (in eV) along the requested k-path.v_k: np.ndarray, shape(nkpi, nawf, nawf, nspin), complex — corresponding eigenvectors.
- Return type:
None
Notes
The real-space grid
Ris built byget_R_grid_fft()if not already present, and the k-path is generated bykpnts_interpolation_mesh()whenibravis provided. k-vectors supplied in reduced crystal coordinates are rotated to Cartesian by multiplication withb_vectorsbefore the Fourier sum. Ifkqis complex (e.g. for complex band structures), eigenvalues are sorted in ascending order of the real part.