pure function convert_guga_to_ni(csf, siz) result(nI)
! function to make it easier for me to input a csf in my used notation
! to a nI NECI array..
integer, intent(in) :: siz
integer, intent(in) :: csf(siz)
integer :: nI(nel)
integer :: i, cnt_orbs, cnt_ind
cnt_orbs = 0
cnt_ind = 0
do i = 1, siz
select case (csf(i))
case (0)
! nothing to do actually except update the
case (1)
! beta orbital
cnt_ind = cnt_ind + 1
nI(cnt_ind) = cnt_orbs + 1
case (2)
! alpha orbs
cnt_ind = cnt_ind + 1
nI(cnt_ind) = cnt_orbs + 2
case (3)
! doubly occupied
cnt_ind = cnt_ind + 1
nI(cnt_ind) = cnt_orbs + 1
cnt_ind = cnt_ind + 1
nI(cnt_ind) = cnt_orbs + 2
end select
! update orbitals for every csf entry
cnt_orbs = cnt_orbs + 2
end do
end function convert_guga_to_ni