check_fillRDM_DiDj Subroutine

public subroutine check_fillRDM_DiDj(rdm_defs, spawn, one_rdms, Spawned_No, iLutJ, realSignJ, tNonInits)

Arguments

Type IntentOptional Attributes Name
type(rdm_definitions_t), intent(in) :: rdm_defs
type(rdm_spawn_t), intent(inout) :: spawn
type(one_rdm_t), intent(inout) :: one_rdms(:)
integer, intent(in) :: Spawned_No
integer(kind=n_int), intent(in) :: iLutJ(0:NIfTot)
real(kind=dp), intent(in) :: realSignJ(lenof_sign)
logical, intent(in), optional :: tNonInits

Contents

Source Code


Source Code

    subroutine check_fillRDM_DiDj(rdm_defs, spawn, one_rdms, Spawned_No, iLutJ, realSignJ, &
                                  tNonInits)

        ! The spawned parts contain the Dj's spawned by the Di's in CurrentDets.
        ! If the SpawnedPart is found in the CurrentDets list, it means that
        ! the Dj has a non-zero cj - and therefore the Di.Dj pair will have a
        ! non-zero ci.cj to contribute to the RDM. The index i tells us where
        ! to look in the parent array, for the Di's to go with this Dj.

        use FciMCData, only: iLutHF_True
        use rdm_data, only: one_rdm_t, rdm_definitions_t

        type(rdm_definitions_t), intent(in) :: rdm_defs
        type(rdm_spawn_t), intent(inout) :: spawn
        type(one_rdm_t), intent(inout) :: one_rdms(:)
        integer, intent(in) :: Spawned_No
        integer(n_int), intent(in) :: iLutJ(0:NIfTot)
        real(dp), intent(in) :: realSignJ(lenof_sign)
        logical, intent(in), optional :: tNonInits
        logical :: tAllContribs

        ! optionally only sum in initiator contributions
        if (present(tNonInits)) then
            tAllContribs = tNonInits
        else
            tAllContribs = .true.
        end if

        if (.not. DetBitEQ(iLutHF_True, iLutJ, nifd)) then
            call DiDj_Found_FillRDM(rdm_defs, spawn, one_rdms, Spawned_No, &
                                    iLutJ, realSignJ, tAllContribs)
        end if

    end subroutine check_fillRDM_DiDj