init_tau_search_conventional Subroutine

public subroutine init_tau_search_conventional()

Arguments

None

Contents


Source Code

    subroutine init_tau_search_conventional()
        ! Don't overwrite stats that were read from popsfile
        if (tau_start_val /= possible_tau_start%from_popsfile) then
            tau_search_stats = TauSearchConventionalStats_t()
        end if

        ! Are we considering parallel-spin bias in the doubles?
        ! Do this logic here, so that if we add opposite spin bias to more
        ! excitation generators, then there is only one place that this logic
        ! needs to be updated!
        if (tGen_4ind_weighted .or. tGen_4ind_2) then
            consider_par_bias = .true.
        else if (tGen_4ind_reverse) then
            consider_par_bias = .true.
        else if (t_k_space_hubbard .and. t_trans_corr_2body) then
            ! for the 2-body transcorrelated k-space hubbard we also have
            ! possible parallel excitations now. and to make the tau-search
            ! working we need to set this to true ofc:
            consider_par_bias = .true.
        else if (t_fci_pchb_excitgen .and. .not. tGUGA) then
            block
                type(FCI_PCHB_options_t) :: FCI_PCHB_options
                FCI_PCHB_options = decide_on_PCHB_options(FCI_PCHB_user_input, nBasis, nEl, tUHF)
                consider_par_bias = FCI_PCHB_options%doubles%particle_selection == FCI_PCHB_options_vals%doubles%particle_selection%UNIF_UNIF
            end block
        else if (tGAS) then
            if (GAS_exc_gen /= possible_GAS_exc_gen%PCHB) then
                consider_par_bias = .true.
            else
                block
                    use gasci_pchb_main, only: GAS_PCHB_user_input, decide_on_PCHB_options, GAS_PCHB_options_vals, GAS_PCHB_options_t
                    type(GAS_PCHB_options_t) :: GAS_PCHB_options
                    GAS_PCHB_options = decide_on_PCHB_options(GAS_PCHB_user_input, nBasis, nEl, tUHF)
                    consider_par_bias = GAS_PCHB_options%doubles%particle_selection == GAS_PCHB_options_vals%doubles%particle_selection%UNIF_UNIF
                end block
            end if
        else
            consider_par_bias = .false.
        end if

        ! If there are only a few electrons in the system, then this has
        ! impacts for the choices that can be made.
        if (nOccAlpha == 0 .or. nOccBeta == 0) then
            consider_par_bias = .false.
            pParallel = 1.0_dp
            tau_search_stats%enough_opp = .true.
        end if
        if (nOccAlpha == 1 .and. nOccBeta == 1) then
            consider_par_bias = .false.
            pParallel = 0.0_dp
            tau_search_stats%enough_par = .true.
        end if

        if (t_mixed_hubbard .or. t_olle_hubbard) then
            pParallel = 0.0_dp
        end if

        t_consider_par_bias = consider_par_bias

    end subroutine init_tau_search_conventional