excitationIdentifier_single Function

public function excitationIdentifier_single(i, j) result(excitInfo)


Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: j

Return Value type(ExcitationInformation_t)


Source Code

    function excitationIdentifier_single(i, j) result(excitInfo)
        ! function to identify all necessary information to calculate a
        ! single excitation, provided the two indices i,j. And also to be
        ! able to calculate the matrix elements correctly.
        ! in the single excitation case, there is very little information
        ! necessary, but to keep it coherently with the rest also to it this
        ! way
        ! possible entries for excitation type excitInfo%typ:
        ! single raising
        ! single lowering
        ! single weight
        integer, intent(in) :: i, j
        type(ExcitationInformation_t) :: excitInfo
        character(*), parameter :: this_routine = "excitationIdentifier_single"

        ASSERT(i > 0 .and. i <= nSpatOrbs)
        ASSERT(j > 0 .and. j <= nSpatOrbs)

        ! type of excitation, be more specific here and use the available
        ! information in the calculation of the excitations also.

        ! identify generator, excitation level and start and end indices and
        ! also store nonOverlapRange although maybe not even needed...
        if (i < j) then
            excitInfo = assign_excitInfo_values_single(1, i, j, i, j)

        else if (i > j) then
            excitInfo = assign_excitInfo_values_single(gen_type%L, i, j, j, i)

            excitInfo = assign_excitInfo_values_single(0, i, i, i, i)

        end if

    end function excitationIdentifier_single