cc_doubles_factor Function

public function cc_doubles_factor() result(factor)

Arguments

None

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function cc_doubles_factor() result(factor)
        real(dp) :: factor

        real(dp) :: fac_triples, fac_quads, weight

        weight = 1.0_dp / 4.0_dp

        ! essentiall we would need the triples influence too..
        ! but Manu said this is not necessary.. hm.. lets try
        if (cc_amp_norm(norm_comp, 3) < EPS) then
            fac_triples = 0.0_dp
            weight = 0.0_dp
        else
            fac_triples = min(AllEXLEVEL_WNorm(0, 3, 1) / &
                              cc_amp_norm(norm_comp, 3), 1.0_dp)
        end if

        if (cc_amp_norm(norm_comp, 4) < EPS) then
            fac_quads = 0.0_dp
            weight = 1.0_dp
        else
            fac_quads = min(AllEXLEVEL_WNorm(0, 4, 1) / &
                            cc_amp_norm(norm_comp, 4), 1.0_dp)

        end if

        factor = 1.0_dp - (weight * fac_triples + (1.0_dp - weight) * fac_quads)

    end function cc_doubles_factor