PAOFLOW.projection.do_ortho#
Functions#
|
Apply the orthogonalising similarity transformation to the Hamiltonian. |
|
Orthogonalise the PAO Hamiltonian and transform back to real space. |
Module Contents#
- PAOFLOW.projection.do_ortho.do_ortho(Hks, Sks)[source]#
Apply the orthogonalising similarity transformation to the Hamiltonian.
- Parameters:
Hks (np.ndarray, shape
(nawf, nawf, nkpnts, nspin), complex) – Non-orthogonal PAO Hamiltonian in k-space.Sks (np.ndarray, shape
(nawf, nawf, nkpnts), complex) – Overlap matrix \(S(\mathbf{k})\) in k-space.
- Returns:
Orthogonalised Hamiltonian \(\tilde{H} = S^{-1/2} H S^{-1/2}\).
- Return type:
np.ndarray, shape
(nawf, nawf, nkpnts, nspin), complex
Notes
The transformation is applied k-point by k-point:
\[\tilde{H}(\mathbf{k}) = S^{-1/2}(\mathbf{k})\, H(\mathbf{k})\, S^{-1/2}(\mathbf{k})\]where \(S^{-1/2}\) is the matrix inverse of the matrix square root of \(S\), computed via
scipy.linalg.sqrtm.
- PAOFLOW.projection.do_ortho.do_orthogonalize(data_controller)[source]#
Orthogonalise the PAO Hamiltonian and transform back to real space.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)),SRs(shape(nawf, nawf, nk1, nk2, nk3)). Required attributes:nkpnts,nawf,nk1,nk2,nk3,nspin,use_cuda.- Returns:
Modifies
data_controller.data_arraysanddata_controller.data_attributesin place:HRs: np.ndarray — replaced with the orthogonalised real-space Hamiltonian, broadcast to all MPI ranks.Hks: np.ndarray, shape(nawf, nawf, nk1, nk2, nk3, nspin)— orthogonalised k-space Hamiltonian (intermediate; may be removed by subsequent steps).Sks: np.ndarray, shape(nawf, nawf, nk1, nk2, nk3)— overlap matrix in k-space (intermediate).
Deletes
SRs. Sets attributeacbn0 = False.- Return type:
None
Notes
The workflow is:
HRs,SRs→ FFT →Hks,Sks→do_ortho()→ orthogonalHks→ inverse FFT →HRs. When CUDA is available the FFTs are delegated tocuda_fftn()andcuda_ifftn().