sltcnd_1_base Function

private function sltcnd_1_base(nI, ex, tSign, assert_occupation) result(hel)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
type(Excite_1_t), intent(in) :: ex
logical, intent(in) :: tSign
logical, intent(in), optional :: assert_occupation

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function sltcnd_1_base(nI, ex, tSign, assert_occupation) result(hel)
        ! Calculate the  by the Slater-Condon Rules when the two
        ! determinants differ by one orbital exactly.
        integer, intent(in) :: nI(nel)
        type(Excite_1_t), intent(in) :: ex
        logical, intent(in) :: tSign
        logical, intent(in), optional :: assert_occupation
        HElement_t(dp) :: hel
        debug_function_name("sltcnd_1_base")

#ifdef DEBUG_
    block
        use constants, only: stderr
        use util_mod, only: stop_all
        logical :: test_occupation

        if (present(assert_occupation)) then
            test_occupation = assert_occupation
        else
            test_occupation = .true.
        end if

        if (test_occupation) then
            if (.not. occupation_allowed(nI, ex)) then
                write(stderr, *) 'src', ex%val(1, :)
                write(stderr, *) 'tgt', ex%val(2, :)
                write(stderr, *) 'nI', nI
                call stop_all(this_routine, "Not allowed by occupation.")
            end if
        end if
    end block
#endif

        ! Sum in the diagonal terms (same in both dets)
        ! Coulomb term only included if Ms values of ex(1) and ex(2) are the
        ! same.
        hel = sltcnd_1_kernel(nI, ex)
        if (tSign) hel = -hel
    end function sltcnd_1_base