(git:6a2e663)
rpa_im_time_force_methods Module Reference

Routines needed for cubic-scaling RPA and SOS-Laplace-MP2 forces. More...

Functions/Subroutines

subroutine, public init_im_time_forces (force_data, fm_matrix_PQ, t_3c_M, unit_nr, mp2_env, qs_env)
 Initializes and pre-calculates all needed tensors for the forces. More...
 
subroutine, public calc_laplace_loop_forces (force_data, mat_P_omega, t_3c_M, t_3c_O, t_3c_O_compressed, t_3c_O_ind, fm_scaled_dm_occ_tau, fm_scaled_dm_virt_tau, fm_mo_coeff_occ, fm_mo_coeff_virt, fm_mo_coeff_occ_scaled, fm_mo_coeff_virt_scaled, starts_array_mc, ends_array_mc, starts_array_mc_block, ends_array_mc_block, num_integ_points, nmo, Eigenval, tau_tj, tau_wj, cut_memory, Pspin, Qspin, open_shell, unit_nr, dbcsr_time, dbcsr_nflop, mp2_env, qs_env)
 Updates the cubic-scaling SOS-Laplace-MP2 contribution to the forces at each quadrature point. More...
 
subroutine, public calc_rpa_loop_forces (force_data, mat_P_omega, t_3c_M, t_3c_O, t_3c_O_compressed, t_3c_O_ind, fm_scaled_dm_occ_tau, fm_scaled_dm_virt_tau, fm_mo_coeff_occ, fm_mo_coeff_virt, fm_mo_coeff_occ_scaled, fm_mo_coeff_virt_scaled, starts_array_mc, ends_array_mc, starts_array_mc_block, ends_array_mc_block, num_integ_points, nmo, Eigenval, e_fermi, weights_cos_tf_t_to_w, weights_cos_tf_w_to_t, tj, wj, tau_tj, cut_memory, ispin, open_shell, unit_nr, dbcsr_time, dbcsr_nflop, mp2_env, qs_env)
 Updates the cubic-scaling RPA contribution to the forces at each quadrature point. This routine is adapted from the corresponding Laplace SOS-MP2 loop force one. More...
 
subroutine, public calc_post_loop_forces (force_data, unit_nr, qs_env)
 All the forces that can be calculated after the loop on the Laplace quaradture, using terms collected during the said loop. This inludes the z-vector equation and its reponse forces, as well as the force coming from the trace with the derivative of the KS matrix. More...
 
subroutine, public keep_initial_quad (tj, wj, tau_tj, tau_wj, weights_cos_tf_t_to_w, weights_cos_tf_w_to_t, do_laplace, do_im_time, num_integ_points, unit_nr, qs_env)
 Overwrites the "optimal" Laplace quadrature with that of the first step. More...
 

Detailed Description

Routines needed for cubic-scaling RPA and SOS-Laplace-MP2 forces.

Author
Augustin Bussy

Function/Subroutine Documentation

◆ init_im_time_forces()

subroutine, public rpa_im_time_force_methods::init_im_time_forces ( type(im_time_force_type), intent(inout)  force_data,
type(cp_fm_type), intent(in)  fm_matrix_PQ,
type(dbt_type), intent(inout)  t_3c_M,
integer, intent(in)  unit_nr,
type(mp2_type)  mp2_env,
type(qs_environment_type), pointer  qs_env 
)

Initializes and pre-calculates all needed tensors for the forces.

Parameters
force_data...
fm_matrix_PQ...
t_3c_Mthe 3-center M tensor to be used as a template
unit_nr...
mp2_env...
qs_env...

Definition at line 187 of file rpa_im_time_force_methods.F.

Here is the call graph for this function:

◆ calc_laplace_loop_forces()

subroutine, public rpa_im_time_force_methods::calc_laplace_loop_forces ( type(im_time_force_type), intent(inout)  force_data,
type(dbcsr_p_type), dimension(:, :), intent(inout)  mat_P_omega,
type(dbt_type), intent(inout)  t_3c_M,
type(dbt_type), intent(inout)  t_3c_O,
type(hfx_compression_type), dimension(:)  t_3c_O_compressed,
type(block_ind_type), dimension(:), intent(inout)  t_3c_O_ind,
type(cp_fm_type), intent(in)  fm_scaled_dm_occ_tau,
type(cp_fm_type), intent(in)  fm_scaled_dm_virt_tau,
type(cp_fm_type), dimension(:), intent(in)  fm_mo_coeff_occ,
type(cp_fm_type), dimension(:), intent(in)  fm_mo_coeff_virt,
type(cp_fm_type), intent(in)  fm_mo_coeff_occ_scaled,
type(cp_fm_type), intent(in)  fm_mo_coeff_virt_scaled,
integer, dimension(:), intent(in)  starts_array_mc,
integer, dimension(:), intent(in)  ends_array_mc,
integer, dimension(:), intent(in)  starts_array_mc_block,
integer, dimension(:), intent(in)  ends_array_mc_block,
integer, intent(in)  num_integ_points,
integer, intent(in)  nmo,
real(kind=dp), dimension(:, :), intent(in)  Eigenval,
real(kind=dp), dimension(0:num_integ_points), intent(in)  tau_tj,
real(kind=dp), dimension(:), intent(in), allocatable  tau_wj,
integer, intent(in)  cut_memory,
integer, intent(in)  Pspin,
integer, intent(in)  Qspin,
logical, intent(in)  open_shell,
integer, intent(in)  unit_nr,
real(dp), intent(inout)  dbcsr_time,
integer(int_8), intent(inout)  dbcsr_nflop,
type(mp2_type)  mp2_env,
type(qs_environment_type), pointer  qs_env 
)

Updates the cubic-scaling SOS-Laplace-MP2 contribution to the forces at each quadrature point.

Parameters
force_data...
mat_P_omega...
t_3c_M...
t_3c_O...
t_3c_O_compressed...
t_3c_O_ind...
fm_scaled_dm_occ_tau...
fm_scaled_dm_virt_tau...
fm_mo_coeff_occ...
fm_mo_coeff_virt...
fm_mo_coeff_occ_scaled...
fm_mo_coeff_virt_scaled...
starts_array_mc...
ends_array_mc...
starts_array_mc_block...
ends_array_mc_block...
num_integ_points...
nmo...
Eigenval...
tau_tj...
tau_wj...
cut_memory...
Pspin...
Qspin...
open_shell...
unit_nr...
dbcsr_time...
dbcsr_nflop...
mp2_env...
qs_env...
Note
In open-shell, we need to take Q from one spin, and everything from the other

Definition at line 660 of file rpa_im_time_force_methods.F.

Here is the call graph for this function:

◆ calc_rpa_loop_forces()

subroutine, public rpa_im_time_force_methods::calc_rpa_loop_forces ( type(im_time_force_type), intent(inout)  force_data,
type(dbcsr_p_type), dimension(:, :), intent(inout)  mat_P_omega,
type(dbt_type), intent(inout)  t_3c_M,
type(dbt_type), intent(inout)  t_3c_O,
type(hfx_compression_type), dimension(:)  t_3c_O_compressed,
type(block_ind_type), dimension(:), intent(inout)  t_3c_O_ind,
type(cp_fm_type), intent(in)  fm_scaled_dm_occ_tau,
type(cp_fm_type), intent(in)  fm_scaled_dm_virt_tau,
type(cp_fm_type), dimension(:), intent(in)  fm_mo_coeff_occ,
type(cp_fm_type), dimension(:), intent(in)  fm_mo_coeff_virt,
type(cp_fm_type), intent(in)  fm_mo_coeff_occ_scaled,
type(cp_fm_type), intent(in)  fm_mo_coeff_virt_scaled,
integer, dimension(:), intent(in)  starts_array_mc,
integer, dimension(:), intent(in)  ends_array_mc,
integer, dimension(:), intent(in)  starts_array_mc_block,
integer, dimension(:), intent(in)  ends_array_mc_block,
integer, intent(in)  num_integ_points,
integer, intent(in)  nmo,
real(kind=dp), dimension(:, :), intent(in)  Eigenval,
real(kind=dp), intent(in)  e_fermi,
real(kind=dp), dimension(:, :), intent(in), allocatable  weights_cos_tf_t_to_w,
real(kind=dp), dimension(:, :), intent(in), allocatable  weights_cos_tf_w_to_t,
real(kind=dp), dimension(:), intent(in), allocatable  tj,
real(kind=dp), dimension(:), intent(in), allocatable  wj,
real(kind=dp), dimension(0:num_integ_points), intent(in)  tau_tj,
integer, intent(in)  cut_memory,
integer, intent(in)  ispin,
logical, intent(in)  open_shell,
integer, intent(in)  unit_nr,
real(dp), intent(inout)  dbcsr_time,
integer(int_8), intent(inout)  dbcsr_nflop,
type(mp2_type)  mp2_env,
type(qs_environment_type), pointer  qs_env 
)

Updates the cubic-scaling RPA contribution to the forces at each quadrature point. This routine is adapted from the corresponding Laplace SOS-MP2 loop force one.

Parameters
force_data...
mat_P_omega...
t_3c_M...
t_3c_O...
t_3c_O_compressed...
t_3c_O_ind...
fm_scaled_dm_occ_tau...
fm_scaled_dm_virt_tau...
fm_mo_coeff_occ...
fm_mo_coeff_virt...
fm_mo_coeff_occ_scaled...
fm_mo_coeff_virt_scaled...
starts_array_mc...
ends_array_mc...
starts_array_mc_block...
ends_array_mc_block...
num_integ_points...
nmo...
Eigenval...
e_fermi...
weights_cos_tf_t_to_w...
weights_cos_tf_w_to_t...
tj...
wj...
tau_tj...
cut_memory...
ispin...
open_shell...
unit_nr...
dbcsr_time...
dbcsr_nflop...
mp2_env...
qs_env...

Definition at line 1210 of file rpa_im_time_force_methods.F.

Here is the call graph for this function:

◆ calc_post_loop_forces()

subroutine, public rpa_im_time_force_methods::calc_post_loop_forces ( type(im_time_force_type), intent(inout)  force_data,
integer, intent(in)  unit_nr,
type(qs_environment_type), pointer  qs_env 
)

All the forces that can be calculated after the loop on the Laplace quaradture, using terms collected during the said loop. This inludes the z-vector equation and its reponse forces, as well as the force coming from the trace with the derivative of the KS matrix.

Parameters
force_data...
unit_nr...
qs_env...

Definition at line 2210 of file rpa_im_time_force_methods.F.

Here is the call graph for this function:

◆ keep_initial_quad()

subroutine, public rpa_im_time_force_methods::keep_initial_quad ( real(dp), dimension(:), intent(inout), allocatable  tj,
real(dp), dimension(:), intent(inout), allocatable  wj,
real(dp), dimension(:), intent(inout), allocatable  tau_tj,
real(dp), dimension(:), intent(inout), allocatable  tau_wj,
real(dp), dimension(:, :), intent(inout), allocatable  weights_cos_tf_t_to_w,
real(dp), dimension(:, :), intent(inout), allocatable  weights_cos_tf_w_to_t,
logical, intent(in)  do_laplace,
logical, intent(in)  do_im_time,
integer, intent(in)  num_integ_points,
integer, intent(in)  unit_nr,
type(qs_environment_type), pointer  qs_env 
)

Overwrites the "optimal" Laplace quadrature with that of the first step.

Parameters
tj...
wj...
tau_tj...
tau_wj...
weights_cos_tf_t_to_w...
weights_cos_tf_w_to_t...
do_laplace...
do_im_time...
num_integ_points...
unit_nr...
qs_env...

Definition at line 3927 of file rpa_im_time_force_methods.F.