Skip to content

Commit

Permalink
grid: Rename integrate_pgf_product_rspace to integrate_pgf_product
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Feb 7, 2020
1 parent fa7020f commit 4aa15e0
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 117 deletions.
22 changes: 11 additions & 11 deletions src/grid/grid_integrate.F
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MODULE grid_integrate
! *** Don't include this routines directly, use the interface to
! *** qs_integrate_potential
PUBLIC :: integrate_pgf_product_rspace
PUBLIC :: integrate_pgf_product
INTERFACE
SUBROUTINE call_to_xyz_to_vab(prefactor, coef_xyz, lp, la_max_local, lb_max_local, &
Expand Down Expand Up @@ -89,15 +89,15 @@ END SUBROUTINE call_to_xyz_to_vab
!> \param use_subpatch ...
!> \param subpatch_pattern ...
! **************************************************************************************************
SUBROUTINE integrate_pgf_product_rspace(la_max, zeta, la_min, &
lb_max, zetb, lb_min, &
ra, rab, rab2, rsgrid, cell, &
cube_info, hab, pab, o1, o2, &
eps_gvg_rspace, &
calculate_forces, hdab, hadb, force_a, force_b, &
compute_tau, map_consistent, &
collocate_rho0, rpgf0_s, use_virial, my_virial_a, &
my_virial_b, a_hdab, use_subpatch, subpatch_pattern)
SUBROUTINE integrate_pgf_product(la_max, zeta, la_min, &
lb_max, zetb, lb_min, &
ra, rab, rab2, rsgrid, cell, &
cube_info, hab, pab, o1, o2, &
eps_gvg_rspace, &
calculate_forces, hdab, hadb, force_a, force_b, &
compute_tau, map_consistent, &
collocate_rho0, rpgf0_s, use_virial, my_virial_a, &
my_virial_b, a_hdab, use_subpatch, subpatch_pattern)
INTEGER, INTENT(IN) :: la_max
REAL(KIND=dp), INTENT(IN) :: zeta
Expand Down Expand Up @@ -868,7 +868,7 @@ SUBROUTINE primitive_integrate(point, gridval)
END SUBROUTINE
END SUBROUTINE integrate_pgf_product_rspace
END SUBROUTINE integrate_pgf_product
! **************************************************************************************************
!> \brief given a set of matrix elements, perform the correct contraction to obtain the virial
Expand Down
14 changes: 7 additions & 7 deletions src/hirshfeld_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MODULE hirshfeld_methods
USE cp_units, ONLY: cp_unit_to_cp2k
USE cube_utils, ONLY: cube_info_type
USE grid_collocate, ONLY: collocate_pgf_product
USE grid_integrate, ONLY: integrate_pgf_product_rspace
USE grid_integrate, ONLY: integrate_pgf_product
USE grid_modify_pab_block, ONLY: FUNC_AB
USE hirshfeld_types, ONLY: get_hirshfeld_info,&
hirshfeld_type,&
Expand Down Expand Up @@ -605,12 +605,12 @@ SUBROUTINE hirshfeld_integration(qs_env, hirshfeld_env, rfun, fval, fderiv)
force_a(:) = 0.0_dp
force_b(:) = 0.0_dp
!
CALL integrate_pgf_product_rspace(0, alpha, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, pab=pab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=do_force, &
force_a=force_a, force_b=force_b, use_virial=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
CALL integrate_pgf_product(0, alpha, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, pab=pab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=do_force, &
force_a=force_a, force_b=force_b, use_virial=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
fval(atom_a) = fval(atom_a) + hab(1, 1)*dvol*coef
IF (do_force) THEN
fderiv(:, atom_a) = fderiv(:, atom_a) + force_a(:)*dvol
Expand Down
4 changes: 2 additions & 2 deletions src/mp2_eri_gpw.F
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MODULE mp2_eri_gpw
USE qs_collocate_density, ONLY: calculate_wavefunction
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
USE qs_integrate_potential, ONLY: integrate_pgf_product_rspace,&
USE qs_integrate_potential, ONLY: integrate_pgf_product,&
integrate_v_rspace
USE qs_kind_types, ONLY: get_qs_kind,&
qs_kind_type
Expand Down Expand Up @@ -309,7 +309,7 @@ SUBROUTINE mp2_eri_2c_integrate_gpw(qs_env, para_env_sub, dimen_RI, mo_coeff, my
na2 = ipgf*ncoset(la_max(iset))
igrid_level = gaussian_gridlevel(pw_env_sub%gridlevel_info, zeta(ipgf, iset))

CALL integrate_pgf_product_rspace( &
CALL integrate_pgf_product( &
la_max=la_max(iset), zeta=zeta(ipgf, iset)/2.0_dp, la_min=la_min(iset), &
lb_max=0, zetb=zeta(ipgf, iset)/2.0_dp, lb_min=0, &
ra=ra, rab=rab, rab2=rab2, &
Expand Down
62 changes: 31 additions & 31 deletions src/mp2_ri_grad.F
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ MODULE mp2_ri_grad
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
USE qs_force_types, ONLY: qs_force_type
USE qs_integrate_potential, ONLY: integrate_pgf_product_rspace,&
USE qs_integrate_potential, ONLY: integrate_pgf_product,&
integrate_v_rspace
USE qs_kind_types, ONLY: get_qs_kind,&
qs_kind_type
Expand Down Expand Up @@ -572,21 +572,21 @@ SUBROUTINE calc_ri_mp2_nonsep(qs_env, mp2_env, para_env, para_env_sub, cell, par
na2 = ipgf*ncoset(la_max(iset))
igrid_level = gaussian_gridlevel(pw_env_sub%gridlevel_info, zeta(ipgf, iset))

CALL integrate_pgf_product_rspace(la_max=la_max(iset), zeta=zeta(ipgf, iset)/2.0_dp, la_min=la_min(iset), &
lb_max=0, zetb=zeta(ipgf, iset)/2.0_dp, lb_min=0, &
ra=ra, rab=rab, rab2=rab2, &
rsgrid=rs_v(igrid_level)%rs_grid, &
cell=cell, &
cube_info=pw_env_sub%cube_info(igrid_level), &
hab=I_tmp2, &
pab=pab, &
o1=na1 - 1, &
o2=0, &
map_consistent=.TRUE., &
eps_gvg_rspace=dft_control%qs_control%eps_gvg_rspace, &
calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, &
use_virial=use_virial, my_virial_a=my_virial_a, my_virial_b=my_virial_b)
CALL integrate_pgf_product(la_max=la_max(iset), zeta=zeta(ipgf, iset)/2.0_dp, la_min=la_min(iset), &
lb_max=0, zetb=zeta(ipgf, iset)/2.0_dp, lb_min=0, &
ra=ra, rab=rab, rab2=rab2, &
rsgrid=rs_v(igrid_level)%rs_grid, &
cell=cell, &
cube_info=pw_env_sub%cube_info(igrid_level), &
hab=I_tmp2, &
pab=pab, &
o1=na1 - 1, &
o2=0, &
map_consistent=.TRUE., &
eps_gvg_rspace=dft_control%qs_control%eps_gvg_rspace, &
calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, &
use_virial=use_virial, my_virial_a=my_virial_a, my_virial_b=my_virial_b)

END DO

Expand Down Expand Up @@ -823,21 +823,21 @@ SUBROUTINE calc_ri_mp2_nonsep(qs_env, mp2_env, para_env, para_env_sub, cell, par
na2 = ipgf*ncoset(la_max(iset))
igrid_level = gaussian_gridlevel(pw_env_sub%gridlevel_info, zeta(ipgf, iset))

CALL integrate_pgf_product_rspace(la_max=la_max(iset), zeta=zeta(ipgf, iset)/2.0_dp, la_min=la_min(iset), &
lb_max=0, zetb=zeta(ipgf, iset)/2.0_dp, lb_min=0, &
ra=ra, rab=rab, rab2=rab2, &
rsgrid=rs_v(igrid_level)%rs_grid, &
cell=cell, &
cube_info=pw_env_sub%cube_info(igrid_level), &
hab=I_tmp2, &
pab=pab, &
o1=na1 - 1, &
o2=0, &
map_consistent=.TRUE., &
eps_gvg_rspace=dft_control%qs_control%eps_gvg_rspace, &
calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, &
use_virial=use_virial, my_virial_a=my_virial_a, my_virial_b=my_virial_b)
CALL integrate_pgf_product(la_max=la_max(iset), zeta=zeta(ipgf, iset)/2.0_dp, la_min=la_min(iset), &
lb_max=0, zetb=zeta(ipgf, iset)/2.0_dp, lb_min=0, &
ra=ra, rab=rab, rab2=rab2, &
rsgrid=rs_v(igrid_level)%rs_grid, &
cell=cell, &
cube_info=pw_env_sub%cube_info(igrid_level), &
hab=I_tmp2, &
pab=pab, &
o1=na1 - 1, &
o2=0, &
map_consistent=.TRUE., &
eps_gvg_rspace=dft_control%qs_control%eps_gvg_rspace, &
calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, &
use_virial=use_virial, my_virial_a=my_virial_a, my_virial_b=my_virial_b)
END DO
! CALL dgemm("T","N".0_dp,sphi_a(1,sgfa),SIZE(sphi_a,1),&
! I_tmp2(1,1),SIZE(I_tmp2,1),&
Expand Down
24 changes: 12 additions & 12 deletions src/qmmm_image_charge.F
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ MODULE qmmm_image_charge
USE qs_energy_types, ONLY: qs_energy_type
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
USE qs_integrate_potential, ONLY: integrate_pgf_product_rspace
USE qs_integrate_potential, ONLY: integrate_pgf_product
USE realspace_grid_types, ONLY: pw2rs,&
realspace_grid_desc_type,&
realspace_grid_type,&
Expand Down Expand Up @@ -425,11 +425,11 @@ SUBROUTINE integrate_potential_ga_rspace(potential, qmmm_env, qs_env, int_res, &

hab(1, 1) = 0.0_dp

CALL integrate_pgf_product_rspace(0, qmmm_env%image_charge_pot%eta, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
CALL integrate_pgf_product(0, qmmm_env%image_charge_pot%eta, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)

int_res(iatom) = hab(1, 1)

Expand Down Expand Up @@ -545,12 +545,12 @@ SUBROUTINE integrate_potential_devga_rspace(potential, coeff, forces, qmmm_env,
force_a(:) = 0.0_dp
force_b(:) = 0.0_dp

CALL integrate_pgf_product_rspace(0, qmmm_env%image_charge_pot%eta, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, pab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, use_subpatch=.TRUE., &
subpatch_pattern=0_int_8)
CALL integrate_pgf_product(0, qmmm_env%image_charge_pot%eta, 0, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, &
rs_v, cell, pw_env%cube_info(1), hab, pab, o1=0, o2=0, &
eps_gvg_rspace=eps_rho_rspace, calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, use_subpatch=.TRUE., &
subpatch_pattern=0_int_8)

force_a(:) = coeff(iatom)*force_a(:)
forces(:, iatom) = force_a(:)
Expand Down
4 changes: 2 additions & 2 deletions src/qs_integrate_potential.F
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
!
! **************************************************************************************************
MODULE qs_integrate_potential
USE grid_integrate, ONLY: integrate_pgf_product_rspace
USE grid_integrate, ONLY: integrate_pgf_product
USE qs_integrate_potential_product, ONLY: integrate_v_rspace
USE qs_integrate_potential_single, ONLY: integrate_ppl_rspace,&
integrate_rho_nlcc,&
Expand Down Expand Up @@ -46,6 +46,6 @@ MODULE qs_integrate_potential
integrate_rho_nlcc

! included from grid_integrate
PUBLIC :: integrate_pgf_product_rspace
PUBLIC :: integrate_pgf_product

END MODULE qs_integrate_potential
10 changes: 5 additions & 5 deletions src/qs_integrate_potential_product.F
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MODULE qs_integrate_potential_product
dbcsr_distribution_type, dbcsr_finalize, dbcsr_get_block_p, dbcsr_get_info, dbcsr_p_type, &
dbcsr_type, dbcsr_work_create
USE gaussian_gridlevels, ONLY: gridlevel_info_type
USE grid_integrate, ONLY: integrate_pgf_product_rspace
USE grid_integrate, ONLY: integrate_pgf_product
USE input_constants, ONLY: do_admm_exch_scaling_merlot
USE kinds, ONLY: default_string_length,&
dp,&
Expand Down Expand Up @@ -672,7 +672,7 @@ SUBROUTINE integrate_v_rspace_low(v_rspace, hmat, hmat_kp, pmat, pmat_kp, qs_env
IF (pab_required) THEN
IF (iatom <= jatom) THEN
CALL integrate_pgf_product_rspace( &
CALL integrate_pgf_product( &
la_max(iset), zeta(ipgf, iset), la_min(iset), &
lb_max(jset), zetb(jpgf, jset), lb_min(jset), &
ra, rab, rab2, rs_v(igrid_level)%rs_grid, cell, &
Expand All @@ -686,7 +686,7 @@ SUBROUTINE integrate_v_rspace_low(v_rspace, hmat, hmat_kp, pmat, pmat_kp, qs_env
my_virial_b=my_virial_b, use_subpatch=use_subpatch, subpatch_pattern=tasks(itask)%subpatch_pattern)
ELSE
rab_inv = -rab
CALL integrate_pgf_product_rspace( &
CALL integrate_pgf_product( &
lb_max(jset), zetb(jpgf, jset), lb_min(jset), &
la_max(iset), zeta(ipgf, iset), la_min(iset), &
rb, rab_inv, rab2, rs_v(igrid_level)%rs_grid, cell, &
Expand All @@ -701,7 +701,7 @@ SUBROUTINE integrate_v_rspace_low(v_rspace, hmat, hmat_kp, pmat, pmat_kp, qs_env
END IF
ELSE
IF (iatom <= jatom) THEN
CALL integrate_pgf_product_rspace( &
CALL integrate_pgf_product( &
la_max(iset), zeta(ipgf, iset), la_min(iset), &
lb_max(jset), zetb(jpgf, jset), lb_min(jset), &
ra, rab, rab2, rs_v(igrid_level)%rs_grid, cell, &
Expand All @@ -714,7 +714,7 @@ SUBROUTINE integrate_v_rspace_low(v_rspace, hmat, hmat_kp, pmat, pmat_kp, qs_env
map_consistent=map_consistent, use_subpatch=use_subpatch, subpatch_pattern=tasks(itask)%subpatch_pattern)
ELSE
rab_inv = -rab
CALL integrate_pgf_product_rspace( &
CALL integrate_pgf_product( &
lb_max(jset), zetb(jpgf, jset), lb_min(jset), &
la_max(iset), zeta(ipgf, iset), la_min(iset), &
rb, rab_inv, rab2, rs_v(igrid_level)%rs_grid, cell, &
Expand Down

0 comments on commit 4aa15e0

Please sign in to comment.