subroutine initSltCndPtr()
use SystemData, only: tSmallBasisForThreeBody
character(*), parameter :: this_routine = 'initSltCndPtr'
if (TContact) then
if (t_mol_3_body &
.or. t_ueg_3_body .and. nel > 2 .and. tSmallBasisForThreeBody) then
sltcnd_0 => sltcnd_0_tc_ua
sltcnd_1 => sltcnd_1_tc_ua
sltcnd_2 => sltcnd_2_tc_ua
sltcnd_3 => sltcnd_3_tc_ua
else
sltcnd_0 => sltcnd_0_base_ua
sltcnd_1 => sltcnd_1_base_ua
sltcnd_2 => sltcnd_2_base_ua
nI_invariant_sltcnd_3 => nI_invariant_sltcnd_3_base
sltcnd_3 => sltcnd_3_use_nI_invariant
end if
else
! six-index integrals are only used for three and more
! electrons
if (t_mol_3_body .or. t_ueg_3_body .and. nel >= 2) then
sltcnd_0 => sltcnd_0_tc
sltcnd_1 => sltcnd_1_tc
sltcnd_2 => sltcnd_2_tc
sltcnd_3 => sltcnd_3_tc
else if (allocated(SD_spin_purification)) then
if (SD_spin_purification == possible_purification_methods%TRUNCATED_LADDER) then
sltcnd_0 => sltcnd_0_base
else if (SD_spin_purification == possible_purification_methods%ONLY_LADDER) then
sltcnd_0 => sltcnd_0_purify_spin_only_ladder
else if (SD_spin_purification == possible_purification_methods%FULL_S2) then
sltcnd_0 => sltcnd_0_purify_spin_full_s2
else
call stop_all(this_routine, 'Invalid options for SD_spin_purification')
end if
sltcnd_1 => sltcnd_1_base
nI_invariant_sltcnd_2 => nI_invariant_sltcnd_2_purify_spin
sltcnd_2 => sltcnd_2_use_nI_invariant
nI_invariant_sltcnd_3 => nI_invariant_sltcnd_3_base
sltcnd_3 => sltcnd_3_use_nI_invariant
else
sltcnd_0 => sltcnd_0_base
diagH_after_exc_1 => diagH_after_exc_1_base
diagH_after_exc_2 => diagH_after_exc_2_base
diagH_after_exc_3 => diagH_after_exc_3_base
sltcnd_1 => sltcnd_1_base
nI_invariant_sltcnd_2 => nI_invariant_sltcnd_2_base
sltcnd_2 => sltcnd_2_use_nI_invariant
nI_invariant_sltcnd_3 => nI_invariant_sltcnd_3_base
sltcnd_3 => sltcnd_3_use_nI_invariant
end if
end if
if (t_calc_adjoint) then ! invert all matrix element calls
nonadjoint_sltcnd_0 => sltcnd_0
sltcnd_0 => adjoint_sltcnd_0
nonadjoint_sltcnd_1 => sltcnd_1
sltcnd_1 => adjoint_sltcnd_1
nonadjoint_sltcnd_2 => sltcnd_2
sltcnd_2 => adjoint_sltcnd_2
nonadjoint_sltcnd_3 => sltcnd_3
sltcnd_3 => adjoint_sltcnd_3
end if
end subroutine initSltCndPtr