Gives me the sign to fill the anti-symmetric molcas RDM with
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | p | |||
integer, | intent(in) | :: | q | |||
integer, | intent(in) | :: | r | |||
integer, | intent(in) | :: | s |
elemental function molcas_sign(p, q, r, s) result(sgn)
!! Gives me the sign to fill the anti-symmetric molcas RDM with
integer, intent(in) :: p, q, r, s
real(dp) :: sgn
character(*), parameter :: this_routine = "molcas_sign"
ASSERT(p /= q .and. r /= s)
sgn = merge(-1.0_dp, 1.0_dp, p < q .neqv. r < s)
end function molcas_sign