contract_molcas_1_rdm_index Function

public pure function contract_molcas_1_rdm_index(i, j) result(ij)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: j

Return Value integer


Contents


Source Code

    pure function contract_molcas_1_rdm_index(i, j) result(ij)
        ! function which uses the molcas RDM index convention
        integer, intent(in) :: i, j
        integer :: ij

        integer :: p, q

        p = max(i, j)
        q = min(i, j)

        ij = q + p * (p - 1) / 2

    end function contract_molcas_1_rdm_index