function get_heisenberg_exchange(src, tgt) result(hel)
! this is the wrapper function to get the heisenberg exchange
! contribution. which will substitute get_umat in the
! necessary places..
! NOTE: only in the debug mode the neighboring condition is tested
! also that that both orbitals src and tgt are occupied by opposite
! spins have to be checked before this function call!
integer, intent(in) :: src, tgt
HElement_t(dp) :: hel
#ifdef DEBUG_
character(*), parameter :: this_routine = "get_heisenberg_exchange"
#endif
ASSERT(src > 0)
ASSERT(src <= nbasis)
ASSERT(tgt > 0)
ASSERT(tgt <= nbasis)
ASSERT(associated(lat))
! i also want to get 0 matrix elements ofc.. so leave the possibility
ASSERT(allocated(exchange_matrix))
hel = h_cast(exchange_matrix(src, tgt))
end function get_heisenberg_exchange