anchor.diff:              pcluster = pcluster/(1.0_p - psize)
           end if
   
  -        valid_cluster = .true.
           select case(cluster_size)
           case(0)
               ! Must be the reference.
  
positive.code: 
      end subroutine collapse_cluster
  
  end module ccmc
  
negative.code:             ! First excitor 'seeds' the cluster:
              pos = int(genrand_real2()*tot_walkers) +1
              cdet%f = walker_dets(:,pos)
              cluster_population = walker_population(1,pos)
              ! Now the rest...
              do i = 2, cluster_size
                  ! Select a position between in the excitors list.
                  pos = int(genrand_real2()*tot_walkers) + 1
                  call collapse_cluster(walker_dets(:,pos), walker_population(1,pos), cdet%f, cluster_population)
                  if (cluster_population == 0) exit
              end do
  
              excitation_level = get_excitation_level(f0, cdet%f)
              ! To contribute the cluster must be within a double excitation of
              ! the maximum excitation included in the CC wavefunction.
              if (excitation_level > truncation_level+2) cluster_population = 0
  
              if (cluster_population /= 0) then
                  ! Sign change due to difference between determinant
                  ! representation and excitors and excitation level.
                  call convert_excitor_to_determinant(cdet%f, excitation_level, cluster_population)
  
                  ! Normalisation factor for amplitudes...
                  amplitude = real(cluster_population,p)/(D0_population**(cluster_size-1)) ! TODO: don't accumulate D0 over report loops
  
                  ! 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
                  pcluster = (pcluster*factorial(cluster_size))/(tot_walkers**cluster_size)
              end if
  
          end select
  
          ! Fill in information about the cluster if required.
          if (cluster_population /= 0) then
              call decoder_ptr(cdet%f, cdet)
          else
              ! Simply set excitation level to a too high (fake) level to avoid
  