Type | Intent | Optional | 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 |
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