anchor.diff:  
       end subroutine simple_annihilation
   
  +    subroutine update_shift(nparticles_old, nparticles)
  +
  +        ! Update the shift according to:
  +        !  shift(beta) = shift(beta-A*tau) - xi*log(N_w(tau)/N_w(beta-A*tau))/(A*tau)
  +        ! where
  +        !  shift(beta) is the shift at imaginary time beta,
  +        !  A*tau is the amount of imaginary time between shift-updates (=ncycles),
  +        !  xi is a damping factor (0.05-0.10 is appropriate) to prevent large fluctations,
  +        !  N_w(beta) is the total number of particles at imaginary time beta.
  +        ! In:
  +        !    nparticles_old: N_w(beta-A*tau).
  +        !    nparticles: N_w(beta).
  +
  +        integer, intent(in) :: nparticles_old, nparticles
  +
  +        ! This should be changed into an input option when necessary.
  +        real(dp) :: shift_damping = 0.050_dp
  +
  +        shift = shift - log(real(nparticles,8)/nparticles_old)*shift_damping/(tau*ncycles)
  +
  +    end subroutine update_shift
  +
   end module simple_fciqmc
  
positive.code:                 spawned_walker_population = 0
  
                  ! Consider all walkers.
                  spawndie: do iwalker = 1, ndets
  
                      ! Simulate spawning.
                      spawning: do ipart = 1, abs(walker_population(iwalker))
                          ! Attempt to spawn from the current particle onto all
                          ! connected determinants.
                          call attempt_spawn(iwalker)
                      end do spawning
  
                      call simple_death(iwalker)
  
                  end do spawndie
  
                  call simple_annihilation()
  
  
negative.code:             ! Update the shift
              nparticles = sum(abs(walker_population))
              if (tVaryShift) then
                  call update_shift(nparticles_old, nparticles)
              end if
              nparticles_old = nparticles
              if (nparticles > target_particles) then
  