PAOFLOW.hamiltonian.do_build_pao_hamiltonian#

Attributes#

Functions#

build_Hks(data_controller)

Construct the PAO Hamiltonian \(H(\mathbf{k})\) from projected DFT eigenstates.

do_build_pao_hamiltonian(data_controller)

Build the PAO Hamiltonian and optionally handle symmetry expansion and non-orthogonality.

do_Hks_to_HRs(data_controller)

Transform the k-space PAO Hamiltonian to real space via inverse FFT.

Module Contents#

PAOFLOW.hamiltonian.do_build_pao_hamiltonian.comm[source]#
PAOFLOW.hamiltonian.do_build_pao_hamiltonian.rank[source]#
PAOFLOW.hamiltonian.do_build_pao_hamiltonian.size[source]#
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_arrays and data_attributes. Required arrays: my_eigsmat (shape (nbnds, nkpnts, nspin)). The projections are read through local_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); None on 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 bnd lowest 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 / size share 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_arrays and data_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_arrays and data_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})\). When expand_wedge is True, the symmetry-reduced wedge is expanded to the full Brillouin zone via open_grid_wrapper(). When acbn0 is True, the non-orthogonal correction \(H \to S^{1/2} H S^{1/2}\) is applied via do_non_ortho() on rank 0 and the result is written to disk with DataController.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_arrays and data_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 when Sks is 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 of HRs.