Skip to content
Permalink
Browse files

XAS_TDP| Updated documentation + regtests + general clean-up

  • Loading branch information...
abussy authored and pseewald committed Sep 20, 2019
1 parent b5f1812 commit 2eb5016bfc3b6eb4ad7c4d3bf1233ab214b970d1
Showing with 2,536 additions and 1,700 deletions.
  1. +0 −2 src/aobasis/ai_coulomb.F
  2. +7 −6 src/aobasis/ai_operators_r12.F
  3. +2 −1 src/basis_set_output.F
  4. +3 −2 src/common/mathlib.F
  5. +5 −4 src/common/t_c_g0.F
  6. +3 −1 src/{ → common}/t_sh_p_s_c.F
  7. +0 −1 src/cp_control_types.F
  8. +2 −2 src/cp_control_utils.F
  9. +3 −3 src/generic_os_integrals.F
  10. +3 −3 src/hfx_types.F
  11. +185 −176 src/input_cp2k_dft.F
  12. +73 −61 src/libint_3center.F
  13. +1 −3 src/mp2_eri.F
  14. +1 −1 src/pw_env_methods.F
  15. +1 −1 src/qs_core_hamiltonian.F
  16. +1 −2 src/qs_energy_utils.F
  17. +4 −3 src/qs_environment.F
  18. +2 −2 src/qs_interactions.F
  19. +0 −1 src/qs_loc_types.F
  20. +0 −1 src/qs_loc_utils.F
  21. +112 −111 src/qs_o3c_methods.F
  22. +6 −4 src/qs_o3c_types.F
  23. +2 −2 src/qs_operators_ao.F
  24. +5 −5 src/qs_pdos.F
  25. +2 −9 src/qs_scf_post_gpw.F
  26. +0 −1 src/xas_methods.F
  27. +790 −771 src/xas_tdp_atom.F
  28. +36 −29 src/xas_tdp_kernel.F
  29. +365 −323 src/xas_tdp_methods.F
  30. +47 −52 src/xas_tdp_types.F
  31. +135 −116 src/xas_tdp_utils.F
  32. +69 −0 tests/QS/regtest-xastdp/Ar-HF-2p-SOC-os.inp
  33. +67 −0 tests/QS/regtest-xastdp/Ar-HF-2p-SOC-rcs.inp
  34. +81 −0 tests/QS/regtest-xastdp/C2H2-PBE-ri_region.inp
  35. +66 −0 tests/QS/regtest-xastdp/H2O-B3LYP-full-restart.inp
  36. +84 −0 tests/QS/regtest-xastdp/H2O-B3LYP-full.inp
  37. +63 −0 tests/QS/regtest-xastdp/Ne-HF-extRI_XAS.inp
  38. +93 −0 tests/QS/regtest-xastdp/Ne-pbc-shortrange.inp
  39. +91 −0 tests/QS/regtest-xastdp/Ne-pbc-truncated.inp
  40. +105 −0 tests/QS/regtest-xastdp/SiH4-PBE0-admm-pseudo.inp
  41. +18 −0 tests/QS/regtest-xastdp/TEST_FILES
  42. +1 −0 tests/TEST_DIRS
  43. +2 −1 tests/TEST_TYPES
@@ -856,7 +856,6 @@ SUBROUTINE coulomb3(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpg
IF (rpgfa(ipgf)+rpgfc < dac) THEN
na = na+ncoset(la_max-maxder_local)
nap = nap+ncoset(la_max)
CPABORT("An ERI integral is being screened out...")
CYCLE
END IF

@@ -869,7 +868,6 @@ SUBROUTINE coulomb3(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpg
(rpgfb(jpgf)+rpgfc < dbc) .OR. &
(rpgfa(ipgf)+rpgfb(jpgf) < dab)) THEN
nb = nb+ncoset(lb_max)
CPABORT("An ERI integral is being screened out...")
CYCLE
END IF

@@ -39,7 +39,8 @@ MODULE ai_operators_r12
pi
USE orbital_pointers, ONLY: coset,&
ncoset
USE t_c_g0, ONLY: t_c_g0_n, get_lmax_init
USE t_c_g0, ONLY: get_lmax_init,&
t_c_g0_n
#include "../base/base_uses.f90"

IMPLICIT NONE
@@ -691,9 +692,9 @@ SUBROUTINE cps_truncated2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
CHARACTER(len=*), PARAMETER :: routineN = 'cps_truncated2', routineP = moduleN//':'//routineN

INTEGER :: n
REAL(KIND=dp) :: t, r, f0
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: f
LOGICAL :: use_gamma
REAL(KIND=dp) :: f0, r, t
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: f

MARK_USED(omega)

@@ -704,16 +705,16 @@ SUBROUTINE cps_truncated2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
f0 = 2.0_dp*SQRT(pi**5*zetw)*zetp*zetq

!check that the operator has been init from file
CPASSERT(get_lmax_init() .GE. nmax)
CPASSERT(get_lmax_init() .GE. nmax)

CALL t_c_g0_n(f, use_gamma, r, t, nmax)
IF (use_gamma) CALL fgamma(nmax, t, f)

DO n = 1, nmax
v(1, 1, n) = f0*f(n)
END DO
DEALLOCATE(f)

DEALLOCATE (f)

END SUBROUTINE cps_truncated2

@@ -61,7 +61,8 @@ SUBROUTINE print_basis_set_file(qs_env, base_section)
INTEGER, SAVE :: ncalls = 0
TYPE(cp_logger_type), POINTER :: logger
TYPE(gto_basis_set_type), POINTER :: aux_fit_basis, lri_aux_basis, orb_basis, &
ri_aux_basis, ri_hxc_basis, ri_xas_basis
ri_aux_basis, ri_hxc_basis, &
ri_xas_basis
TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
TYPE(qs_kind_type), POINTER :: qs_kind

@@ -1742,6 +1742,7 @@ END SUBROUTINE swap_vector
! **************************************************************************************************
!> \brief - compute a truncation radius for the shortrange operator
!> \param eps target accuracy!> \param omg screening parameter
!> \param omg ...
!> \param r_cutoff cutoff radius
!> \par History
!> 10.2012 created [Hossein Banihashemian]
@@ -1788,8 +1789,8 @@ SUBROUTINE erfc_cutoff(eps, omg, r_cutoff)
!> \param df ...
! **************************************************************************************************
SUBROUTINE eval_transc_func(r, eps, omega, fn, df)
REAL(dp), INTENT(in) :: r, eps, omega
REAL(dp), INTENT(out) :: fn, df
REAL(dp), INTENT(in) :: r, eps, omega
REAL(dp), INTENT(out) :: fn, df

fn = erfc(omega*r)-r*eps
df = -omega*2*EXP(-omega**2*r**2)/SQRT(pi)-eps
@@ -45,9 +45,9 @@
!
! Joost VandeVondele and Manuel Guidon, Nov 2008.
! instead of a module one could use: INTEGER, PARAMETER :: dp=KIND(0.0D0)
!
! History: -05.2019 Added a get_maxl_init function to get current status of nderiv_init and
! moved the file to common (together with gamma) A. Bussy
!
! History: -05.2019 Added a get_maxl_init function to get current status of nderiv_init and moved
! the file to common (made it accessible from aobasis, same place as gamma.F) A. Bussy

MODULE t_c_g0
USE kinds, ONLY: dp
@@ -1446,11 +1446,12 @@ END SUBROUTINE PD2VAL
! **************************************************************************************************
!> \brief Returns the value of nderiv_init so that one can check if opening the potential file is
!> worhtwhile
!> \return ...
!> \author A. Bussy, 05.2019
! **************************************************************************************************
FUNCTION get_lmax_init() RESULT(lmax_init)

INTEGER :: lmax_init
INTEGER :: lmax_init

lmax_init = nderiv_init

@@ -23,10 +23,12 @@
!
!
! Joost VandeVondele and Manuel Guidon, Nov 2008.
!
! History: -09.2019 Moved the file to common (together with gamma.F and t_c_g0.F) A.Bussy
MODULE t_sh_p_s_c
USE kinds, ONLY: dp
USE message_passing, ONLY: mp_bcast
#include "./base/base_uses.f90"
#include "../base/base_uses.f90"

IMPLICIT NONE
PRIVATE
@@ -1,4 +1,3 @@
!TEMP COMMENT
!--------------------------------------------------------------------------------------------------!
! CP2K: A general program to perform molecular dynamics simulations !
! Copyright (C) 2000 - 2019 CP2K developers group !
@@ -365,12 +365,12 @@ SUBROUTINE read_dft_control(dft_control, dft_section)
END IF

tmp_section => section_vals_get_subs_vals(dft_section, "XAS_TDP")
CALL section_vals_get(tmp_section, explicit=dft_control%do_xas_tdp_calculation)
CALL section_vals_get(tmp_section, explicit=dft_control%do_xas_tdp_calculation)
IF (dft_control%do_xas_tdp_calculation) THEN
! Override with section parameter
CALL section_vals_val_get(tmp_section, "_SECTION_PARAMETERS_", &
l_val=dft_control%do_xas_tdp_calculation)
END IF
END IF

! Read the finite field input section
dft_control%apply_efield = .FALSE.
@@ -68,8 +68,8 @@ MODULE generic_os_integrals
!> \param fba basis at center A
!> \param fbb basis at center B
!> \param omega parameter in the operator
!> \param calculate_forces ...
!> \param r_cutoff the cutoff in case of truncated coulomb operator
!> \param calculate_forces ...
! **************************************************************************************************
SUBROUTINE int_operators_r12_ab_os(r12_operator, vab, dvab, rab, fba, fbb, omega, r_cutoff, &
calculate_forces)
@@ -268,8 +268,8 @@ END SUBROUTINE int_operator_ab_os_low
SUBROUTINE int_overlap_ab_os(sab, dsab, rab, fba, fbb, calculate_forces, debug, dmax)

REAL(KIND=dp), DIMENSION(:, :), INTENT(INOUT) :: sab
REAL(KIND=dp), DIMENSION(:, :, :), &
INTENT(INOUT), OPTIONAL :: dsab
REAL(KIND=dp), DIMENSION(:, :, :), INTENT(INOUT), &
OPTIONAL :: dsab
REAL(KIND=dp), DIMENSION(3), INTENT(IN) :: rab
TYPE(gto_basis_set_type), POINTER :: fba, fbb
LOGICAL, INTENT(IN) :: calculate_forces, debug
@@ -859,11 +859,11 @@ SUBROUTINE hfx_create_basis_types(basis_parameter, basis_info, qs_kind_set, do_a
LOGICAL, INTENT(IN) :: do_admm

CHARACTER(LEN=*), PARAMETER :: routineN = 'hfx_create_basis_types', &
routineP = moduleN//':'//routineN
routineP = moduleN//':'//routineN

INTEGER :: co_counter, handle, i, ikind, ipgf, iset, j, k, la, max_am_kind, max_coeff, &
max_nsgfl, max_pgf, max_pgf_kind, max_set, nkind, nl_count, nset, nseta, offset_a, &
offset_a1, s_offset_nl_a, sgfa, so_counter
max_nsgfl, max_pgf, max_pgf_kind, max_set, nkind, nl_count, nset, nseta, offset_a, &
offset_a1, s_offset_nl_a, sgfa, so_counter
INTEGER, DIMENSION(:), POINTER :: la_max, la_min, npgfa, nshell
INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, nl_a
REAL(dp), DIMENSION(:, :), POINTER :: sphi_a

0 comments on commit 2eb5016

Please sign in to comment.
You can’t perform that action at this time.