init_back_spawn Subroutine

public subroutine init_back_spawn()

Arguments

None

Contents

Source Code


Source Code

    subroutine init_back_spawn()
        ! init routine
        character(*), parameter :: this_routine = "init_back_spawn"

        ! also add some output so people know we use this method
        root_print "BACK-SPAWNING method in use! "
        if (t_back_spawn_flex) then
            root_print "Flex option in use: we pick the electrons randomly"
            root_print " and then decide, where to pick the orbitals from "
            root_print " depending where the electrons are relative to the ref"
        else
            root_print "For non-initiators we only pick electrons from the virtual"
            root_print " orbitals of the reference determinant!"
            root_print " so non-initiators only lower or keep the excitation level constant!"
        end if

        if (t_back_spawn_occ_virt) then
            root_print "additionally option to pick the first orbital (a) from "
            root_print " the occupied manifold of the reference is activated!"
        end if
        ! first it only makes sense if we actually use the initiator method
        if (.not. tTruncInitiator) then
            call stop_all(this_routine, &
                          "back spawning makes only sense in the initiator method!")
        end if

        if (.not. tGen_4ind_2) then
            if (.not. (tHub .or. tUEG)) then
                call stop_all(this_routine, &
                              "for molecular systems this back-spawning need 4ind-weighted-2 or above!")
            end if
        end if

        if (tGen_4ind_2_symmetric) then
            call stop_all(this_routine, &
                          "back-spawning not compatible with symmetric excitation generator!")
        end if

        if (tUEG .and. t_back_spawn) then
            if (.not. tUEGNewGenerator) then
                call stop_all(this_routine, &
                              "the old UEG excitation generator only works with back-spawn-flex")
            end if
        end if

        if (tReadPops) then
            if (back_spawn_delay /= 0) then
                root_print "WARNING: "
                root_print "Restarting from POPSFILE but using a delayed back-spawn! "
                root_print " Are you sure? "
            end if
        end if

        call setup_virtual_mask()

        ! also change the max excitation level calculated
        max_calc_ex_level = nel

    end subroutine init_back_spawn