PAOFLOW.hamiltonian.do_double_grid#
Functions#
|
Interpolate the Hamiltonian onto a finer k-grid via zero-padding in real space. |
Module Contents#
- PAOFLOW.hamiltonian.do_double_grid.do_double_grid(data_controller)[source]#
Interpolate the Hamiltonian onto a finer k-grid via zero-padding in real space.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required array:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)). Required attributes:nawf,nk1,nk2,nk3,nspin,nfft1,nfft2,nfft3,npool.- Returns:
Adds or updates the following entries in
data_controller.data_arraysanddata_controller.data_attributes:Hksp: np.ndarray, shape(snawf, nfft1, nfft2, nfft3, nspin), complex — the k-space Hamiltonian on the extended, interpolated grid, distributed over MPI pools.
Updates attributes:
nk1 = nfft1,nk2 = nfft2,nk3 = nfft3,nkpnts = nfft1 * nfft2 * nfft3.- Return type:
None
Notes
Fourier interpolation is achieved by inserting zeros in the frequency domain before the inverse transform. Specifically, the real-space Hamiltonian \(H(\mathbf{R})\) (
HRs) is zero-padded from(nk1, nk2, nk3)to(nfft1, nfft2, nfft3)usingzero_pad(), which correctly preserves Hermitian symmetry (\(H(-\mathbf{R}) = H^\dagger(\mathbf{R})\)) for both even and odd grid sizes. A forward FFT then yields the interpolated \(H(\mathbf{k})\) on the dense grid.The reshaped
HRsarray (nawf**2rows) is scattered across MPI pools before processing; only rank 0 performs the initial reshape.