subroutine fill_spawn_rdm_diag(spawn, nI, full_sign)
use rdm_data_utils, only: add_to_rdm_spawn_t
use SystemData, only: nel
type(rdm_spawn_t), intent(inout) :: spawn
integer, intent(in) :: nI(nel)
real(dp), intent(in) :: full_sign(spawn%rdm_send%sign_length)
integer :: iel, jel
! Looking at elements of the type Gamma(i,j,i,j).
do iel = 1, nel - 1
do jel = iel + 1, nel
associate(i => nI(iel), j => nI(jel))
call add_to_rdm_spawn_t(spawn, i, j, i, j, full_sign, .false.)
end associate
end do
end do
end subroutine fill_spawn_rdm_diag