21#ifndef _libint2_src_bin_libint_cr11g12tig1211_h_
22#define _libint2_src_bin_libint_cr11g12tig1211_h_
25#include <generic_rr.h>
35 CR_11_G12TiG12_11<BFSet>, BFSet,
36 GenIntegralSet_11_11<BFSet, G12TiG12, mType> > {
43 static const unsigned int max_nchildren = 1;
52 using ParentType::target_;
53 using ParentType::RecurrenceRelation::expr_;
54 using ParentType::RecurrenceRelation::nflops_;
59 static std::string descr() {
return "CR"; }
61#if LIBINT_ENABLE_GENERIC_CODE
64 const std::shared_ptr<CompilationParameters>& cparams)
const override;
66 std::string generic_header()
const override {
return "GenericScale.h"; }
68 std::string generic_instance(
69 const std::shared_ptr<CodeContext>& context,
70 const std::shared_ptr<CodeSymbols>& args)
const override;
75CR_11_G12TiG12_11<F>::CR_11_G12TiG12_11(
const std::shared_ptr<TargetType>& Tint,
77 : ParentType(Tint, dir) {
79 using namespace libint2::algebra;
80 using namespace libint2::prefactor;
91 if (target_->oper()->descr().contracted())
return;
97 auto ab_G2_cd = factory.make_child(a, b, c, d, 0u, G2);
99 expr_ = Scalar(
"R12_2_G12_scale_to_G12T1G12") * ab_G2_cd;
105#if LIBINT_ENABLE_GENERIC_CODE
108 const std::shared_ptr<CompilationParameters>& cparams)
const {
109 F sh_a(target_->bra(0, 0));
110 F sh_b(target_->ket(0, 0));
111 F sh_c(target_->bra(1, 0));
112 F sh_d(target_->ket(1, 0));
113 const unsigned int max_opt_am = cparams->max_am_opt();
117 (sh_a.norm() > max_opt_am || sh_b.norm() > max_opt_am ||
118 sh_c.norm() > max_opt_am || sh_d.norm() > max_opt_am))
125 const std::shared_ptr<CodeContext>& context,
126 const std::shared_ptr<CodeSymbols>& args)
const {
127 std::ostringstream oss;
129 const bool vec = (context->cparams()->max_vector_length() != 1);
131 oss <<
"_libint2_static_api_scale_vec_short_(";
133 oss <<
"_libint2_static_api_scale_short_(";
135 const unsigned int nargs = args->n();
136 for (
unsigned int a = 0; a < nargs; a++) {
137 oss << args->symbol(a) <<
",";
140 oss << target_->size() <<
"*" << (vec ?
"inteval->veclen" :
"1")
141 <<
",inteval->R12_2_G12_scale_to_G12T1G12"
142 << (vec ?
",inteval->veclen" :
"[0]") <<
");";
149 std::list<std::string> forced_symbol;
150 forced_symbol.push_back(std::string(
"R12_2_G12_scale_to_G12T1G12"));
151 taskmgr.
current().symbols()->add(forced_symbol);
Set of basis functions.
Definition bfset.h:43
Compute relation for 2-e integrals of the G12_Ti_G12 operators.
Definition comp_11_g12tig12_11.h:36
static bool directional()
This relation is not directional.
Definition comp_11_g12tig12_11.h:48
Helps GenericRecurrenceRelation to work around the compiler problem with make_child.
Definition generic_rr.h:150
Generic integral over a two-body operator with one bfs for each particle in bra and ket.
Definition integral_11_11.h:36
GenOper is a single operator described by descriptor Descr.
Definition oper.h:164
RRImpl must inherit GenericRecurrenceRelation<RRImpl>
Definition generic_rr.h:47
bool is_simple() const override
Implementation of RecurrenceRelation::is_simple()
Definition generic_rr.h:81
static std::shared_ptr< RRImpl > Instance(const std::shared_ptr< TargetType > &Tint, unsigned int dir)
Return an instance if applicable, or a null pointer otherwise.
Definition generic_rr.h:55
Manages tasks. This is a Singleton.
Definition task.h:65
void current(const std::string &task_label)
Makes this task current (must have been added already)
Definition task.cc:63
static LibraryTaskManager & Instance()
LibraryTaskManager is a Singleton.
Definition task.cc:32
these objects help to construct BraketPairs
Definition src/bin/libint/braket.h:275
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24
TrivialBFSet<T> defines static member result, which is true if T is a basis function set consisting o...
Definition bfset.h:906