truncate_initial_state Subroutine

public subroutine truncate_initial_state()

Arguments

None

Contents


Source Code

    subroutine truncate_initial_state
        use semi_stoch_procs, only: check_determ_flag
        use hash, only: hash_table_lookup, remove_hash_table_entry
        use FciMCData, only: HashIndex
        use bit_reps, only: nullify_ilut, decode_bit_det
        implicit none
        integer :: nI(nel), DetHash, PartInd
        integer(int64) :: i
        logical :: tSuccess

        do i = 1, TotWalkers
            if (.not. check_determ_flag(CurrentDets(:, i))) then
                call nullify_ilut(CurrentDets(:, i))
                call decode_bit_det(nI, CurrentDets(:, i))
                call hash_table_lookup(nI, CurrentDets(:, i), nifd, HashIndex, CurrentDets, &
                                       PartInd, DetHash, tSuccess)
                if (tSuccess) call remove_hash_table_entry(HashIndex, nI, PartInd)
            end if
        end do
    end subroutine truncate_initial_state