Skip to content

Commit

Permalink
Fix conventions (cp2k#3272)
Browse files Browse the repository at this point in the history
Fix incorrect conversion of complex to real type
Fix erroneous change of type name
  • Loading branch information
fstein93 authored Feb 15, 2024
1 parent 728ff8f commit 41a4030
Show file tree
Hide file tree
Showing 28 changed files with 92 additions and 92 deletions.
6 changes: 3 additions & 3 deletions src/ewald_methods_tb.F
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MODULE ewald_methods_tb
USE ewald_environment_types, ONLY: ewald_env_get,&
ewald_environment_type
USE ewald_pw_types, ONLY: ewald_pw_get,&
ewald_pw_r3d_rs_type
ewald_pw_type
USE kinds, ONLY: dp
USE mathconstants, ONLY: fourpi,&
oorootpi
Expand Down Expand Up @@ -89,7 +89,7 @@ SUBROUTINE tb_spme_evaluate(ewald_env, ewald_pw, particle_set, box, &
gmcharge, mcharge, calculate_forces, virial, use_virial, atprop)

TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(particle_type), DIMENSION(:), INTENT(IN) :: particle_set
TYPE(cell_type), POINTER :: box
REAL(KIND=dp), DIMENSION(:, :), INTENT(inout) :: gmcharge
Expand Down Expand Up @@ -436,7 +436,7 @@ END SUBROUTINE tb_ewald_overlap
SUBROUTINE tb_spme_zforce(ewald_env, ewald_pw, particle_set, box, gmcharge, mcharge)

TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(particle_type), DIMENSION(:), INTENT(IN) :: particle_set
TYPE(cell_type), POINTER :: box
REAL(KIND=dp), DIMENSION(:, :), INTENT(inout) :: gmcharge
Expand Down
6 changes: 3 additions & 3 deletions src/ewald_pw_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ MODULE ewald_pw_methods
ewald_env_set,&
ewald_environment_type
USE ewald_pw_types, ONLY: ewald_pw_get,&
ewald_pw_r3d_rs_type,&
ewald_pw_set
ewald_pw_set,&
ewald_pw_type
USE input_section_types, ONLY: section_vals_type
USE kinds, ONLY: dp
USE pw_grid_types, ONLY: pw_grid_type
Expand Down Expand Up @@ -59,7 +59,7 @@ MODULE ewald_pw_methods
!> \author JGH (15-Mar-2001)
! **************************************************************************************************
SUBROUTINE ewald_pw_grid_update(ewald_pw, ewald_env, cell_hmat)
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(ewald_environment_type), POINTER :: ewald_env
REAL(KIND=dp), DIMENSION(3, 3) :: cell_hmat

Expand Down
28 changes: 14 additions & 14 deletions src/ewald_pw_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,32 @@ MODULE ewald_pw_types

PRIVATE
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ewald_pw_types'
PUBLIC :: ewald_pw_r3d_rs_type, ewald_pw_release, &
PUBLIC :: ewald_pw_type, ewald_pw_release, &
ewald_pw_create, &
ewald_pw_get, ewald_pw_set

! **************************************************************************************************
TYPE ewald_pw_r3d_rs_type
TYPE ewald_pw_type
PRIVATE
TYPE(pw_pool_type), POINTER :: pw_small_pool
TYPE(pw_pool_type), POINTER :: pw_big_pool
TYPE(realspace_grid_desc_type), POINTER :: rs_desc
TYPE(pw_poisson_type), POINTER :: poisson_env
TYPE(dg_type), POINTER :: dg
END TYPE ewald_pw_r3d_rs_type
TYPE(pw_pool_type), POINTER :: pw_small_pool => NULL()
TYPE(pw_pool_type), POINTER :: pw_big_pool => NULL()
TYPE(realspace_grid_desc_type), POINTER :: rs_desc => NULL()
TYPE(pw_poisson_type), POINTER :: poisson_env => NULL()
TYPE(dg_type), POINTER :: dg => NULL()
END TYPE ewald_pw_type

CONTAINS

! **************************************************************************************************
!> \brief creates the structure ewald_pw_r3d_rs_type
!> \brief creates the structure ewald_pw_type
!> \param ewald_pw ...
!> \param ewald_env ...
!> \param cell ...
!> \param cell_ref ...
!> \param print_section ...
! **************************************************************************************************
SUBROUTINE ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section)
TYPE(ewald_pw_r3d_rs_type), INTENT(OUT) :: ewald_pw
TYPE(ewald_pw_type), INTENT(OUT) :: ewald_pw
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(cell_type), POINTER :: cell, cell_ref
TYPE(section_vals_type), POINTER :: print_section
Expand All @@ -100,7 +100,7 @@ END SUBROUTINE ewald_pw_create
!> \param ewald_pw ...
! **************************************************************************************************
SUBROUTINE ewald_pw_release(ewald_pw)
TYPE(ewald_pw_r3d_rs_type), INTENT(INOUT) :: ewald_pw
TYPE(ewald_pw_type), INTENT(INOUT) :: ewald_pw

CALL pw_pool_release(ewald_pw%pw_small_pool)
CALL pw_pool_release(ewald_pw%pw_big_pool)
Expand Down Expand Up @@ -128,7 +128,7 @@ END SUBROUTINE ewald_pw_release
!> \author CJM
! **************************************************************************************************
SUBROUTINE ewald_pw_init(ewald_pw, ewald_env, cell, cell_ref, print_section)
TYPE(ewald_pw_r3d_rs_type), INTENT(INOUT) :: ewald_pw
TYPE(ewald_pw_type), INTENT(INOUT) :: ewald_pw
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(cell_type), POINTER :: cell, cell_ref
TYPE(section_vals_type), POINTER :: print_section
Expand Down Expand Up @@ -323,7 +323,7 @@ END SUBROUTINE ewald_pw_init
! **************************************************************************************************
SUBROUTINE ewald_pw_get(ewald_pw, pw_big_pool, pw_small_pool, rs_desc, poisson_env, dg)

TYPE(ewald_pw_r3d_rs_type), INTENT(IN) :: ewald_pw
TYPE(ewald_pw_type), INTENT(IN) :: ewald_pw
TYPE(pw_pool_type), OPTIONAL, POINTER :: pw_big_pool, pw_small_pool
TYPE(realspace_grid_desc_type), OPTIONAL, POINTER :: rs_desc
TYPE(pw_poisson_type), OPTIONAL, POINTER :: poisson_env
Expand All @@ -350,7 +350,7 @@ END SUBROUTINE ewald_pw_get
SUBROUTINE ewald_pw_set(ewald_pw, pw_big_pool, pw_small_pool, rs_desc, dg, &
poisson_env)

TYPE(ewald_pw_r3d_rs_type), INTENT(INOUT) :: ewald_pw
TYPE(ewald_pw_type), INTENT(INOUT) :: ewald_pw
TYPE(pw_pool_type), OPTIONAL, POINTER :: pw_big_pool, pw_small_pool
TYPE(realspace_grid_desc_type), OPTIONAL, POINTER :: rs_desc
TYPE(dg_type), OPTIONAL, POINTER :: dg
Expand Down
4 changes: 2 additions & 2 deletions src/ewalds.F
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MODULE ewalds
USE ewald_environment_types, ONLY: ewald_env_get,&
ewald_environment_type
USE ewald_pw_types, ONLY: ewald_pw_get,&
ewald_pw_r3d_rs_type
ewald_pw_type
USE kinds, ONLY: dp
USE mathconstants, ONLY: fourpi,&
oorootpi,&
Expand Down Expand Up @@ -77,7 +77,7 @@ SUBROUTINE ewald_evaluate(ewald_env, ewald_pw, cell, atomic_kind_set, particle_s
local_particles, fg_coulomb, vg_coulomb, pv_g, use_virial, charges, e_coulomb, &
pv_coulomb)
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(cell_type), POINTER :: cell
TYPE(atomic_kind_type), POINTER :: atomic_kind_set(:)
TYPE(particle_type), POINTER :: particle_set(:)
Expand Down
12 changes: 6 additions & 6 deletions src/ewalds_multipole.F
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MODULE ewalds_multipole
USE ewald_environment_types, ONLY: ewald_env_get, &
ewald_environment_type
USE ewald_pw_types, ONLY: ewald_pw_get, &
ewald_pw_r3d_rs_type
ewald_pw_type
USE fist_neighbor_list_control, ONLY: list_control
USE fist_neighbor_list_types, ONLY: fist_neighbor_type, &
neighbor_kind_pairs_type
Expand Down Expand Up @@ -121,7 +121,7 @@ RECURSIVE SUBROUTINE ewald_multipole_evaluate(ewald_env, ewald_pw, nonbond_env,
quadrupoles, forces_local, forces_glob, pv_local, pv_glob, efield0, efield1, &
efield2, iw, do_debug, atomic_kind_set, mm_section)
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_nonbond_env_type), POINTER :: nonbond_env
TYPE(cell_type), POINTER :: cell
TYPE(particle_type), POINTER :: particle_set(:)
Expand Down Expand Up @@ -643,7 +643,7 @@ SUBROUTINE ewald_multipole_LR(ewald_env, ewald_pw, cell, particle_set, &
local_particles, energy, task, do_forces, do_efield, do_stress, &
charges, dipoles, quadrupoles, forces, pv, efield0, efield1, efield2)
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(cell_type), POINTER :: cell
TYPE(particle_type), POINTER :: particle_set(:)
TYPE(distribution_1d_type), POINTER :: local_particles
Expand Down Expand Up @@ -1286,7 +1286,7 @@ SUBROUTINE debug_ewald_multipoles(ewald_env, ewald_pw, nonbond_env, cell, &
POINTER :: charge_typ
END TYPE multi_charge_type
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_nonbond_env_type), POINTER :: nonbond_env
TYPE(cell_type), POINTER :: cell
TYPE(particle_type), DIMENSION(:), &
Expand Down Expand Up @@ -1880,7 +1880,7 @@ SUBROUTINE debug_ewald_multipoles_fields(ewald_env, ewald_pw, nonbond_env, cell,
particle_set, local_particles, radii, charges, dipoles, quadrupoles, task, iw, &
atomic_kind_set, mm_section)
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_nonbond_env_type), POINTER :: nonbond_env
TYPE(cell_type), POINTER :: cell
TYPE(particle_type), POINTER :: particle_set(:)
Expand Down Expand Up @@ -2065,7 +2065,7 @@ END SUBROUTINE debug_ewald_multipoles_fields
SUBROUTINE debug_ewald_multipoles_fields2(ewald_env, ewald_pw, nonbond_env, cell, &
particle_set, local_particles, radii, charges, dipoles, quadrupoles, task, iw)
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_nonbond_env_type), POINTER :: nonbond_env
TYPE(cell_type), POINTER :: cell
TYPE(particle_type), POINTER :: particle_set(:)
Expand Down
4 changes: 2 additions & 2 deletions src/fist_environment.F
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ MODULE fist_environment
read_ewald_section
USE ewald_pw_methods, ONLY: ewald_pw_grid_update
USE ewald_pw_types, ONLY: ewald_pw_create,&
ewald_pw_r3d_rs_type
ewald_pw_type
USE exclusion_types, ONLY: exclusion_type
USE fist_efield_types, ONLY: fist_efield_type,&
read_efield_section
Expand Down Expand Up @@ -239,7 +239,7 @@ SUBROUTINE fist_init_subsys(fist_env, subsys, cell, cell_ref, fist_nonbond_env,
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
TYPE(distribution_1d_type), POINTER :: local_molecules, local_particles, &
prev_local_molecules
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_energy_type), POINTER :: thermo
TYPE(molecule_kind_type), DIMENSION(:), POINTER :: molecule_kind_set, prev_molecule_kind_set
TYPE(molecule_type), DIMENSION(:), POINTER :: molecule_set
Expand Down
10 changes: 5 additions & 5 deletions src/fist_environment_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ MODULE fist_environment_types
USE distribution_1d_types, ONLY: distribution_1d_type
USE ewald_environment_types, ONLY: ewald_env_release,&
ewald_environment_type
USE ewald_pw_types, ONLY: ewald_pw_r3d_rs_type,&
ewald_pw_release
USE ewald_pw_types, ONLY: ewald_pw_release,&
ewald_pw_type
USE exclusion_types, ONLY: exclusion_release,&
exclusion_type
USE fist_efield_types, ONLY: fist_efield_type
Expand Down Expand Up @@ -75,7 +75,7 @@ MODULE fist_environment_types
TYPE(qmmm_env_mm_type), POINTER :: qmmm_env
TYPE(cell_type), POINTER :: cell_ref
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(fist_energy_type), POINTER :: thermo
TYPE(mp_para_env_type), POINTER :: para_env
TYPE(cp_subsys_type), POINTER :: subsys
Expand Down Expand Up @@ -141,7 +141,7 @@ SUBROUTINE fist_env_get(fist_env, atomic_kind_set, particle_set, ewald_pw, &
TYPE(fist_environment_type), INTENT(IN) :: fist_env
TYPE(atomic_kind_type), OPTIONAL, POINTER :: atomic_kind_set(:)
TYPE(particle_type), OPTIONAL, POINTER :: particle_set(:)
TYPE(ewald_pw_r3d_rs_type), OPTIONAL, POINTER :: ewald_pw
TYPE(ewald_pw_type), OPTIONAL, POINTER :: ewald_pw
TYPE(distribution_1d_type), OPTIONAL, POINTER :: local_particles, local_molecules
TYPE(molecule_kind_type), OPTIONAL, POINTER :: molecule_kind_set(:)
TYPE(molecule_type), OPTIONAL, POINTER :: molecule_set(:)
Expand Down Expand Up @@ -278,7 +278,7 @@ SUBROUTINE fist_env_set(fist_env, atomic_kind_set, particle_set, ewald_pw, &
TYPE(fist_environment_type), INTENT(INOUT) :: fist_env
TYPE(atomic_kind_type), OPTIONAL, POINTER :: atomic_kind_set(:)
TYPE(particle_type), OPTIONAL, POINTER :: particle_set(:)
TYPE(ewald_pw_r3d_rs_type), OPTIONAL, POINTER :: ewald_pw
TYPE(ewald_pw_type), OPTIONAL, POINTER :: ewald_pw
TYPE(distribution_1d_type), OPTIONAL, POINTER :: local_particles, local_molecules
TYPE(molecule_kind_type), OPTIONAL, POINTER :: molecule_kind_set(:)
TYPE(molecule_type), OPTIONAL, POINTER :: molecule_set(:)
Expand Down
4 changes: 2 additions & 2 deletions src/fist_force.F
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MODULE fist_force
USE ewald_environment_types, ONLY: ewald_env_get,&
ewald_environment_type
USE ewald_pw_methods, ONLY: ewald_pw_grid_update
USE ewald_pw_types, ONLY: ewald_pw_r3d_rs_type
USE ewald_pw_types, ONLY: ewald_pw_type
USE ewalds, ONLY: ewald_evaluate,&
ewald_print,&
ewald_self,&
Expand Down Expand Up @@ -139,7 +139,7 @@ SUBROUTINE fist_calc_energy_force(fist_env, debug)
TYPE(cp_subsys_type), POINTER :: subsys
TYPE(distribution_1d_type), POINTER :: local_molecules, local_particles
TYPE(ewald_environment_type), POINTER :: ewald_env
TYPE(ewald_pw_r3d_rs_type), POINTER :: ewald_pw
TYPE(ewald_pw_type), POINTER :: ewald_pw
TYPE(exclusion_type), DIMENSION(:), POINTER :: exclusions
TYPE(fist_efield_type), POINTER :: efield
TYPE(fist_energy_type), POINTER :: thermo
Expand Down
Loading

0 comments on commit 41a4030

Please sign in to comment.