anchor.diff:                          ! estimator.  See comments in spawning.F90 for why we
                           ! must divide through by the probability of selecting
                           ! the cluster.
  -                        call update_proj_energy_ptr(cdet, cluster%cluster_to_det_sign*cluster%amplitude/cluster%pselect)
  -
  -                        call spawner_ccmc(rng(it), cdet, cluster, nspawned, connection)
  +                        call update_proj_energy_ptr(cdet(it), &
  +                                 cluster(it)%cluster_to_det_sign*cluster(it)%amplitude/cluster(it)%pselect)
  +
  +                        call spawner_ccmc(rng(it), cdet(it), cluster(it), nspawned, connection)
   
                           if (nspawned /= 0) then
  -                            call create_spawned_particle_ptr(cdet, connection, nspawned, spawned_pop)
  +                            call create_spawned_particle_ptr(cdet(it), connection, nspawned, spawned_pop)
                           end if
   
                           ! Does the cluster collapsed onto D0 produce
                           ! a determinant is in the truncation space?  If so, also
                           ! need to attempt a death/cloning step.
  -                        if (cluster%excitation_level <= truncation_level) call stochastic_ccmc_death(rng(it), cdet, cluster)
  +                        if (cluster(it)%excitation_level <= truncation_level) then
  +                            call stochastic_ccmc_death(rng(it), cdet(it), cluster(it))
  +                        end if
   
                       end if
   
  
positive.code:                 ! test.  Please feel free to improve...
                  !$omp parallel private(it)
                  it = get_thread_id()
                  !$omp do private(cdet, cluster, it) schedule(dynamic,200)
                  do iattempt = 1, nattempts
  
                      call select_cluster(rng(it), nattempts, D0_pos, cumulative_abs_pops, tot_abs_pop, max_cluster_size, &
                                          cdet, cluster)
  
                      if (cluster%excitation_level <= truncation_level+2) then
  
                          ! FCIQMC calculates the projected energy exactly.  To do
                          ! so in CCMC would involve enumerating over all pairs of
  
negative.code: 
          if (dump_restart_file) call dump_restart(mc_cycles_done, nparticles_old(1))
  
          ! TODO: deallocation...
  !        call dealloc_det_info(cdet)
  !        cdet%cluster => NULL()
  !        deallocate(cluster%excitors, stat=ierr)
  !        call check_deallocate('cluster%excitors', ierr)
  
      end subroutine do_ccmc
  
  