PAOFLOW.hamiltonian.do_build_pao_hamiltonian#
Attributes#
Functions#
|
Construct the PAO Hamiltonian \(H(\mathbf{k})\) from projected DFT eigenstates. |
|
Build the PAO Hamiltonian and optionally handle symmetry expansion and non-orthogonality. |
|
Transform the k-space PAO Hamiltonian to real space via inverse FFT. |
Module Contents#
- PAOFLOW.hamiltonian.do_build_pao_hamiltonian.build_Hks(data_controller)[source]#
Construct the PAO Hamiltonian \(H(\mathbf{k})\) from projected DFT eigenstates.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:my_eigsmat(shape(nbnds, nkpnts, nspin)). The projections are read throughlocal_projections(). Required attributes:bnd,nawf,nspin,nkpnts,npool,shift,shift_type.- Returns:
On rank 0, the PAO Hamiltonian in k-space with shape
(nawf, nawf, nkpnts, nspin);Noneon all other ranks.- Return type:
np.ndarray or None
Notes
The PAO Hamiltonian is built at each k-point and spin channel via
\[H(\mathbf{k}) = A_c \varepsilon_c A_c^\dagger + \eta \bigl(\mathbf{1} - A_c (A_c^\dagger A_c)^{-1} A_c^\dagger\bigr)\]where \(A_c\) contains the
bndlowest normalised eigenvectors of the DFT overlap matrix and \(\varepsilon_c\) the corresponding eigenvalues, following the shift schemes of Buongiorno Nardelli et al. PRB 2013 (shift_type=0) and PRB 2016 (shift_type=1), or no shift (shift_type=2). Hermiticity is enforced after each k-point.The k-point loop is distributed over MPI ranks, so each rank builds and stores only its own
nkpnts / sizeshare before the result is gathered on rank 0.
- PAOFLOW.hamiltonian.do_build_pao_hamiltonian.do_build_pao_hamiltonian(data_controller)[source]#
Build the PAO Hamiltonian and optionally handle symmetry expansion and non-orthogonality.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:U,my_eigsmat. Required attributes:bnd,nawf,nspin,nkpnts,shift,shift_type,expand_wedge,acbn0,nk1,nk2,nk3.- Returns:
Adds or updates the following entries in
data_controller.data_arraysanddata_controller.data_attributes:Hks: np.ndarray, shape(nawf, nawf, nk1, nk2, nk3, nspin), complex — the PAO Hamiltonian in k-space.
Updates attribute:
nkpnts = nk1 * nk2 * nk3.- Return type:
None
Notes
Calls
build_Hks()to construct \(H(\mathbf{k})\). Whenexpand_wedgeisTrue, the symmetry-reduced wedge is expanded to the full Brillouin zone viaopen_grid_wrapper(). Whenacbn0isTrue, the non-orthogonal correction \(H \to S^{1/2} H S^{1/2}\) is applied viado_non_ortho()on rank 0 and the result is written to disk withDataController.write_Hk_acbn0(); execution then exits.
- PAOFLOW.hamiltonian.do_build_pao_hamiltonian.do_Hks_to_HRs(data_controller)[source]#
Transform the k-space PAO Hamiltonian to real space via inverse FFT.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:Hks(shape(nawf, nawf, nk1, nk2, nk3, nspin)). Optional array:Sks(shape(nawf, nawf, nk1, nk2, nk3)) — read and transformed if present.- Returns:
Adds the following entries to
data_controller.data_arrays:HRs: np.ndarray, shape(nawf, nawf, nk1, nk2, nk3, nspin), complex — the real-space Hamiltonian, broadcast to all MPI ranks.SRs: np.ndarray, shape(nawf, nawf, nk1, nk2, nk3)— the real-space overlap matrix (only whenSksis available).
- Return type:
None
Notes
Only MPI rank 0 performs the inverse FFT. The result is broadcast via
DataController.broadcast_single_array()so that all ranks carry an identical copy ofHRs.