(git:6a2e663)
hfx_ri Module Reference

RI-methods for HFX. More...

Functions/Subroutines

subroutine, public check_inverse (matrix_1, matrix_2, name, unit_nr)
 ... More...
 
subroutine, public hfx_ri_pre_scf_calc_tensors (qs_env, ri_data, t_2c_int_RI, t_2c_int_pot, t_3c_int, do_kpoints)
 Calculate 2-center and 3-center integrals. More...
 
subroutine, public hfx_ri_update_ks (qs_env, ri_data, ks_matrix, ehfx, mos, rho_ao, geometry_did_change, nspins, hf_fraction)
 ... More...
 
subroutine, public hfx_ri_update_forces (qs_env, ri_data, nspins, hf_fraction, rho_ao, rho_ao_resp, mos, use_virial, resp_only, rescale_factor)
 the general routine that calls the relevant force code More...
 
subroutine, public get_force_from_3c_trace (force, t_3c_contr, t_3c_der, atom_of_kind, kind_of, idx_to_at, pref, do_mp2, deriv_dim)
 This routines calculates the force contribution from a trace over 3D tensors, i.e. force = sum_ijk A_ijk B_ijk. An iteration over the blocks is made, which index determin the atom on which the force acts. More...
 
subroutine, public get_2c_der_force (force, t_2c_contr, t_2c_der, atom_of_kind, kind_of, idx_to_at, pref, do_mp2, do_ovlp)
 Update the forces due to the derivative of the a 2-center product d/dR (Q|R) More...
 
subroutine, public print_ri_hfx (ri_data, qs_env)
 Print RI-HFX quantities, as required by the PRINT subsection. More...
 
subroutine, public get_idx_to_atom (idx_to_at, bsizes_split, bsizes_orig)
 a small utility function that returns the atom corresponding to a block of a split tensor More...
 

Detailed Description

RI-methods for HFX.

Function/Subroutine Documentation

◆ check_inverse()

subroutine, public hfx_ri::check_inverse ( type(dbcsr_type), intent(inout)  matrix_1,
type(dbcsr_type), intent(inout)  matrix_2,
character(len=*), intent(in), optional  name,
integer, intent(in)  unit_nr 
)

...

Parameters
matrix_1...
matrix_2...
name...
unit_nr...

Definition at line 346 of file hfx_ri.F.

Here is the caller graph for this function:

◆ hfx_ri_pre_scf_calc_tensors()

subroutine, public hfx_ri::hfx_ri_pre_scf_calc_tensors ( type(qs_environment_type), pointer  qs_env,
type(hfx_ri_type), intent(inout)  ri_data,
type(dbcsr_type), dimension(:), intent(out)  t_2c_int_RI,
type(dbcsr_type), dimension(:), intent(out)  t_2c_int_pot,
type(dbt_type), dimension(:, :)  t_3c_int,
logical, intent(in), optional  do_kpoints 
)

Calculate 2-center and 3-center integrals.

2c: K_1(P, R) = (P|v1|R) and K_2(P, R) = (P|v2|R) 3c: int_3c(mu, lambda, P) = (mu lambda |v2| P) v_1 is HF operator, v_2 is RI metric

Parameters
qs_env...
ri_data...
t_2c_int_RIK_2(P, R) note: even with k-point, only need on central cell
t_2c_int_potK_1(P, R)
t_3c_intint_3c(mu, lambda, P)
do_kpoints... \notes the integral tensor arrays are already allocated on entry

Definition at line 440 of file hfx_ri.F.

Here is the call graph for this function:

◆ hfx_ri_update_ks()

subroutine, public hfx_ri::hfx_ri_update_ks ( type(qs_environment_type), pointer  qs_env,
type(hfx_ri_type), intent(inout)  ri_data,
type(dbcsr_p_type), dimension(:, :), pointer  ks_matrix,
real(kind=dp), intent(out)  ehfx,
type(mo_set_type), dimension(:), intent(in), optional  mos,
type(dbcsr_p_type), dimension(:, :), pointer  rho_ao,
logical, intent(in)  geometry_did_change,
integer, intent(in)  nspins,
real(kind=dp), intent(in)  hf_fraction 
)

...

Parameters
qs_env...
ri_data...
ks_matrix...
ehfx...
mos...
rho_ao...
geometry_did_change...
nspins...
hf_fraction...

Definition at line 1031 of file hfx_ri.F.

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

◆ hfx_ri_update_forces()

subroutine, public hfx_ri::hfx_ri_update_forces ( type(qs_environment_type), pointer  qs_env,
type(hfx_ri_type), intent(inout)  ri_data,
integer, intent(in)  nspins,
real(kind=dp), intent(in)  hf_fraction,
type(dbcsr_p_type), dimension(:, :), optional  rho_ao,
type(dbcsr_p_type), dimension(:), optional  rho_ao_resp,
type(mo_set_type), dimension(:), intent(in), optional  mos,
logical, intent(in), optional  use_virial,
logical, intent(in), optional  resp_only,
real(dp), intent(in), optional  rescale_factor 
)

the general routine that calls the relevant force code

Parameters
qs_env...
ri_data...
nspins...
hf_fraction...
rho_ao...
rho_ao_resp...
mos...
use_virial...
resp_only...
rescale_factor...

Definition at line 3034 of file hfx_ri.F.

Here is the caller graph for this function:

◆ get_force_from_3c_trace()

subroutine, public hfx_ri::get_force_from_3c_trace ( type(qs_force_type), dimension(:), pointer  force,
type(dbt_type), intent(inout)  t_3c_contr,
type(dbt_type), dimension(3), intent(inout)  t_3c_der,
integer, dimension(:), intent(in)  atom_of_kind,
integer, dimension(:), intent(in)  kind_of,
integer, dimension(:), intent(in)  idx_to_at,
real(dp), intent(in)  pref,
logical, intent(in), optional  do_mp2,
integer, intent(in), optional  deriv_dim 
)

This routines calculates the force contribution from a trace over 3D tensors, i.e. force = sum_ijk A_ijk B_ijk. An iteration over the blocks is made, which index determin the atom on which the force acts.

Parameters
force...
t_3c_contr...
t_3c_der...
atom_of_kind...
kind_of...
idx_to_at...
pref...
do_mp2...
deriv_dimthe dimension of the tensor corresponding to the derivative (by default 1)

Definition at line 3358 of file hfx_ri.F.

Here is the caller graph for this function:

◆ get_2c_der_force()

subroutine, public hfx_ri::get_2c_der_force ( type(qs_force_type), dimension(:), pointer  force,
type(dbt_type), intent(inout)  t_2c_contr,
type(dbt_type), dimension(3), intent(inout)  t_2c_der,
integer, dimension(:), intent(in)  atom_of_kind,
integer, dimension(:), intent(in)  kind_of,
integer, dimension(:), intent(in)  idx_to_at,
real(dp), intent(in)  pref,
logical, intent(in), optional  do_mp2,
logical, intent(in), optional  do_ovlp 
)

Update the forces due to the derivative of the a 2-center product d/dR (Q|R)

Parameters
force...
t_2c_contrA precontracted tensor containing sum_abcdPS (ab|P)(P|Q)^-1 (R|S)^-1 (S|cd) P_ac P_bd
t_2c_derthe d/dR (Q|R) tensor, in all 3 cartesian directions
atom_of_kind...
kind_of...
idx_to_at...
pref...
do_mp2...
do_ovlp...
Note
IMPORTANT: t_tc_contr and t_2c_der need to have the same distribution

Definition at line 3444 of file hfx_ri.F.

Here is the caller graph for this function:

◆ print_ri_hfx()

subroutine, public hfx_ri::print_ri_hfx ( type(hfx_ri_type), intent(inout)  ri_data,
type(qs_environment_type), pointer  qs_env 
)

Print RI-HFX quantities, as required by the PRINT subsection.

Parameters
ri_data...
qs_env...

Definition at line 3618 of file hfx_ri.F.

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

◆ get_idx_to_atom()

subroutine, public hfx_ri::get_idx_to_atom ( integer, dimension(:), intent(inout)  idx_to_at,
integer, dimension(:), intent(in)  bsizes_split,
integer, dimension(:), intent(in)  bsizes_orig 
)

a small utility function that returns the atom corresponding to a block of a split tensor

Parameters
idx_to_at...
bsizes_split...
bsizes_orig...
Returns
...

Definition at line 4105 of file hfx_ri.F.

Here is the caller graph for this function: