Skip to content

Commit

Permalink
RPA: Introduce scaling factor
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Stein authored and dev-zero committed Nov 25, 2019
1 parent 4a2acb8 commit 42f2b12
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/input_cp2k_mp2.F
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,15 @@ SUBROUTINE create_ri_rpa(section)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create( &
keyword, __LOCATION__, &
name="SCALE_RPA", &
description="Scales RPA energy contributions (RPA, AXK).", &
usage="SCALE_RPA 1.0", &
default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

! here we generate a hfx subsection to use in the case EXX has to be computed after RPA
CALL create_hfx_section(subsection)
CALL section_add_subsection(section, subsection)
Expand Down
4 changes: 4 additions & 0 deletions src/mp2.F
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ SUBROUTINE mp2_main(qs_env, calc_forces)
CALL mp2_gpw_main(qs_env, mp2_env, Emp2, Emp2_Cou, Emp2_EX, Emp2_S, Emp2_T, &
mos_mp2, para_env, unit_nr, calc_forces, calc_ex, do_ri_rpa=.TRUE.)
! Scale energy contributions
Emp2 = Emp2*mp2_env%ri_rpa%scale_rpa
mp2_env%ri_rpa%ener_axk = mp2_env%ri_rpa%ener_axk*mp2_env%ri_rpa%scale_rpa
CASE (ri_mp2_laplace)
! perform RI-SOS-Laplace-MP2 energy calculation, most part of the code in common
! with the RI-RPA part
Expand Down
2 changes: 2 additions & 0 deletions src/mp2_setup.F
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ SUBROUTINE read_mp2_section(input, mp2_env)
l_val=mp2_env%ri_rpa%do_admm)
CALL section_vals_val_get(mp2_section, "RI_RPA%RI_G0W0", &
l_val=mp2_env%ri_rpa%do_ri_g0w0)
CALL section_vals_val_get(mp2_section, "RI_RPA%SCALE_RPA", &
r_val=mp2_env%ri_rpa%scale_rpa)

CALL section_vals_val_get(mp2_section, "RI_RPA%AXK", &
l_val=mp2_env%ri_rpa%do_ri_axk)
Expand Down
1 change: 1 addition & 0 deletions src/mp2_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MODULE mp2_types
REAL(KIND=dp) :: ener_axk
REAL(KIND=dp) :: rse_corr_diag
REAL(KIND=dp) :: rse_corr
REAL(KIND=dp) :: scale_rpa
END TYPE

TYPE ri_rpa_im_time_util
Expand Down

0 comments on commit 42f2b12

Please sign in to comment.