Skip to content

Commit

Permalink
Remove REALSPACE and RECIPROCALSPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
fstein93 committed Feb 13, 2024
1 parent 3ee6439 commit 5b5dd0e
Show file tree
Hide file tree
Showing 191 changed files with 3,459 additions and 4,067 deletions.
8 changes: 4 additions & 4 deletions src/admm_dm_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ MODULE admm_dm_methods
do_admm_blocked_projection
USE iterate_matrix, ONLY: invert_Hotelling
USE kinds, ONLY: dp
USE pw_types, ONLY: pw_c1d_type,&
pw_r3d_type
USE pw_types, ONLY: pw_c1d_gs_type,&
pw_r3d_rs_type
USE qs_collocate_density, ONLY: calculate_rho_elec
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
Expand Down Expand Up @@ -238,8 +238,8 @@ SUBROUTINE update_rho_aux(qs_env)
TYPE(admm_dm_type), POINTER :: admm_dm
TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: rho_ao_aux
TYPE(dft_control_type), POINTER :: dft_control
TYPE(pw_c1d_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(pw_c1d_gs_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_rs_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(qs_ks_env_type), POINTER :: ks_env
TYPE(qs_rho_type), POINTER :: rho_aux
TYPE(task_list_type), POINTER :: task_list_aux_fit
Expand Down
20 changes: 10 additions & 10 deletions src/admm_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
!> \author Manuel Guidon
! **************************************************************************************************
MODULE admm_methods
USE admm_types, ONLY: admm_gapw_r3d_type,&
USE admm_types, ONLY: admm_gapw_r3d_rs_type,&
admm_type,&
get_admm_env
USE atomic_kind_types, ONLY: atomic_kind_type
Expand Down Expand Up @@ -90,8 +90,8 @@ MODULE admm_methods
z_zero
USE message_passing, ONLY: mp_para_env_type
USE parallel_gemm_api, ONLY: parallel_gemm
USE pw_types, ONLY: pw_c1d_type,&
pw_r3d_type
USE pw_types, ONLY: pw_c1d_gs_type,&
pw_r3d_rs_type
USE qs_collocate_density, ONLY: calculate_rho_elec
USE qs_energy_types, ONLY: qs_energy_type
USE qs_environment_types, ONLY: get_qs_env,&
Expand Down Expand Up @@ -161,8 +161,8 @@ SUBROUTINE admm_mo_calc_rho_aux(qs_env)
TYPE(dft_control_type), POINTER :: dft_control
TYPE(mo_set_type), DIMENSION(:), POINTER :: mos, mos_aux_fit
TYPE(mp_para_env_type), POINTER :: para_env
TYPE(pw_c1d_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(pw_c1d_gs_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_rs_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(qs_ks_env_type), POINTER :: ks_env
TYPE(qs_rho_type), POINTER :: rho, rho_aux_fit
TYPE(task_list_type), POINTER :: task_list
Expand Down Expand Up @@ -322,8 +322,8 @@ SUBROUTINE admm_mo_calc_rho_aux_kp(qs_env)
TYPE(mp_para_env_type), POINTER :: para_env
TYPE(neighbor_list_set_p_type), DIMENSION(:), &
POINTER :: sab_aux_fit, sab_kp
TYPE(pw_c1d_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(pw_c1d_gs_type), DIMENSION(:), POINTER :: rho_g_aux
TYPE(pw_r3d_rs_type), DIMENSION(:), POINTER :: rho_r_aux
TYPE(qs_ks_env_type), POINTER :: ks_env
TYPE(qs_rho_type), POINTER :: rho_aux_fit, rho_orb
TYPE(qs_scf_env_type), POINTER :: scf_env
Expand Down Expand Up @@ -2393,16 +2393,16 @@ SUBROUTINE calc_spin_dep_aux_exch_ener(qs_env, admm_env, ener_k_ispin, ener_x_is
LOGICAL :: gapw
REAL(dp) :: tmp
REAL(KIND=dp), DIMENSION(:), POINTER :: tot_rho_r
TYPE(admm_gapw_r3d_type), POINTER :: admm_gapw_env
TYPE(admm_gapw_r3d_rs_type), POINTER :: admm_gapw_env
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: rho_ao
TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_ks_aux_fit_hfx, rho_ao_aux, &
rho_ao_aux_buffer
TYPE(dft_control_type), POINTER :: dft_control
TYPE(local_rho_type), POINTER :: local_rho_buffer
TYPE(mp_para_env_type), POINTER :: para_env
TYPE(pw_c1d_type), DIMENSION(:), POINTER :: rho_g
TYPE(pw_r3d_type), DIMENSION(:), POINTER :: rho_r, v_rspace_dummy, v_tau_rspace_dummy
TYPE(pw_c1d_gs_type), DIMENSION(:), POINTER :: rho_g
TYPE(pw_r3d_rs_type), DIMENSION(:), POINTER :: rho_r, v_rspace_dummy, v_tau_rspace_dummy
TYPE(qs_ks_env_type), POINTER :: ks_env
TYPE(qs_rho_type), POINTER :: rho_aux_fit, rho_aux_fit_buffer
TYPE(section_vals_type), POINTER :: xc_section_aux
Expand Down
10 changes: 5 additions & 5 deletions src/admm_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MODULE admm_types

IMPLICIT NONE
PRIVATE
PUBLIC :: admm_env_create, admm_env_release, admm_type, admm_gapw_r3d_type, set_admm_env, get_admm_env
PUBLIC :: admm_env_create, admm_env_release, admm_type, admm_gapw_r3d_rs_type, set_admm_env, get_admm_env

CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'admm_types'

Expand All @@ -82,12 +82,12 @@ MODULE admm_types
!> \param task_list the task list used for all soft density pw operations
!> \param oce stores the precomputed oce integrals
! **************************************************************************************************
TYPE admm_gapw_r3d_type
TYPE admm_gapw_r3d_rs_type
TYPE(qs_kind_type), DIMENSION(:), POINTER :: admm_kind_set => Null()
TYPE(local_rho_type), POINTER :: local_rho_set => Null()
TYPE(task_list_type), POINTER :: task_list => Null()
TYPE(oce_matrix_type), POINTER :: oce => Null()
END TYPE admm_gapw_r3d_type
END TYPE admm_gapw_r3d_rs_type

! **************************************************************************************************
!> \brief stores some data used in wavefunction fitting
Expand Down Expand Up @@ -178,7 +178,7 @@ MODULE admm_types
LOGICAL :: block_dm = .FALSE.
LOGICAL :: block_fit = .FALSE.
INTEGER, DIMENSION(:, :), POINTER :: block_map => Null()
TYPE(admm_gapw_r3d_type), POINTER :: admm_gapw_env => NULL()
TYPE(admm_gapw_r3d_rs_type), POINTER :: admm_gapw_env => NULL()
LOGICAL :: do_gapw = .FALSE.
TYPE(admm_dm_type), POINTER :: admm_dm => Null()

Expand Down Expand Up @@ -539,7 +539,7 @@ END SUBROUTINE admm_env_release
! **************************************************************************************************
SUBROUTINE admm_gapw_env_release(admm_gapw_env)
TYPE(admm_gapw_r3d_type), POINTER :: admm_gapw_env
TYPE(admm_gapw_r3d_rs_type), POINTER :: admm_gapw_env
IF (ASSOCIATED(admm_gapw_env%admm_kind_set)) THEN
CALL deallocate_qs_kind_set(admm_gapw_env%admm_kind_set)
Expand Down
14 changes: 7 additions & 7 deletions src/aobasis/soft_basis_set.F
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,36 @@ MODULE soft_basis_set
!> \param rc ...
!> \param paw_atom ...
!> \param paw_type_forced ...
!> \param gpw_r3d_type_forced ...
!> \param gpw_r3d_rs_type_forced ...
!> \version 1.0
! **************************************************************************************************
SUBROUTINE create_soft_basis(orb_basis, soft_basis, eps_fit, rc, paw_atom, &
paw_type_forced, gpw_r3d_type_forced)
paw_type_forced, gpw_r3d_rs_type_forced)

TYPE(gto_basis_set_type), POINTER :: orb_basis, soft_basis
REAL(dp), INTENT(IN) :: eps_fit, rc
LOGICAL, INTENT(OUT) :: paw_atom
LOGICAL, INTENT(IN) :: paw_type_forced, gpw_r3d_type_forced
LOGICAL, INTENT(IN) :: paw_type_forced, gpw_r3d_rs_type_forced

CHARACTER(LEN=default_string_length) :: bsname
INTEGER :: ico, ipgf, ipgf_s, iset, iset_s, ishell, lshell, lshell_old, m, maxco, maxpgf, &
maxpgf_s, maxshell, maxshell_s, ncgf, nset, nset_s, nsgf
INTEGER, ALLOCATABLE, DIMENSION(:) :: iset_s2h
INTEGER, DIMENSION(:), POINTER :: lmax, lmin, npgf, nshell
INTEGER, DIMENSION(:, :), POINTER :: l, n
LOGICAL :: my_gpw_r3d_type_forced
LOGICAL :: my_gpw_r3d_rs_type_forced
REAL(KIND=dp) :: minzet, radius
REAL(KIND=dp), DIMENSION(:, :), POINTER :: zet
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: gcc

NULLIFY (gcc, l, lmax, lmin, n, npgf, nshell, zet)
paw_atom = .FALSE.
my_gpw_r3d_type_forced = gpw_r3d_type_forced
my_gpw_r3d_rs_type_forced = gpw_r3d_rs_type_forced
IF (paw_type_forced) THEN
paw_atom = .TRUE.
my_gpw_r3d_type_forced = .FALSE.
my_gpw_r3d_rs_type_forced = .FALSE.
END IF
IF (.NOT. my_gpw_r3d_type_forced) THEN
IF (.NOT. my_gpw_r3d_rs_type_forced) THEN
CALL get_gto_basis_set(gto_basis_set=orb_basis, name=bsname, &
maxpgf=maxpgf, maxshell=maxshell, nset=nset)

Expand Down
30 changes: 13 additions & 17 deletions src/cp_ddapc.F
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ MODULE cp_ddapc
pw_transfer,&
pw_zero
USE pw_pool_types, ONLY: pw_pool_type
USE pw_types, ONLY: REALSPACE,&
RECIPROCALSPACE,&
pw_c1d_type,&
pw_r3d_type
USE pw_types, ONLY: pw_c1d_gs_type,&
pw_r3d_rs_type
USE qs_energy_types, ONLY: qs_energy_type
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
Expand Down Expand Up @@ -83,8 +81,8 @@ SUBROUTINE qs_ks_ddapc(qs_env, auxbas_pw_pool, rho_tot_gspace, v_hartree_gspace,

TYPE(qs_environment_type), POINTER :: qs_env
TYPE(pw_pool_type), POINTER :: auxbas_pw_pool
TYPE(pw_c1d_type), INTENT(IN) :: rho_tot_gspace, v_hartree_gspace
TYPE(pw_r3d_type), POINTER :: v_spin_ddapc_rest_r
TYPE(pw_c1d_gs_type), INTENT(IN) :: rho_tot_gspace, v_hartree_gspace
TYPE(pw_r3d_rs_type), POINTER :: v_spin_ddapc_rest_r
TYPE(qs_energy_type), POINTER :: energy
LOGICAL, INTENT(in) :: calculate_forces
TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: ks_matrix
Expand All @@ -98,8 +96,8 @@ SUBROUTINE qs_ks_ddapc(qs_env, auxbas_pw_pool, rho_tot_gspace, v_hartree_gspace,
TYPE(cp_logger_type), POINTER :: logger
TYPE(ddapc_restraint_type), POINTER :: ddapc_restraint_control
TYPE(dft_control_type), POINTER :: dft_control
TYPE(pw_c1d_type) :: v_spin_ddapc_rest_g
TYPE(pw_r3d_type), POINTER :: v_hartree_rspace
TYPE(pw_c1d_gs_type) :: v_spin_ddapc_rest_g
TYPE(pw_r3d_rs_type), POINTER :: v_hartree_rspace

NULLIFY (v_hartree_rspace, dft_control)

Expand Down Expand Up @@ -136,13 +134,11 @@ SUBROUTINE qs_ks_ddapc(qs_env, auxbas_pw_pool, rho_tot_gspace, v_hartree_gspace,
dft_control%qs_control%ddapc_explicit_potential = explicit_potential
dft_control%qs_control%ddapc_restraint_is_spin = ddapc_restraint_is_spin
IF (explicit_potential) THEN
CALL auxbas_pw_pool%create_pw(v_spin_ddapc_rest_g, &
in_space=RECIPROCALSPACE)
CALL auxbas_pw_pool%create_pw(v_spin_ddapc_rest_g)
CALL pw_zero(v_spin_ddapc_rest_g)
NULLIFY (v_spin_ddapc_rest_r)
ALLOCATE (v_spin_ddapc_rest_r)
CALL auxbas_pw_pool%create_pw(v_spin_ddapc_rest_r, &
in_space=REALSPACE)
CALL auxbas_pw_pool%create_pw(v_spin_ddapc_rest_r)
END IF

IF (calculate_forces) CALL reset_ch_pulay(qs_env)
Expand Down Expand Up @@ -228,9 +224,9 @@ END SUBROUTINE qs_ks_ddapc
SUBROUTINE cp_ddapc_apply_CD(qs_env, rho_tot_gspace, energy, v_hartree_gspace, &
calculate_forces, Itype_of_density)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(pw_c1d_type), INTENT(IN) :: rho_tot_gspace
TYPE(pw_c1d_gs_type), INTENT(IN) :: rho_tot_gspace
REAL(KIND=dp), INTENT(INOUT) :: energy
TYPE(pw_c1d_type), INTENT(IN) :: v_hartree_gspace
TYPE(pw_c1d_gs_type), INTENT(IN) :: v_hartree_gspace
LOGICAL, INTENT(IN), OPTIONAL :: calculate_forces
CHARACTER(LEN=*) :: Itype_of_density
Expand Down Expand Up @@ -363,7 +359,7 @@ SUBROUTINE cp_ddapc_apply_RS(qs_env, energy_res, v_hartree_gspace, &
v_spin_ddapc_rest_g, ddapc_restraint_control, calculate_forces)
TYPE(qs_environment_type), POINTER :: qs_env
REAL(KIND=dp), INTENT(INOUT), OPTIONAL :: energy_res
TYPE(pw_c1d_type), INTENT(IN) :: v_hartree_gspace, v_spin_ddapc_rest_g
TYPE(pw_c1d_gs_type), INTENT(IN) :: v_hartree_gspace, v_spin_ddapc_rest_g
TYPE(ddapc_restraint_type), POINTER :: ddapc_restraint_control
LOGICAL, INTENT(IN), OPTIONAL :: calculate_forces
Expand Down Expand Up @@ -466,9 +462,9 @@ END SUBROUTINE cp_ddapc_apply_RS
SUBROUTINE cp_ddapc_apply_RF(qs_env, rho_tot_gspace, energy, &
v_hartree_gspace, calculate_forces, Itype_of_density)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(pw_c1d_type), INTENT(IN) :: rho_tot_gspace
TYPE(pw_c1d_gs_type), INTENT(IN) :: rho_tot_gspace
REAL(KIND=dp), INTENT(INOUT) :: energy
TYPE(pw_c1d_type), INTENT(IN) :: v_hartree_gspace
TYPE(pw_c1d_gs_type), INTENT(IN) :: v_hartree_gspace
LOGICAL, INTENT(IN), OPTIONAL :: calculate_forces
CHARACTER(LEN=*) :: Itype_of_density
Expand Down
4 changes: 2 additions & 2 deletions src/cp_ddapc_forces.F
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MODULE cp_ddapc_forces
USE message_passing, ONLY: mp_para_env_type
USE particle_types, ONLY: particle_type
USE pw_spline_utils, ONLY: Eval_d_Interp_Spl3_pbc
USE pw_types, ONLY: pw_r3d_type
USE pw_types, ONLY: pw_r3d_rs_type
USE qs_environment_types, ONLY: get_qs_env,&
qs_environment_type
USE qs_force_types, ONLY: qs_force_type
Expand Down Expand Up @@ -74,7 +74,7 @@ MODULE cp_ddapc_forces
RECURSIVE SUBROUTINE ewald_ddapc_force(qs_env, coeff, apply_qmmm_periodic, &
factor, multipole_section, cell, particle_set, radii, dq, charges)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(pw_r3d_type), INTENT(IN), POINTER :: coeff
TYPE(pw_r3d_rs_type), INTENT(IN), POINTER :: coeff
LOGICAL, INTENT(IN) :: apply_qmmm_periodic
REAL(KIND=dp), INTENT(IN) :: factor
TYPE(section_vals_type), POINTER :: multipole_section
Expand Down
Loading

0 comments on commit 5b5dd0e

Please sign in to comment.