pure function assign_excitInfo_values_single_ex(gen, i, j, fullStart, fullEnd, typ) &
result(excitInfo)
integer, intent(in) :: gen, i, j, fullStart, fullEnd
integer, intent(in), optional :: typ
type(ExcitationInformation_t) :: excitInfo
! set default values for single excitations: which cause errors if
! called in incorrect places
if (present(typ)) then
excitInfo%typ = typ
else
excitInfo%typ = excit_type%single
end if
if (i == j) then
excitInfo%excitLvl = 0
excitInfo%weight = i
else
excitInfo%excitLvl = 1
excitInfo%weight = 0
end if
excitInfo%k = 0
excitInfo%l = 0
excitInfo%secondStart = 0
excitInfo%firstEnd = 0
excitInfo%gen2 = -2
excitInfo%order = 0.0_dp
excitInfo%order1 = 0.0_dp
excitInfo%overlap = 0
! then set proper values
excitInfo%i = i
excitInfo%j = j
excitInfo%gen1 = gen
excitInfo%fullStart = fullStart
excitInfo%fullEnd = fullEnd
excitInfo%currentGen = gen
excitInfo%firstGen = gen
excitInfo%lastGen = gen
excitInfo%valid = .true.
end function assign_excitInfo_values_single_ex