Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | i | |||
integer, | intent(in) | :: | j |
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