extract_molcas_1_rdm_index Subroutine

public pure subroutine extract_molcas_1_rdm_index(pq, p, q)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: pq
integer, intent(out) :: p
integer, intent(out) :: q

Contents


Source Code

    pure subroutine extract_molcas_1_rdm_index(pq, p, q)
        ! function which extracts the orbital indices following molcas
        ! convention
        integer, intent(in) :: pq
        integer, intent(out) :: p, q

        p = int(ceiling(-0.5 + sqrt(2.0 * pq)))
        q = pq - p * (p - 1) / 2

    end subroutine extract_molcas_1_rdm_index