InitExcitGenSession Function

public function InitExcitGenSession(nI, minRank, maxRank, minSpinDiff, maxSpinDiff) result(session)

Uses

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nEl)
integer, intent(in) :: minRank
integer, intent(in) :: maxRank
integer, intent(in) :: minSpinDiff
integer, intent(in) :: maxSpinDiff

Return Value type(ExcitGenSessionType)


Contents

Source Code


Source Code

    function InitExcitGenSession(nI, minRank, maxRank, minSpinDiff, maxSpinDiff) result(session)
        use sym_mod, only: getsym_wrapper
        implicit none
        integer, intent(in) :: nI(nEl)
        integer, intent(in) :: minRank, maxRank, minSpinDiff, maxSpinDiff
        type(ExcitGenSessionType) :: session
        integer :: i, orb

        allocate(session%nI(nEl))
        allocate(session%holes(nBasis - nEl))

        session%nI = nI
        session%minRank = minRank
        session%maxRank = maxRank
        session%minSpinDiff = minSpinDiff
        session%maxSpinDiff = maxSpinDiff
        session%rank = minRank
        call InitExcitVecs(session)
        i = 1
        do orb = 1, nBasis
            if (.not. any(session%nI == orb)) then
                session%holes(i) = orb
                i = i + 1
            end if
        end do
        if (tkPntSym) then
            call getsym_wrapper(session%nI, session%nISym)
        end if
        session%tInitialised = .true.
    end function InitExcitGenSession