type one_rdm_t
! The 1-RDM object itself.
real(dp), allocatable :: matrix(:, :)
! Eigenvalues of the 1-RDM.
real(dp), allocatable :: evalues(:)
! Arrays to hold the diagonal of the 1-RDM, and the Lagrangian.
real(dp), allocatable :: rho_ii(:)
real(dp), allocatable :: lagrangian(:, :)
integer :: rho_ii_tag, matrix_tag, evalues_tag
! In the 1-RDM matrix array, elements are not stored in the same order
! as the orbitals in the rest of the code. Instead, orbitals are
! reordered so that orbitals are first sorted by their symmetry label.
! sym_list_no(i) holds the position of the corresponding row/column
! in the RDM for orbital i. i.e. orbital i is mapped to sym_list_no(i).
integer, allocatable :: sym_list_no(:)
! The inverse of sym_list_no, i.e. what orbital does row or column i
! in the 1-RDM correspond to?
integer, allocatable :: sym_list_inv_no(:)
end type one_rdm_t