(git:6a2e663)
rpa_util Module Reference

Utility functions for RPA calculations. More...

Functions/Subroutines

subroutine, public alloc_im_time (qs_env, para_env, dimen_RI, dimen_RI_red, num_integ_points, nspins, fm_mat_Q, fm_mo_coeff_occ, fm_mo_coeff_virt, fm_matrix_Minv_L_kpoints, fm_matrix_L_kpoints, mat_P_global, t_3c_O, matrix_s, kpoints, eps_filter_im_time, cut_memory, nkp, num_cells_dm, num_3c_repl, size_P, ikp_local, index_to_cell_3c, cell_to_index_3c, col_blk_size, do_ic_model, do_kpoints_cubic_RPA, do_kpoints_from_Gamma, do_ri_Sigma_x, my_open_shell, has_mat_P_blocks, wkp_W, cfm_mat_Q, fm_mat_Minv_L_kpoints, fm_mat_L_kpoints, fm_mat_RI_global_work, fm_mat_work, fm_mo_coeff_occ_scaled, fm_mo_coeff_virt_scaled, mat_dm, mat_L, mat_M_P_munu_occ, mat_M_P_munu_virt, mat_MinvVMinv, mat_P_omega, mat_P_omega_kp, mat_work, mo_coeff, fm_scaled_dm_occ_tau, fm_scaled_dm_virt_tau, homo, nmo)
 ... More...
 
subroutine, public calc_mat_q (fm_mat_S, do_ri_sos_laplace_mp2, first_cycle, iter_sc_GW0, virtual, Eigenval, Eigenval_scf, homo, omega, omega_old, jquad, mm_style, dimen_RI, dimen_ia, alpha, fm_mat_Q, fm_mat_Q_gemm, do_bse, fm_mat_Q_static_bse_gemm, dgemm_counter, num_integ_points)
 ... More...
 
subroutine, public remove_scaling_factor_rpa (fm_mat_S, virtual, Eigenval_last, homo, omega_old)
 ... More...
 
subroutine, public calc_fm_mat_s_rpa (fm_mat_S, first_cycle, virtual, Eigenval, homo, omega, omega_old)
 ... More...
 
subroutine, public q_trace_and_add_unit_matrix (dimen_RI, trace_Qomega, fm_mat_Q, para_env_RPA)
 ... More...
 
subroutine, public compute_erpa_by_freq_int (dimen_RI, trace_Qomega, fm_mat_Q, para_env_RPA, Erpa, wjquad)
 ... More...
 
subroutine, public dealloc_im_time (fm_mo_coeff_occ, fm_mo_coeff_virt, fm_scaled_dm_occ_tau, fm_scaled_dm_virt_tau, index_to_cell_3c, cell_to_index_3c, do_ic_model, do_kpoints_cubic_RPA, do_kpoints_from_Gamma, do_ri_Sigma_x, has_mat_P_blocks, wkp_W, cfm_mat_Q, fm_mat_Minv_L_kpoints, fm_mat_L_kpoints, fm_matrix_Minv, fm_matrix_Minv_Vtrunc_Minv, fm_mat_RI_global_work, fm_mat_work, fm_mo_coeff_occ_scaled, fm_mo_coeff_virt_scaled, mat_dm, mat_L, mat_MinvVMinv, mat_P_omega, mat_P_omega_kp, t_3c_M, t_3c_O, t_3c_O_compressed, t_3c_O_ind, mat_work, qs_env)
 ... More...
 
subroutine, public contract_p_omega_with_mat_l (mat_P_omega, mat_L, mat_work, eps_filter_im_time, fm_mat_work, dimen_RI, dimen_RI_red, fm_mat_L, fm_mat_Q)
 ... More...
 

Detailed Description

Utility functions for RPA calculations.

History
06.2019 Moved from rpa_ri_gpw.F [Frederick Stein]

Function/Subroutine Documentation

◆ alloc_im_time()

subroutine, public rpa_util::alloc_im_time ( type(qs_environment_type), pointer  qs_env,
type(mp_para_env_type), pointer  para_env,
integer, intent(in)  dimen_RI,
integer, intent(in)  dimen_RI_red,
integer, intent(in)  num_integ_points,
integer, intent(in)  nspins,
type(cp_fm_type), intent(in)  fm_mat_Q,
type(cp_fm_type), dimension(:), allocatable  fm_mo_coeff_occ,
type(cp_fm_type), dimension(:), allocatable  fm_mo_coeff_virt,
type(cp_fm_type), dimension(:, :), allocatable  fm_matrix_Minv_L_kpoints,
type(cp_fm_type), dimension(:, :), allocatable  fm_matrix_L_kpoints,
type(dbcsr_p_type), intent(in)  mat_P_global,
type(dbt_type), dimension(:, :), intent(inout), allocatable  t_3c_O,
type(dbcsr_p_type), dimension(:), pointer  matrix_s,
type(kpoint_type), pointer  kpoints,
real(kind=dp), intent(in)  eps_filter_im_time,
integer, intent(in)  cut_memory,
integer, intent(out)  nkp,
integer, intent(out)  num_cells_dm,
integer, intent(out)  num_3c_repl,
integer, intent(out)  size_P,
integer, intent(out)  ikp_local,
integer, dimension(:, :), intent(out), allocatable  index_to_cell_3c,
integer, dimension(:, :, :), intent(out), allocatable  cell_to_index_3c,
integer, dimension(:), pointer  col_blk_size,
logical, intent(in)  do_ic_model,
logical, intent(in)  do_kpoints_cubic_RPA,
logical, intent(in)  do_kpoints_from_Gamma,
logical, intent(in)  do_ri_Sigma_x,
logical, intent(in)  my_open_shell,
logical, dimension(:, :, :, :, :), intent(out), allocatable  has_mat_P_blocks,
real(kind=dp), dimension(:), intent(out), allocatable  wkp_W,
type(cp_cfm_type), intent(out)  cfm_mat_Q,
type(cp_fm_type), dimension(:, :), allocatable  fm_mat_Minv_L_kpoints,
type(cp_fm_type), dimension(:, :), allocatable  fm_mat_L_kpoints,
type(cp_fm_type), intent(out)  fm_mat_RI_global_work,
type(cp_fm_type), intent(out)  fm_mat_work,
type(cp_fm_type), intent(out)  fm_mo_coeff_occ_scaled,
type(cp_fm_type), intent(out)  fm_mo_coeff_virt_scaled,
type(dbcsr_p_type), intent(out)  mat_dm,
type(dbcsr_p_type), intent(out)  mat_L,
type(dbcsr_p_type), intent(out)  mat_M_P_munu_occ,
type(dbcsr_p_type), intent(out)  mat_M_P_munu_virt,
type(dbcsr_p_type), intent(out)  mat_MinvVMinv,
type(dbcsr_p_type), dimension(:, :, :), allocatable  mat_P_omega,
type(dbcsr_p_type), dimension(:, :), pointer  mat_P_omega_kp,
type(dbcsr_type), pointer  mat_work,
type(cp_fm_type), dimension(:), intent(in)  mo_coeff,
type(cp_fm_type), intent(out)  fm_scaled_dm_occ_tau,
type(cp_fm_type), intent(out)  fm_scaled_dm_virt_tau,
integer, dimension(:), intent(in)  homo,
integer, intent(in)  nmo 
)

...

Parameters
qs_env...
para_env...
dimen_RI...
dimen_RI_red...
num_integ_points...
nspins...
fm_mat_Q...
fm_mo_coeff_occ...
fm_mo_coeff_virt...
fm_matrix_Minv_L_kpoints...
fm_matrix_L_kpoints...
mat_P_global...
t_3c_O...
matrix_s...
kpoints...
eps_filter_im_time...
cut_memory...
nkp...
num_cells_dm...
num_3c_repl...
size_P...
ikp_local...
index_to_cell_3c...
cell_to_index_3c...
col_blk_size...
do_ic_model...
do_kpoints_cubic_RPA...
do_kpoints_from_Gamma...
do_ri_Sigma_x...
my_open_shell...
has_mat_P_blocks...
wkp_W...
cfm_mat_Q...
fm_mat_Minv_L_kpoints...
fm_mat_L_kpoints...
fm_mat_RI_global_work...
fm_mat_work...
fm_mo_coeff_occ_scaled...
fm_mo_coeff_virt_scaled...
mat_dm...
mat_L...
mat_M_P_munu_occ...
mat_M_P_munu_virt...
mat_MinvVMinv...
mat_P_omega...
mat_P_omega_kp...
mat_work...
mo_coeff...
fm_scaled_dm_occ_tau...
fm_scaled_dm_virt_tau...
homo...
nmo...

Definition at line 130 of file rpa_util.F.

Here is the call graph for this function:

◆ calc_mat_q()

subroutine, public rpa_util::calc_mat_q ( type(cp_fm_type), intent(in)  fm_mat_S,
logical, intent(in)  do_ri_sos_laplace_mp2,
logical, intent(in)  first_cycle,
integer, intent(in)  iter_sc_GW0,
integer, intent(in)  virtual,
real(kind=dp), dimension(:), intent(in)  Eigenval,
real(kind=dp), dimension(:), intent(in)  Eigenval_scf,
integer, intent(in)  homo,
real(kind=dp), intent(in)  omega,
real(kind=dp), intent(in)  omega_old,
integer, intent(in)  jquad,
integer, intent(in)  mm_style,
integer, intent(in)  dimen_RI,
integer, intent(in)  dimen_ia,
real(kind=dp), intent(in)  alpha,
type(cp_fm_type), intent(in)  fm_mat_Q,
type(cp_fm_type), intent(in)  fm_mat_Q_gemm,
logical, intent(in)  do_bse,
type(cp_fm_type), intent(in)  fm_mat_Q_static_bse_gemm,
type(dgemm_counter_type), intent(inout)  dgemm_counter,
integer, intent(in)  num_integ_points 
)

...

Parameters
fm_mat_S...
do_ri_sos_laplace_mp2...
first_cycle...
iter_sc_GW0...
virtual...
Eigenval...
Eigenval_scf...
homo...
omega...
omega_old...
jquad...
mm_style...
dimen_RI...
dimen_ia...
alpha...
fm_mat_Q...
fm_mat_Q_gemm...
do_bse...
fm_mat_Q_static_bse_gemm...
dgemm_counter...
num_integ_points...

Definition at line 658 of file rpa_util.F.

Here is the call graph for this function:

◆ remove_scaling_factor_rpa()

subroutine, public rpa_util::remove_scaling_factor_rpa ( type(cp_fm_type), intent(in)  fm_mat_S,
integer, intent(in)  virtual,
real(kind=dp), dimension(:), intent(in)  Eigenval_last,
integer, intent(in)  homo,
real(kind=dp), intent(in)  omega_old 
)

...

Parameters
fm_mat_S...
virtual...
Eigenval_last...
homo...
omega_old...

Definition at line 715 of file rpa_util.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_fm_mat_s_rpa()

subroutine, public rpa_util::calc_fm_mat_s_rpa ( type(cp_fm_type), intent(in)  fm_mat_S,
logical, intent(in)  first_cycle,
integer, intent(in)  virtual,
real(kind=dp), dimension(:), intent(in)  Eigenval,
integer, intent(in)  homo,
real(kind=dp), intent(in)  omega,
real(kind=dp), intent(in)  omega_old 
)

...

Parameters
fm_mat_S...
first_cycle...
virtual...
Eigenval...
homo...
omega...
omega_old...

Definition at line 764 of file rpa_util.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ q_trace_and_add_unit_matrix()

subroutine, public rpa_util::q_trace_and_add_unit_matrix ( integer, intent(in)  dimen_RI,
real(kind=dp), dimension(dimen_ri), intent(out)  trace_Qomega,
type(cp_fm_type), intent(in)  fm_mat_Q,
type(mp_para_env_type), intent(in)  para_env_RPA 
)

...

Parameters
dimen_RI...
trace_Qomega...
fm_mat_Q...
para_env_RPA...

Definition at line 883 of file rpa_util.F.

Here is the call graph for this function:

◆ compute_erpa_by_freq_int()

subroutine, public rpa_util::compute_erpa_by_freq_int ( integer, intent(in)  dimen_RI,
real(kind=dp), dimension(dimen_ri), intent(in)  trace_Qomega,
type(cp_fm_type), intent(in)  fm_mat_Q,
type(mp_para_env_type), intent(in)  para_env_RPA,
real(kind=dp), intent(inout)  Erpa,
real(kind=dp), intent(in)  wjquad 
)

...

Parameters
dimen_RI...
trace_Qomega...
fm_mat_Q...
para_env_RPA...
Erpa...
wjquad...

Definition at line 933 of file rpa_util.F.

Here is the call graph for this function:

◆ dealloc_im_time()

subroutine, public rpa_util::dealloc_im_time ( type(cp_fm_type), dimension(:), intent(inout)  fm_mo_coeff_occ,
type(cp_fm_type), dimension(:), intent(inout)  fm_mo_coeff_virt,
type(cp_fm_type), intent(inout)  fm_scaled_dm_occ_tau,
type(cp_fm_type), intent(inout)  fm_scaled_dm_virt_tau,
integer, dimension(:, :), intent(inout), allocatable  index_to_cell_3c,
integer, dimension(:, :, :), intent(inout), allocatable  cell_to_index_3c,
logical, intent(in)  do_ic_model,
logical, intent(in)  do_kpoints_cubic_RPA,
logical, intent(in)  do_kpoints_from_Gamma,
logical, intent(in)  do_ri_Sigma_x,
logical, dimension(:, :, :, :, :), intent(inout), allocatable  has_mat_P_blocks,
real(kind=dp), dimension(:), intent(inout), allocatable  wkp_W,
type(cp_cfm_type), intent(inout)  cfm_mat_Q,
type(cp_fm_type), dimension(:, :), allocatable  fm_mat_Minv_L_kpoints,
type(cp_fm_type), dimension(:, :), allocatable  fm_mat_L_kpoints,
type(cp_fm_type), dimension(:, :), allocatable  fm_matrix_Minv,
type(cp_fm_type), dimension(:, :), allocatable  fm_matrix_Minv_Vtrunc_Minv,
type(cp_fm_type), intent(inout)  fm_mat_RI_global_work,
type(cp_fm_type), intent(inout)  fm_mat_work,
type(cp_fm_type), intent(inout)  fm_mo_coeff_occ_scaled,
type(cp_fm_type), intent(inout)  fm_mo_coeff_virt_scaled,
type(dbcsr_p_type), intent(inout)  mat_dm,
type(dbcsr_p_type), intent(inout)  mat_L,
type(dbcsr_p_type), intent(inout)  mat_MinvVMinv,
type(dbcsr_p_type), dimension(:, :, :), intent(inout), allocatable  mat_P_omega,
type(dbcsr_p_type), dimension(:, :), pointer  mat_P_omega_kp,
type(dbt_type)  t_3c_M,
type(dbt_type), dimension(:, :), allocatable  t_3c_O,
type(hfx_compression_type), dimension(:, :, :), intent(inout), allocatable  t_3c_O_compressed,
type(block_ind_type), dimension(:, :, :), intent(inout), allocatable  t_3c_O_ind,
type(dbcsr_type), pointer  mat_work,
type(qs_environment_type), pointer  qs_env 
)

...

Parameters
fm_mo_coeff_occ...
fm_mo_coeff_virt...
fm_scaled_dm_occ_tau...
fm_scaled_dm_virt_tau...
index_to_cell_3c...
cell_to_index_3c...
do_ic_model...
do_kpoints_cubic_RPA...
do_kpoints_from_Gamma...
do_ri_Sigma_x...
has_mat_P_blocks...
wkp_W...
cfm_mat_Q...
fm_mat_Minv_L_kpoints...
fm_mat_L_kpoints...
fm_matrix_Minv...
fm_matrix_Minv_Vtrunc_Minv...
fm_mat_RI_global_work...
fm_mat_work...
fm_mo_coeff_occ_scaled...
fm_mo_coeff_virt_scaled...
mat_dm...
mat_L...
mat_MinvVMinv...
mat_P_omega...
mat_P_omega_kp...
t_3c_M...
t_3c_O...
t_3c_O_compressed...
t_3c_O_ind...
mat_work...
qs_env...

Definition at line 1109 of file rpa_util.F.

Here is the call graph for this function:

◆ contract_p_omega_with_mat_l()

subroutine, public rpa_util::contract_p_omega_with_mat_l ( type(dbcsr_type), pointer  mat_P_omega,
type(dbcsr_type), pointer  mat_L,
type(dbcsr_type), pointer  mat_work,
real(kind=dp), intent(in)  eps_filter_im_time,
type(cp_fm_type), intent(in)  fm_mat_work,
integer, intent(in)  dimen_RI,
integer, intent(in)  dimen_RI_red,
type(cp_fm_type), intent(in)  fm_mat_L,
type(cp_fm_type), intent(in)  fm_mat_Q 
)

...

Parameters
mat_P_omega...
mat_L...
mat_work...
eps_filter_im_time...
fm_mat_work...
dimen_RI...
dimen_RI_red...
fm_mat_L...
fm_mat_Q...

Definition at line 1269 of file rpa_util.F.

Here is the call graph for this function: