anchor.diff:  
           ! Conserve symmetry (spatial and spin) in selecting a.
           ims = (basis_fns(i)%Ms+3)/2
  -        isym = basis_fns(i)%sym
  +        isym = cross_product_pg_sym(basis_fns(i)%sym,op_sym)
           ind = int(nbasis_sym_spin(ims,isym)*genrand_real2())+1
           if (nbasis_sym_spin(ims,isym) == 0) then
               ! No orbitals with the correct symmetry.
  
positive.code:         ! inefficient for small/symmetry constrained systems.
          !
          ! In:
          !    f: bit string representation of the Slater determinant from which
          !        an electron is excited.
          !    occ_list: integer list of occupied spin-orbitals in the determinant.
  
negative.code: 
          use basis, only: basis_fns
          use system, only: nel, sym0
          use point_group_symmetry, only: cross_product_pg_sym
  
          real(p) :: pgen
          integer, intent(in) :: op_sym
          integer, intent(in) :: occ_list(nel), symunocc(:,sym0:), a
  
          integer :: ims, isym, i, ni
  
          ! The generation probability, pgen, is:
          !   pgen = p_single p(i) p(a|i)
          !        = p_single 1/n_i 1/symunocc(ms_i, sym_i)
          ! where n_i is the number of electrons which have at least one possbile
          ! excitation.
  
          ni = nel
          do i = 1, nel
              ims = (basis_fns(occ_list(i))%Ms+3)/2
              isym = cross_product_pg_sym(basis_fns(occ_list(i))%sym, op_sym)
              if (symunocc(ims,isym) == 0) ni = ni - 1
          end do
  
  