anchor.diff:              ! See notes in system about how the Heisenberg model uses nel and
               ! nvirt.
               if (truncate_space) then
  -                sym_space_size = binom_i(nsites-(nel-truncation_level),truncation_level)
  +                sym_space_size = 0
  +                do i = 0, truncation_level
  +                    sym_space_size = sym_space_size + binom_i(nel, truncation_level)*binom_i(nsites-nel, truncation_level)
  +                end do
               else
                   sym_space_size = binom_i(nsites, nel)
               end if
  
positive.code:         integer, intent(in), optional :: occ_list0(nel)
  
          integer :: i, j, iel, ierr
          integer :: nalpha_combinations, nbeta_combinations
          integer :: sym_beta, sym, Ms
          integer(i0) :: f_alpha, f_beta, f0(basis_length), f(basis_length)
          integer, allocatable :: occ(:)
          integer :: k(ndim), k_beta(ndim)
  
          if (allocated(sym_space_size)) then
              deallocate(sym_space_size, stat=ierr)
  
negative.code:                 do i = 1, nbeta_combinations
  
                      ! Get beta orbitals.
                      call next_string(i==1, .false., nbasis/2, nbeta, d0%occ_list_beta, &
                                       d0%unocc_list_beta, truncation_level, comb(:,1),  &
                                       occ(1:nbeta), excit_level_beta)
  
                      ! Symmetry.
                      ! Have to treat the UEG as a special case as we don't consider
                      ! all possible symmetries for the UEG but rather only momenta
  