spinKMatContrib Function

public function spinKMatContrib(i, j, k, l, s1, s2) result(matel)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: k
integer, intent(in) :: l
integer, intent(in) :: s1
integer, intent(in) :: s2

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function spinKMatContrib(i, j, k, l, s1, s2) result(matel)
        implicit none
        integer, intent(in) :: i, j, k, l, s1, s2
        real(dp) :: matel

        ! kMat enters the Hamiltonian with a negative sign - add here
        if (s1 == s2) then
            matel = -kMatAA%directElement(i, j, k, l)
        else
            matel = -kMatAB%directElement(i, j, k, l)
        end if
    end function spinKMatContrib