lMatIndSpin Function

public pure function lMatIndSpin(i, j, k, a, b, c) result(index)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in), value :: i
integer(kind=int64), intent(in), value :: j
integer(kind=int64), intent(in), value :: k
integer(kind=int64), intent(in), value :: a
integer(kind=int64), intent(in), value :: b
integer(kind=int64), intent(in), value :: c

Return Value integer(kind=int64)


Contents

Source Code


Source Code

    pure function lMatIndSpin(i, j, k, a, b, c) result(index)
        ! Index functions that is symmetric with respect to swapping a<->i, b<->j and c<->k,
        ! as well as swapping (b,j)<->(c,k), but does not have the full ai,bj,ck, permutational
        ! symmetry
        ! Input: a,b,c - orbital indices of electrons
        !        i,j,k - orbital indices of holes
        ! Output: index - contiguous index I(a,b,c,i,j,k) with the aforementioned symmetry
        integer(int64), value, intent(in) :: i, j, k
        integer(int64), value, intent(in) :: a, b, c
        integer(int64) :: index
        integer(int64) :: ai, bj, ck

        ai = fuseIndex(a, i)
        bj = fuseIndex(b, j)
        ck = fuseIndex(c, k)

        index = ai + strideInner * fuseIndex(bj, ck)
    end function lMatIndSpin