<commit_before>program hubbard_fciqmc

implicit none

call init_calc()

call run_calc()

call end_calc()

contains

    subroutine init_calc()

        ! Initialise the calculation.
        ! Print out information about the compiled executable, 
        ! read input options and initialse the system and basis functions
        ! to be used.

        use report, only: environment_report
        use parse_input, only: read_input, check_input, distribute_input
        use system, only: init_system, system_type, hub_real
        use hubbard, only: init_basis_fns
        use determinants, only: init_determinants
        use parallel, only: init_parallel, parallel_report, nprocs, parent
        use hubbard_real, only: init_real_space_hub
        use symmetry, only: init_symmetry
        use calc, only: t_fciqmc, tsimple, seed
        use fciqmc, only: init_fciqmc
        use simple_fciqmc, only: init_simple_fciqmc
        use dSFMT_interface, only: dSFMT_init

        call init_parallel()

        if (parent) then
            write (6,'(/,a8,/)') 'Hubbard'
            call environment_report()
        end if

        if (nprocs > 1 .and. parent) call parallel_report()

        if (parent) call read_input()

        call distribute_input()

        call init_system()

        call check_input()

        call init_basis_fns()

        call init_determinants()

        call init_symmetry()

        if (system_type == hub_real) call init_real_space_hub()

        if (t_fciqmc) then
            call dSFMT_init(seed)
            if (tsimple) then
                call init_simple_fciqmc()
            else
                call init_fciqmc()
            end if
        end if

    end subroutine init_calc

    subroutine run_calc()

        ! Run the calculation based upon the input options.
<commit_msg>RNG seed set in parallel.<commit_after>program hubbard_fciqmc

implicit none

call init_calc()

call run_calc()

call end_calc()

contains

    subroutine init_calc()

        ! Initialise the calculation.
        ! Print out information about the compiled executable, 
        ! read input options and initialse the system and basis functions
        ! to be used.

        use report, only: environment_report
        use parse_input, only: read_input, check_input, distribute_input
        use system, only: init_system, system_type, hub_real
        use hubbard, only: init_basis_fns
        use determinants, only: init_determinants
        use parallel, only: init_parallel, parallel_report, iproc, nprocs, parent
        use hubbard_real, only: init_real_space_hub
        use symmetry, only: init_symmetry
        use calc, only: t_fciqmc, tsimple, seed
        use fciqmc, only: init_fciqmc
        use simple_fciqmc, only: init_simple_fciqmc
        use dSFMT_interface, only: dSFMT_init

        call init_parallel()

        if (parent) then
            write (6,'(/,a8,/)') 'Hubbard'
            call environment_report()
        end if

        if (nprocs > 1 .and. parent) call parallel_report()

        if (parent) call read_input()

        call distribute_input()

        call init_system()

        call check_input()

        call init_basis_fns()

        call init_determinants()

        call init_symmetry()

        if (system_type == hub_real) call init_real_space_hub()

        if (t_fciqmc) then
            call dSFMT_init(seed + iproc)
            if (tsimple) then
                call init_simple_fciqmc()
            else
                call init_fciqmc()
            end if
        end if

    end subroutine init_calc

    subroutine run_calc()

        ! Run the calculation based upon the input options.

{'fraction_non_alphanumeric': 0.06251706251706252, 'fraction_numerical': 0.001638001638001638, 'mean_word_length': 2.2168568920105356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3473580', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1055, 'n_words': 332}