PAOFLOW.hamiltonian.do_d2Hd2k#
Attributes#
Functions#
|
Compute the six unique second-order derivatives of the k-space Hamiltonian. |
Module Contents#
- PAOFLOW.hamiltonian.do_d2Hd2k.do_d2Hd2k_ij(Hksp, dHksp, Dnm, Rfft, alat, npool, v_kp, bnd, degen)[source]#
Compute the six unique second-order derivatives of the k-space Hamiltonian.
- Parameters:
Hksp (np.ndarray, shape
(snawf, nk1, nk2, nk3, nspin)) – Distributed real-space Hamiltonian in the FFT representation, where each element already contains the factor \(i \cdot a_{\text{lat}}\) (i.e.HR * 1j * alat).dHksp (np.ndarray, shape
(nkpnts, 3, nawf, nawf, nspin)) – Gradient of the k-space Hamiltonian. Itsicomponent at each k-point is passed toperturb_split()as the perturbation that defines the rotated basis (see Notes).Dnm (np.ndarray, shape
(snawf, 3)) – Cartesian factors, one per distributed real-space elementn, entering the three additional terms of the second derivative (see Notes).Rfft (np.ndarray, shape
(nk1, nk2, nk3, 3)) – Real-space grid vectors used as multiplication factors in FFT-based gradient computation.alat (float) – Lattice constant in Bohr radii, used to scale the real-space Hamiltonian prior to the FFT.
npool (int) – Number of MPI pools used for the
gather_scatter()redistribution.v_kp (np.ndarray, shape
(nkpnts, nawf, bnd, nspin)) – Bloch eigenvectors (columns are eigenstates) at each k-point, distributed over pools.bnd (int) – Number of bands for which the curvature is computed.
degen (list) – Nested list of degenerate subspace indices, one entry per spin channel and k-point, as produced by the eigenvalue solver.
- Returns:
M_ij (np.ndarray, shape
(6, nkpnts, bnd, nspin)) – Diagonal matrix elements \(\langle n | d^2H / dk_i dk_j | n \rangle\) in the Bloch eigenstate basis for the six uniqueijpairsxx, yy, zz, xy, xz, yz.vel_degen (list) – Nested list of shape
[6][nspin][nkpnts]holding the degenerate subspaces of the band velocity alongi, obtained by applyingget_degeneracies()to the diagonal ofdH/dk_iin the rotated basis. Each entry is a list of index groups, one group per degenerate subspace.degen_M (list) – Nested list of shape
[6][nspin][nkpnts]holding, for each subspace listed invel_degen, the corresponding diagonal block of \(d^2H / dk_i dk_j\) in the rotated basis, i.e. annp.ndarrayof shape(ul - ll, ul - ll).dvec_list (list) – Nested list of shape
[6][nspin][nkpnts]containing the modified eigenvector arrays after degenerate-subspace diagonalisation (used bydo_band_curvature()to compute the perturbative correction). Each element is either an empty array or annp.ndarrayof shape(nawf, nawf).
Notes
For each of the six unique Cartesian index pairs \((i, j)\), the second derivative is obtained via the FFT convolution
\[d^2 H(\mathbf{k}) / dk_i dk_j = \mathcal{F}\left[ R_i R_j \cdot H(\mathbf{R}) \cdot i \cdot a_{\text{lat}} \right] + D_i D_j \cdot \mathcal{F}\left[ H(\mathbf{R}) \cdot i / a_{\text{lat}} \right] + D_i \cdot \mathcal{F}\left[ R_j \cdot H(\mathbf{R}) \cdot i \right] + D_j \cdot \mathcal{F}\left[ R_i \cdot H(\mathbf{R}) \cdot i \right]\]where \(R_i\) is the i-th Cartesian component of the real-space lattice vector grid
Rfftand \(D_i\) isDnm[:, i]. The four terms are the expansion of \(\mathcal{F}[(a_{\text{lat}} R_i + D_i)(a_{\text{lat}} R_j + D_j) \cdot H(\mathbf{R}) \cdot i / a_{\text{lat}}]\). The result is then projected onto the Bloch eigenstate basis usingperturb_split()to correctly handle degenerate bands. The basis is built from the first argument ofperturb_split(), which isdH/dk_i, so degenerate bands are resolved by the velocity alongirather than by the second derivative itself; that rotated velocity is reused to buildvel_degenanddegen_M.