extract_sign_rdm Subroutine

public pure subroutine extract_sign_rdm(rdm_entry, real_sign)


Type IntentOptional Attributes Name
integer(kind=int_rdm), intent(in) :: rdm_entry(0:)
real(kind=dp), intent(out) :: real_sign(size(rdm_entry)-1)


Source Code

Source Code

    pure subroutine extract_sign_rdm(rdm_entry, real_sign)

        ! Extract and decode the RDM sign stored in rdm_entry. This input
        ! entry has kind int_rdm, and contains the encoded spin orbital labels
        ! in the 0'th element. We want just the other elements, and in their
        ! real(dp) form.

        integer(int_rdm), intent(in) :: rdm_entry(0:)
        real(dp), intent(out) :: real_sign(size(rdm_entry) - 1)
        integer(int_rdm) :: int_sign(size(rdm_entry) - 1)

        int_sign = rdm_entry(1:size(int_sign))
        real_sign = transfer(int_sign, real_sign)

    end subroutine extract_sign_rdm