subroutine pick_orbitals_single_crude(ilut, nI, csf_i, excitInfo, pgen)
integer(n_int), intent(in) :: ilut(0:nifguga)
integer, intent(in) :: nI(nel)
type(CSF_Info_t), intent(in) :: csf_i
type(ExcitationInformation_t), intent(out) :: excitInfo
real(dp), intent(out) :: pgen
character(*), parameter :: this_routine = "pick_orbitals_single_crude"
integer :: elec, cc_i, ierr, nOrb, orb_i
real(dp), allocatable :: cum_arr(:)
real(dp) :: elec_factor
unused_var(ilut)
! first pick completely random from electrons only!
elec = 1 + floor(genrand_real2_dSFMT() * nEl)
! have to adjust pgen if it is a doubly occupied orbital afterwards
! -> since twice the chance to pick that orbital then!
! pick associated "spin orbital"
orb_i = nI(elec)
! get the symmetry index:
! since there is no spin restriction here have to consider both
! again
cc_i = ClassCountInd(1, SpinOrbSymLabel(orb_i), G1(orb_i)%Ml)
! get the number of orbitals in this symmetry sector
nOrb = OrbClassCount(cc_i)
allocate(cum_arr(nOrb), stat=ierr)
select case (csf_i%stepvector(gtID(orb_i)))
! der stepvalue sagt mir auch, ob es ein alpha oder beta
! elektron war..
! i have to change this for the crude implementation
case (1)
elec_factor = 1.0_dp
call gen_crude_guga_single_1(nI, csf_i, orb_i, cc_i, cum_arr)
case (2)
! to do
elec_factor = 1.0_dp
call gen_crude_guga_single_2(nI, csf_i, orb_i, cc_i, cum_arr)
case (3)
! adjust pgen, the chance to pick a doubly occupied with
! spinorbitals is twice as high..
elec_factor = 2.0_dp
call gen_crude_guga_single_3(nI, csf_i, orb_i, cc_i, cum_arr)
case default
call stop_all(this_routine, "should not have picked empty orbital")
end select
call stop_all(this_routine, "TODO")
pgen = 0.0_dp
end subroutine pick_orbitals_single_crude