molcas_sign Function

private elemental function molcas_sign(p, q, r, s) result(sgn)

Gives me the sign to fill the anti-symmetric molcas RDM with

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: p
integer, intent(in) :: q
integer, intent(in) :: r
integer, intent(in) :: s

Return Value real(kind=dp)


Contents

Source Code


Source Code

    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