print_spinfree_2rdm_wrapper Subroutine

public subroutine print_spinfree_2rdm_wrapper(rdm_defs, rdm, rdm_recv, spawn, rdm_trace)

Uses

Arguments

Type IntentOptional Attributes Name
type(rdm_definitions_t), intent(in) :: rdm_defs
type(rdm_list_t), intent(in) :: rdm
type(rdm_list_t), intent(inout) :: rdm_recv
type(rdm_spawn_t), intent(inout) :: spawn
real(kind=dp), intent(in) :: rdm_trace(rdm%sign_length)

Contents


Source Code

    subroutine print_spinfree_2rdm_wrapper(rdm_defs, rdm, rdm_recv, spawn, rdm_trace)

        ! A wrapper function to take in an RDM object, in a form as accumulated
        ! during an FCIQMC simulation, and print it in a form consistent for
        ! MPQC to read in. To do this, it must call the additional routine,
        ! create_spinfree_2rdm, to make the spinfree 2-RDM itself (see that
        ! routine for a definition). The spinfree 2-RDM is stored in rdm_recv,
        ! which is then printed to a file.

        use hash, only: clear_hash_table
        use rdm_data, only: rdm_definitions_t

        type(rdm_definitions_t), intent(in) :: rdm_defs
        type(rdm_list_t), intent(in) :: rdm
        type(rdm_list_t), intent(inout) :: rdm_recv
        type(rdm_spawn_t), intent(inout) :: spawn
        real(dp), intent(in) :: rdm_trace(rdm%sign_length)

        spawn%free_slots = spawn%init_free_slots(0:nProcessors - 1)
        call clear_hash_table(spawn%rdm_send%hash_table)

        call create_spinfree_2rdm(rdm, rdm_defs%nrdms_standard, spawn, rdm_recv)
        call print_spinfree_2rdm(rdm_defs, rdm_recv, rdm_trace)

    end subroutine print_spinfree_2rdm_wrapper