anchor.diff:                  call convert_excitor_to_determinant(cdet%f, cluster%excitation_level, cluster%cluster_to_det_sign)
   
                   ! Normalisation factor for cluster%amplitudes...
  -                cluster%amplitude = real(cluster_population,p)/(D0_normalisation**(cluster%nexcitors-1)) ! TODO: don't accumulate D0 over report loops
  +                cluster%amplitude = real(cluster_population,p)/(D0_normalisation**(cluster%nexcitors-1))
                   ! Factorial due to the series expansion of exp(\hat{T}).
                   cluster%amplitude = cluster%amplitude/factorial(cluster%nexcitors)
  -
  -                ! We chose excitors uniformly.
  -                !  -> prob. of each excitor is 1./(number of excitors on processor).
  -                ! Overall probability is the product of this times the number of
  -                ! ways the cluster could have been selected, ie
  -                !   n_s!/n_excitors^n_s
  -                cluster%pselect = (cluster%pselect*factorial(cluster%nexcitors))/(tot_walkers**cluster%nexcitors)
               else
                   ! Simply set excitation level to a too high (fake) level to avoid
                   ! this cluster being used.
  
positive.code:             ! Must be the reference.
              cdet%f = f0
              cluster%excitation_level = 0
              cluster%amplitude = D0_normalisation ! TODO: don't accumulate D0 over report loops
              cluster%cluster_to_det_sign = 1
              ! Only one cluster of this size to choose => p_clust = 1
          case default
              ! Select cluster from the excitors on the current processor in
              ! a uniform manner.
              ! First excitor 'seeds' the cluster:
              pos = int(genrand_real2()*tot_walkers) +1
              cdet%f = walker_dets(:,pos)
              cluster_population = walker_population(1,pos)
              cluster%excitors(1)%f => walker_dets(:,pos)
              if (all(walker_dets(:,pos) == f0)) then
                  ! Not allowed to select the reference as it is not an excitor.
                  ! Return a null cluster.
                  cluster_population = 0
              else
                  ! Now the rest...
                  do i = 2, cluster%nexcitors
                      ! Select a position between in the excitors list.
                      pos = int(genrand_real2()*tot_walkers) + 1
                      ! Not allowed to select the reference...
                      if (all(walker_dets(:,pos) == f0)) then
                          cluster_population = 0
                      else
                          cluster%excitors(i)%f => walker_dets(:,pos)
                          call collapse_cluster(walker_dets(:,pos), walker_population(1,pos), cdet%f, cluster_population)
                      end if
                      if (cluster_population == 0) exit
                  end do
              end if
  
              if (cluster_population /= 0) cluster%excitation_level = get_excitation_level(f0, cdet%f)
              ! To contribute the cluster must be within a double excitation of
  
negative.code: 
      end subroutine do_ccmc
  
      subroutine select_cluster(nattempts, D0_pos, cdet, cluster)
  
          ! Select a random cluster of excitors from the excitors on the
          ! processor.  A cluster of excitors is itself an excitor.  For clarity
  