anchor.diff:  
               if (nspawn > 0) then
   
  -                ! 5. If H_ij is positive, then the spawned walker is of opposite
  +                ! 4. If H_ij is positive, then the spawned walker is of opposite
                   ! sign to the parent, otherwise the spawned walkers if of the same
                   ! sign as the parent.
                   if (hmatel_ki*hmatel_jk > 0.0_p) then
  
positive.code: 
  
      subroutine fs_spawner(cdet, parent_sign, nspawn, connection)
          ! Attempt to spawn a new particle on a twice connected determinant according to
          ! the fsfciqmc algorithm for a given system
          !
          ! In:
  
negative.code:         real(p)          :: choose_double_elt_type
          
          ! P_gen (k|i) and P_gen (j|k)
          real(p)          :: Pgen_ki, Pgen_jk 
          real(p)          :: hmatel_ki, hmatel_jk
          real(p)          :: pspawn
          real(p)          :: connection_ki, connection_jk
          real(p)          :: psuccess, pspawn, pgen, hmatel
          type(det_info)   :: cdet_excit
  
          ! we need pointers to:
          !      -function that generates an exited determinant, pgen and hmatel for the given system
          !         (system_gen_excit_ptr)
          !      -random number generator function
          !         (rng_ptr)
          !      -function that generates a diagonal matrix element
          !         (system_sc0_ptr)
          !      -
          !      -
          ! specific to imperial code:
          !      -function that creates an excited determinant (create_excited_det)
          !      -types excit, cdet
          !      -
  
          
          
          ! 0. Choose the type of double element you're going to spawn 
          choose_double_elt_type = rng_ptr()
          
          ! **We want to choose the largest probability first, since this will reduce the number of if statement calls, 
          ! **however, the values of P__ etc will ideally be reference-determinant dependent, what is the best way to order this sequence?**
  
  
  
  elttype:if(choose_double_elt_type <= P__ ) then
              
              !      __   __ 
              !    ./  \./  \.
              !    i    k    j
              !
              !    i __
              !    ./  \.
              !     \__/ k
              !    j   
  
              ! 1.1 Generate first random excitation and probability of spawning there from cdet 
              call system_gen_excit_ptr(cdet, Pgen_ki, connection_ki, hmatel_ki)
  
              ! 1.2 Generate the second random excitation 
              ! (i)  generate the first excited determinant  
              call create_excited_det(cdet, connection_ki, cdet_excit)
              ! (ii) excite again
              call system_gen_excit_ptr(cdet_excit, Pgen_jk, connection_jk, hmatel_jk)
  
  
  
              ! 2. Probability of gening...
              pgen = P__ * Pgen_ki * Pgen_jk
              pspawn = tau*abs(hmatel_ki*hmatel_jk)/pgen
              
              ! 3. Attempt spawning.
              psuccess = rng_ptr()
  
              ! Need to take into account the possibilty of a spawning attempt
  