Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | pqrs | |||
integer, | intent(out) | :: | p | |||
integer, | intent(out) | :: | q | |||
integer, | intent(out) | :: | r | |||
integer, | intent(out) | :: | s | |||
integer, | intent(out), | optional | :: | pq_out | ||
integer, | intent(out), | optional | :: | rs_out |
pure subroutine extract_molcas_2_rdm_index(pqrs, p, q, r, s, pq_out, rs_out)
! function using the molcas 2 rdm index convention
integer, intent(in) :: pqrs
integer, intent(out) :: p, q, r, s
integer, intent(out), optional :: pq_out, rs_out
integer :: pq, rs
call extract_molcas_1_rdm_index(pqrs, pq, rs)
call extract_molcas_1_rdm_index(pq, p, q)
call extract_molcas_1_rdm_index(rs, r, s)
if (present(pq_out)) pq_out = pq
if (present(rs_out)) rs_out = rs
end subroutine extract_molcas_2_rdm_index