29 subroutine h_psi(kvec,psi, hpsi)
37 real(8),
intent(in) :: kvec(3)
38 complex(8),
intent(in) :: psi(g_wf%npw,nbnd)
39 complex(8),
intent(out) :: hpsi(g_wf%npw,nbnd)
43 complex(8) :: psir(g_rh%nr)
48 call fft_g2r_w(psi(1:g_wf%npw,ibnd), psir)
49 psir(1:g_rh%nr) = psir(1:g_rh%nr) *
vks(1:g_rh%nr)
50 call fft_r2g_w(psir, hpsi(1:g_wf%npw,ibnd))
56 kgv(1:3) = kvec(1:3) + matmul(
bvec(1:3,1:3), dble(g_wf%mill(1:3,g_wf%map(ipw))))
57 hpsi(ipw,1:nbnd) = hpsi(ipw,1:nbnd) &
58 & + 0.5d0 * dot_product(kgv,kgv) * psi(ipw,1:nbnd)