anchor.diff:  
       pure function calc_pgen_single_mol_no_renorm(a) result(pgen)
   
  +        ! In:
  +        !    a: previously unoccupied orbital into which an electron is excited.
  +        ! Returns:
  +        !    The probability of generating the excitation i->a, where we select
  +        !    i uniformly from the list of occupied orbitals and a is selected
  +        !    from the list of orbitals (both occupied and unoccupied) which
  +        !    conserve spin and spatial symmetry.  Note that the probability is
  +        !    actually independent of i due to the uniform selection of i.
  +
  +        ! WARNING: We assume that the excitation is actually valid. 
  +        ! This routine does *not* calculate the correct probability that
  +        ! a forbidden excitation (e.g. due to a actually being occupied) is
  +        ! generated.  The correct way to handle those excitations is to
  +        ! explicitly reject them.  The generation probabilites of allowed
  +        ! excitations correctly take into account such rejected events.
  +
           use basis, only: basis_fns
           use fciqmc_data, only: pattempt_single
           use system, only: nel
  
positive.code: 
      pure function calc_pgen_double_mol_no_renorm(a, b, spin) result(pgen)
  
          ! WARNING: We assume that the excitation is actually valid. 
          ! This routine does *not* calculate the correct probability that
          ! a forbidden excitation (e.g. due to a or b actually being occupied) is
          ! generated.  The correct way to handle those excitations is to set
          ! hmatel to be zero.  The generation probabilites of allowed excitations
          ! correctly take into account events where a/b is occupied.  This
          ! problem arises because if a or b are actually occpied, then p(a|ijb)
          ! or p(b|ijb) = 0.  We do not handle such cases.
  
          use basis, only: basis_fns
          use fciqmc_data, only: pattempt_double
  
negative.code: !--- Select random orbitals in double excitations ---
  
      subroutine find_ab_mol(f, sym, spin, a, b, allowed_excitation)
  
          ! Select a random pair of orbitals to excite into as part of a double
          ! excitation, given that the (i,j) pair of orbitals to excite from have
          ! already been selected.  The spin and irreducible representation
          ! spanned by the fourth orbital is completely determined by the choice
          ! of the first three orbitals in the double excitation.  This routine
          ! does not explicitly reject excitations where the fourth orbital chosen
          ! is already occupied, instead returning allowed_excitation as false.
          ! This makes the excitation generation and calculation of the generation
          ! probability simpler and faster at the cost of makin the sampling
          ! substantially more inefficient.  Nevertheless, this approach can be
          ! useful in large systems.
          ! 
          ! In:
          !    f: bit string representation of the Slater determinant from which
          !        an electron is excited.
          !    sym: irreducible representation spanned by the (i,j) codensity.
          !    spin: spin label of the selected (i,j) pair.  Set to -2 if both ia
          !        and j are down, +2 if both are up and 0 otherwise.
          ! Out:
          !    a, b: unoccupied orbitals into which electrons are excited.
          !        Note that a,b are ordered such that a<b.
          !        Not necessarily set if allowed_excitation is false.
          !    allowed_excitation: false if there are no possible (a,b) pairs
          !        which conserve spin and spatial symmetry given the choice of
          !        (i,j) or given the choice of (i,j,a).
  
          use basis, only: basis_length, basis_fns, bit_lookup, nbasis
          use system, only: nel, sym0, nsym
          use point_group_symmetry, only: cross_product_pg_sym, nbasis_sym_spin, sym_spin_basis_fns
  
          use dSFMT_interface, only: genrand_real2
  
          integer(i0), intent(in) :: f(basis_length)
          integer, intent(in) :: sym, spin, symunocc(:,sym0:)
          integer, intent(out) :: a, b
  
          use basis, only: basis_length, basis_fns, bit_lookup, nbasis
          use point_group_symmetry, only: nbasis_sym_spin, sym_spin_basis_fns, cross_product_pg_sym
  