Skip to content

Commit

Permalink
Coding conventions and improve stability of one regtest (cp2k#3769)
Browse files Browse the repository at this point in the history
  • Loading branch information
juerghutter authored Nov 9, 2024
1 parent 8e5fe44 commit 9d12e20
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
28 changes: 14 additions & 14 deletions src/eeq_data.F
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,20 @@ MODULE eeq_data
& 2.8055966_dp, 3.0968677_dp, 1.6597596_dp, 3.2191575_dp, 1.5388148_dp, &
& 2.1222013_dp]

! covalent radii (taken from Pyykko and Atsumi, Chem. Eur. J. 15, 2009, 188-197)
! values for metals decreased by 10 %
REAL(KIND=dp), PARAMETER :: rcov(1:maxElem) = [&
& 0.32_dp, 0.46_dp, 1.20_dp, 0.94_dp, 0.77_dp, 0.75_dp, 0.71_dp, 0.63_dp, &
& 0.64_dp, 0.67_dp, 1.40_dp, 1.25_dp, 1.13_dp, 1.04_dp, 1.10_dp, 1.02_dp, &
& 0.99_dp, 0.96_dp, 1.76_dp, 1.54_dp, 1.33_dp, 1.22_dp, 1.21_dp, 1.10_dp, &
& 1.07_dp, 1.04_dp, 1.00_dp, 0.99_dp, 1.01_dp, 1.09_dp, 1.12_dp, 1.09_dp, &
& 1.15_dp, 1.10_dp, 1.14_dp, 1.17_dp, 1.89_dp, 1.67_dp, 1.47_dp, 1.39_dp, &
& 1.32_dp, 1.24_dp, 1.15_dp, 1.13_dp, 1.13_dp, 1.08_dp, 1.15_dp, 1.23_dp, &
& 1.28_dp, 1.26_dp, 1.26_dp, 1.23_dp, 1.32_dp, 1.31_dp, 2.09_dp, 1.76_dp, &
& 1.62_dp, 1.47_dp, 1.58_dp, 1.57_dp, 1.56_dp, 1.55_dp, 1.51_dp, 1.52_dp, &
& 1.51_dp, 1.50_dp, 1.49_dp, 1.49_dp, 1.48_dp, 1.53_dp, 1.46_dp, 1.37_dp, &
& 1.31_dp, 1.23_dp, 1.18_dp, 1.16_dp, 1.11_dp, 1.12_dp, 1.13_dp, 1.32_dp, &
& 1.30_dp, 1.30_dp, 1.36_dp, 1.31_dp, 1.38_dp, 1.42_dp]
! ! covalent radii (taken from Pyykko and Atsumi, Chem. Eur. J. 15, 2009, 188-197)
! ! values for metals decreased by 10 %
! REAL(KIND=dp), PARAMETER :: rcov(1:maxElem) = [&
! & 0.32_dp, 0.46_dp, 1.20_dp, 0.94_dp, 0.77_dp, 0.75_dp, 0.71_dp, 0.63_dp, &
! & 0.64_dp, 0.67_dp, 1.40_dp, 1.25_dp, 1.13_dp, 1.04_dp, 1.10_dp, 1.02_dp, &
! & 0.99_dp, 0.96_dp, 1.76_dp, 1.54_dp, 1.33_dp, 1.22_dp, 1.21_dp, 1.10_dp, &
! & 1.07_dp, 1.04_dp, 1.00_dp, 0.99_dp, 1.01_dp, 1.09_dp, 1.12_dp, 1.09_dp, &
! & 1.15_dp, 1.10_dp, 1.14_dp, 1.17_dp, 1.89_dp, 1.67_dp, 1.47_dp, 1.39_dp, &
! & 1.32_dp, 1.24_dp, 1.15_dp, 1.13_dp, 1.13_dp, 1.08_dp, 1.15_dp, 1.23_dp, &
! & 1.28_dp, 1.26_dp, 1.26_dp, 1.23_dp, 1.32_dp, 1.31_dp, 2.09_dp, 1.76_dp, &
! & 1.62_dp, 1.47_dp, 1.58_dp, 1.57_dp, 1.56_dp, 1.55_dp, 1.51_dp, 1.52_dp, &
! & 1.51_dp, 1.50_dp, 1.49_dp, 1.49_dp, 1.48_dp, 1.53_dp, 1.46_dp, 1.37_dp, &
! & 1.31_dp, 1.23_dp, 1.18_dp, 1.16_dp, 1.11_dp, 1.12_dp, 1.13_dp, 1.32_dp, &
! & 1.30_dp, 1.30_dp, 1.36_dp, 1.31_dp, 1.38_dp, 1.42_dp]
! ==========================================================================
!> Electronegativity equilibration charge model published in
!>
Expand Down
6 changes: 3 additions & 3 deletions src/eeq_method.F
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ SUBROUTINE eeq_forces(qs_env, charges, dcharges, gradient, stress, &
TYPE(neighbor_list_iterator_p_type), &
DIMENSION(:), POINTER :: nl_iterator
TYPE(neighbor_list_set_p_type), DIMENSION(:), &
POINTER :: sab_ew => NULL()
POINTER :: sab_ew
TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
TYPE(qs_force_type), DIMENSION(:), POINTER :: force
TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
Expand Down Expand Up @@ -1011,8 +1011,8 @@ SUBROUTINE pbc_solver(charges, lambda, eeq_energy, eeq_mat, particle_set, &
INTEGER, DIMENSION(3) :: cvec, ncell, periodic
INTEGER, DIMENSION(:), POINTER :: cind, rind
REAL(KIND=dp) :: ad, alpha, astep, deth, dr, eeqn, &
eps_diis = 1.E-9_dp, ftime, grc1, &
grc2, rcut, res, resin, rmax, te, ti
eps_diis, ftime, grc1, grc2, rcut, &
res, resin, rmax, te, ti
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: bvec, dvec
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: dmat, fvec, vmat, xvec
REAL(KIND=dp), DIMENSION(3) :: ri, rij, rijl, rj
Expand Down
3 changes: 2 additions & 1 deletion src/ewald_environment_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ SUBROUTINE read_ewald_section_tb(ewald_env, ewald_section, hmat, silent, pset)
LOGICAL, INTENT(IN), OPTIONAL :: silent
CHARACTER(LEN=*), OPTIONAL :: pset

CHARACTER(LEN=5) :: param = "none"
CHARACTER(LEN=5) :: param
INTEGER :: i, iw, n(3)
INTEGER, DIMENSION(:), POINTER :: gmax_read
LOGICAL :: do_print, explicit
Expand All @@ -402,6 +402,7 @@ SUBROUTINE read_ewald_section_tb(ewald_env, ewald_section, hmat, silent, pset)
logger => cp_get_default_logger()
do_print = .TRUE.
IF (PRESENT(silent)) do_print = .NOT. silent
param = "none"
IF (PRESENT(pset)) param = pset

ewald_env%do_multipoles = .FALSE.
Expand Down
2 changes: 1 addition & 1 deletion tests/xTB/regtest-gfn0/TEST_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ si_kp.inp 0
si_smear.inp 0
SiC_virial.inp 0
SiC-stress.inp 0
ch2o_eeq.inp 1 1.0E-12 -7.84498782089221
ch2o_eeq.inp 1 1.0E-11 -7.84498782090161
ch2o_eloc.inp 0
ch2o_eper.inp 0
#EOF
2 changes: 2 additions & 0 deletions tests/xTB/regtest-gfn0/ch2o_eeq.inp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
&END XTB
&END QS
&SCF
EPS_SCF 1.E-8
MAX_SCF 50
SCF_GUESS ATOMIC
&END SCF
&END DFT
Expand Down

0 comments on commit 9d12e20

Please sign in to comment.