24 #include "./base/base_uses.f90"
33 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_linres_nmr_epr_common_utils'
58 TYPE(pw_pool_type),
POINTER :: pw_pool
59 TYPE(pw_c1d_gs_type),
INTENT(IN) :: rho_gspace
60 TYPE(pw_c1d_gs_type),
INTENT(INOUT) :: funcg_times_rho
61 INTEGER,
INTENT(IN) :: idir
62 REAL(
dp),
INTENT(IN) :: my_chi
64 INTEGER :: handle, ig, ng
66 TYPE(pw_c1d_gs_type) :: influence_fn
67 TYPE(pw_grid_type),
POINTER :: grid
68 CHARACTER(len=*),
PARAMETER :: routinen =
'mult_G_ov_G2_grid'
70 CALL timeset(routinen, handle)
72 CALL pw_pool%create_pw(influence_fn)
74 grid => influence_fn%pw_grid
75 DO ig = grid%first_gne0, grid%ngpts_cut_local
77 influence_fn%array(ig) =
gaussi*grid%g(idir, ig)/g2
79 IF (grid%have_g0) influence_fn%array(1) = 0.0_dp
81 CALL pw_transfer(rho_gspace, funcg_times_rho)
84 funcg_times_rho%array(1:ng) = funcg_times_rho%array(1:ng)*influence_fn%array(1:ng)
85 IF (grid%have_g0) funcg_times_rho%array(1) = my_chi
87 CALL pw_pool%give_back_pw(influence_fn)
Defines the basic variable types.
integer, parameter, public dp
Definition of mathematical constants and functions.
complex(kind=dp), parameter, public gaussi
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
given the response wavefunctions obtained by the application of the (rxp), p, and ((dk-dl)xp) operato...
subroutine, public mult_g_ov_g2_grid(pw_pool, rho_gspace, funcG_times_rho, idir, my_chi)
Given the current density on the PW grid in reciprcal space (obtained by FFT), calculate the integral...