Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | pq | |||
integer, | intent(out) | :: | p | |||
integer, | intent(out) | :: | q |
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