21#ifndef _libint2_src_bin_libint_vrr11twoprep11_h_
22#define _libint2_src_bin_libint_vrr11twoprep11_h_
24#include <generic_rr.h>
25#include <twoprep_11_11.h>
32 template <
class BFSet,
int part, FunctionPosition where>
35 GenIntegralSet_11_11<BFSet,TwoPRep,mType> >
43 static const unsigned int max_nchildren = 26;
51 using ParentType::RecurrenceRelation::expr_;
52 using ParentType::RecurrenceRelation::nflops_;
53 using ParentType::target_;
59 static std::string descr() {
return "OSVRR"; }
63 std::string generate_label()
const override
65 typedef typename TargetType::AuxIndexType
mType;
66 static SafePtr<mType> aux0(
new mType(0u));
67 std::ostringstream os;
68 os << descr() <<
"P" << part <<
to_string(where)
69 << genintegralset_label(target_->bra(),target_->ket(),aux0,target_->oper());
73 #if LIBINT_ENABLE_GENERIC_CODE
75 bool has_generic(
const SafePtr<CompilationParameters>& cparams)
const override;
77 std::string generic_header()
const override;
79 std::string generic_instance(
const SafePtr<CodeContext>& context,
const SafePtr<CodeSymbols>& args)
const override;
83 template <
class F,
int part, FunctionPosition where>
84 VRR_11_TwoPRep_11<F,part,where>::VRR_11_TwoPRep_11(
const SafePtr< TargetType >& Tint,
88 using namespace libint2::algebra;
89 using namespace libint2::prefactor;
91 const unsigned int m = Tint->aux()->elem(0);
92 const F& _1 = unit<F>(dir);
107 const OriginDerivative<3u> dA = Tint->bra(0,0).deriv();
108 const OriginDerivative<3u> dB = Tint->ket(0,0).deriv();
109 const OriginDerivative<3u> dC = Tint->bra(1,0).deriv();
110 const OriginDerivative<3u> dD = Tint->ket(1,0).deriv();
111 const bool deriv = !dA.zero() ||
117#if LIBINT_ENABLE_GENERIC_CODE
119 F sh_a(target_->bra(0,0));
120 F sh_b(target_->ket(0,0));
121 F sh_c(target_->bra(1,0));
122 F sh_d(target_->ket(1,0));
125 if (sh_b.zero() && sh_d.zero() &&
126 (sh_a.norm() > 1u && sh_c.norm() > 1u)
131 if (sh_a.zero() && sh_c.zero() &&
132 (sh_b.norm() > 1u && sh_d.norm() > 1u)
140 typedef TargetType ChildType;
141 ChildFactory<ThisType,ChildType> factory(
this);
143 bool part0_has_unit=
false, part1_has_unit=
false;
146 if (part == 0 && where == InBra) {
147 F a(Tint->bra(0,0) - _1);
149 F b(Tint->ket(0,0));
const bool unit_b = (b == F::unit()); part0_has_unit |= unit_b;
153 SafePtr<DGVertex> ABCD_m;
if (not unit_b) ABCD_m = factory.make_child(a,b,c,d,m);
154 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
157 expr_ = Vector(
"PA")[dir] * ABCD_m + Vector(
"WP")[dir] * ABCD_mp1; nflops_+=3;
160 expr_ = Vector(
"WP")[dir] * ABCD_mp1; nflops_+=1;
165 const bool ahlrichs_simplification = a.pure_sh() && unit_b;
167 if (
exists(am1) && not ahlrichs_simplification) {
168 auto Am1BCD_m = factory.make_child(am1,b,c,d,m);
169 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
170#if LIBINT_GENERATE_FMA
172 if (is_simple()) { expr_ -= Scalar(a[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * Am1BCD_mp1 - Am1BCD_m); nflops_+=5; }
174 if (is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2z") * (Am1BCD_m - Scalar(
"roz") * Am1BCD_mp1); nflops_+=5; }
177 const F& bm1 = b - _1;
179 auto ABm1CD_m = factory.make_child(a,bm1,c,d,m);
180 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
181#if LIBINT_GENERATE_FMA
183 if (is_simple()) { expr_ -= Scalar(b[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * ABm1CD_mp1 - ABm1CD_m); nflops_+=5; }
185 if (is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2z") * (ABm1CD_m - Scalar(
"roz") * ABm1CD_mp1); nflops_+=5; }
188 const F& cm1 = c - _1;
190 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
191 if (is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2ze") * ABCm1D_mp1; nflops_+=3; }
193 const F& dm1 = d - _1;
195 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
196 if (is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2ze") * ABCDm1_mp1; nflops_+=3; }
200 if (part == 0 && where == InKet) {
201 F a(Tint->bra(0,0));
const bool unit_a = (a == F::unit()); part0_has_unit |= unit_a;
202 F b(Tint->ket(0,0) - _1);
207 SafePtr<DGVertex> ABCD_m;
if (not unit_a) ABCD_m = factory.make_child(a,b,c,d,m);
208 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
211 expr_ = Vector(
"PB")[dir] * ABCD_m + Vector(
"WP")[dir] * ABCD_mp1; nflops_+=3;
214 expr_ = Vector(
"WP")[dir] * ABCD_mp1; nflops_+=1;
218 const F& am1 = a - _1;
220 auto Am1BCD_m = factory.make_child(am1,b,c,d,m);
221 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
222#if LIBINT_GENERATE_FMA
224 if (is_simple()) { expr_ -= Scalar(a[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * Am1BCD_mp1 - Am1BCD_m); nflops_+=5; }
226 if (is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2z") * (Am1BCD_m - Scalar(
"roz") * Am1BCD_mp1); nflops_+=5; }
230 const bool ahlrichs_simplification = b.pure_sh() && unit_a;
231 const F& bm1 = b - _1;
232 if (
exists(bm1) && not ahlrichs_simplification) {
233 auto ABm1CD_m = factory.make_child(a,bm1,c,d,m);
234 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
235#if LIBINT_GENERATE_FMA
237 if (is_simple()) { expr_ -= Scalar(b[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * ABm1CD_mp1 - ABm1CD_m); nflops_+=5; }
239 if (is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2z") * (ABm1CD_m - Scalar(
"roz") * ABm1CD_mp1); nflops_+=5; }
242 const F& cm1 = c - _1;
244 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
245 if (is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2ze") * ABCm1D_mp1; nflops_+=3; }
247 const F& dm1 = d - _1;
249 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
250 if (is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2ze") * ABCDm1_mp1; nflops_+=3; }
254 if (part == 1 && where == InBra) {
257 F c(Tint->bra(1,0) - _1);
259 F d(Tint->ket(1,0));
const bool unit_d = (d == F::unit()); part1_has_unit |= unit_d;
261 SafePtr<DGVertex> ABCD_m;
if (not unit_d) ABCD_m = factory.make_child(a,b,c,d,m);
262 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
265 expr_ = Vector(
"QC")[dir] * ABCD_m + Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=3;
268 expr_ = Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=1;
273 const bool ahlrichs_simplification = c.pure_sh() && unit_d;
274 const F& cm1 = c - _1;
275 if (
exists(cm1) && not ahlrichs_simplification) {
276 auto ABCm1D_m = factory.make_child(a,b,cm1,d,m);
277 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
278#if LIBINT_GENERATE_FMA
280 if (is_simple()) { expr_ -= Scalar(c[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCm1D_mp1 - ABCm1D_m); nflops_+=5; }
282 if (is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2e") * (ABCm1D_m - Scalar(
"roe") * ABCm1D_mp1); nflops_+=5; }
285 const F& dm1 = d - _1;
287 auto ABCDm1_m = factory.make_child(a,b,c,dm1,m);
288 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
289#if LIBINT_GENERATE_FMA
291 if (is_simple()) { expr_ -= Scalar(d[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCDm1_mp1 - ABCDm1_m); nflops_+=5; }
293 if (is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2e") * (ABCDm1_m - Scalar(
"roe") * ABCDm1_mp1); nflops_+=5; }
296 const F& am1 = a - _1;
298 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
299 if (is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2ze") * Am1BCD_mp1; nflops_+=3; }
301 const F& bm1 = b - _1;
303 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
304 if (is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2ze") * ABm1CD_mp1; nflops_+=3; }
308 if (part == 1 && where == InKet) {
311 F c(Tint->bra(1,0));
const bool unit_c = (c == F::unit()); part1_has_unit |= unit_c;
312 F d(Tint->ket(1,0) - _1);
315 SafePtr<DGVertex> ABCD_m;
if (not unit_c) ABCD_m = factory.make_child(a,b,c,d,m);
316 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
319 expr_ = Vector(
"QD")[dir] * ABCD_m + Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=3;
322 expr_ = Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=1;
326 const F& cm1 = c - _1;
328 auto ABCm1D_m = factory.make_child(a,b,cm1,d,m);
329 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
330#if LIBINT_GENERATE_FMA
332 if (is_simple()) { expr_ -= Scalar(c[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCm1D_mp1 - ABCm1D_m); nflops_+=5; }
334 if (is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2e") * (ABCm1D_m - Scalar(
"roe") * ABCm1D_mp1); nflops_+=5; }
338 const bool ahlrichs_simplification = d.pure_sh() && unit_c;
339 const F& dm1 = d - _1;
340 if (
exists(dm1) && not ahlrichs_simplification) {
341 auto ABCDm1_m = factory.make_child(a,b,c,dm1,m);
342 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
343#if LIBINT_GENERATE_FMA
345 if (is_simple()) { expr_ -= Scalar(d[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCDm1_mp1 - ABCDm1_m); nflops_+=5; }
347 if (is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2e") * (ABCDm1_m - Scalar(
"roe") * ABCDm1_mp1); nflops_+=5; }
350 const F& am1 = a - _1;
352 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
353 if (is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2ze") * Am1BCD_mp1; nflops_+=3; }
355 const F& bm1 = b - _1;
357 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
358 if (is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2ze") * ABm1CD_mp1; nflops_+=3; }
366 F a( part == 0 && where == InBra ? Tint->bra(0,0) - _1 : Tint->bra(0,0) );
367 F b( part == 0 && where == InKet ? Tint->ket(0,0) - _1 : Tint->ket(0,0) );
368 F c( part == 1 && where == InBra ? Tint->bra(1,0) - _1 : Tint->bra(1,0) );
369 F d( part == 1 && where == InKet ? Tint->ket(1,0) - _1 : Tint->ket(1,0) );
374 for(
unsigned int dxyz=0; dxyz<3; ++dxyz) {
376 if (is_simple() && dxyz != dir)
379 OriginDerivative<3u> _d1; _d1.inc(dxyz);
381 SafePtr<DGVertex> _nullptr;
385 const OriginDerivative<3u> dAm1(dA - _d1);
388 auto ABCD_m = (part == 0 && not part0_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
389 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
391 if (part == 0 && where == InBra) {
392 if (not part0_has_unit) {
393 expr_ -= Vector(dA)[dxyz] * (Scalar(
"rho12_over_alpha1") * ABCD_m + Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
396 expr_ -= Vector(dA)[dxyz] * (Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
399 if (part == 0 && where == InKet) {
400 if (not part0_has_unit) {
401 expr_ += Vector(dA)[dxyz] * (Scalar(
"rho12_over_alpha2") * ABCD_m - Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
404 expr_ -= Vector(dA)[dxyz] * (Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
408 expr_ += Vector(dA)[dxyz] * Scalar(
"alpha1_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
416 const OriginDerivative<3u> dBm1(dB - _d1);
419 auto ABCD_m = (part == 0 && not part0_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
420 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
422 if (part == 0 && where == InBra) {
423 if (not part0_has_unit) {
424 expr_ += Vector(dB)[dxyz] * (Scalar(
"rho12_over_alpha1") * ABCD_m - Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
427 expr_ -= Vector(dB)[dxyz] * (Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
430 if (part == 0 && where == InKet) {
431 if (not part0_has_unit) {
432 expr_ -= Vector(dB)[dxyz] * (Scalar(
"rho12_over_alpha2") * ABCD_m + Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
435 expr_ -= Vector(dB)[dxyz] * (Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
439 expr_ += Vector(dB)[dxyz] * Scalar(
"alpha2_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
447 const OriginDerivative<3u> dCm1(dC - _d1);
450 auto ABCD_m = (part == 1 && not part1_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
451 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
454 expr_ += Vector(dC)[dxyz] * Scalar(
"alpha3_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
455 if (part == 1 && where == InBra) {
456 if (not part1_has_unit) {
457 expr_ -= Vector(dC)[dxyz] * (Scalar(
"rho34_over_alpha3") * ABCD_m + Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
460 expr_ -= Vector(dC)[dxyz] * (Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
463 if (part == 1 && where == InKet) {
464 if (not part1_has_unit) {
465 expr_ += Vector(dC)[dxyz] * (Scalar(
"rho34_over_alpha4") * ABCD_m - Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
468 expr_ -= Vector(dC)[dxyz] * (Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
478 const OriginDerivative<3u> dDm1(dD - _d1);
481 auto ABCD_m = (part == 1 && not part1_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
482 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
485 expr_ += Vector(dD)[dxyz] * Scalar(
"alpha4_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
486 if (part == 1 && where == InBra) {
487 if (not part1_has_unit) {
488 expr_ += Vector(dD)[dxyz] * (Scalar(
"rho34_over_alpha3") * ABCD_m - Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
491 expr_ -= Vector(dD)[dxyz] * (Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
494 if (part == 1 && where == InKet) {
495 if (not part1_has_unit) {
496 expr_ -= Vector(dD)[dxyz] * (Scalar(
"rho34_over_alpha4") * ABCD_m + Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
499 expr_ -= Vector(dD)[dxyz] * (Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
512#if LIBINT_ENABLE_GENERIC_CODE
513 template <
class F,
int part, FunctionPosition where>
515 VRR_11_TwoPRep_11<F,part,where>::has_generic(
const SafePtr<CompilationParameters>& cparams)
const
517 if (TrivialBFSet<F>::result)
520 F sh_a(target_->bra(0,0));
521 F sh_b(target_->ket(0,0));
522 F sh_c(target_->bra(1,0));
523 F sh_d(target_->ket(1,0));
524 const unsigned int max_opt_am = cparams->max_am_opt();
527 if (sh_b.zero() && sh_d.zero() &&
528 (sh_a.norm() > std::max(2*max_opt_am,1u) ||
529 sh_c.norm() > std::max(2*max_opt_am,1u)
531 (sh_a.norm() > 1u && sh_c.norm() > 1u)
536 if (sh_a.zero() && sh_c.zero() &&
537 (sh_b.norm() > std::max(2*max_opt_am,1u) ||
538 sh_d.norm() > std::max(2*max_opt_am,1u)
540 (sh_b.norm() > 1u && sh_d.norm() > 1u)
548 template <
class F,
int part, FunctionPosition where>
550 VRR_11_TwoPRep_11<F,part,where>::generic_header()
const
552 F sh_a(target_->bra(0,0));
553 F sh_b(target_->ket(0,0));
554 F sh_c(target_->bra(1,0));
555 F sh_d(target_->ket(1,0));
556 const bool xsxs = sh_b.zero() && sh_d.zero();
557 const bool sxsx = sh_a.zero() && sh_c.zero();
559 const OriginDerivative<3u> dA = target_->bra(0,0).deriv();
560 const OriginDerivative<3u> dB = target_->ket(0,0).deriv();
561 const OriginDerivative<3u> dC = target_->bra(1,0).deriv();
562 const OriginDerivative<3u> dD = target_->ket(1,0).deriv();
563 const bool deriv = !dA.zero() ||
569 if (xsxs)
return std::string(
"OSVRR_xs_xs.h");
570 if (sxsx)
return std::string(
"OSVRR_sx_sx.h");
573 if (xsxs)
return std::string(
"OSVRR_xs_xs_deriv.h");
574 if (sxsx)
return std::string(
"OSVRR_sx_sx_deriv.h");
579 template <
class F,
int part, FunctionPosition where>
581 VRR_11_TwoPRep_11<F,part,where>::generic_instance(
const SafePtr<CodeContext>& context,
const SafePtr<CodeSymbols>& args)
const
583 std::ostringstream oss;
584 F sh_a(target_->bra(0,0));
585 F sh_b(target_->ket(0,0));
586 F sh_c(target_->bra(1,0));
587 F sh_d(target_->ket(1,0));
588 const bool xsxs = sh_b.zero() && sh_d.zero();
589 const bool sxsx = sh_a.zero() && sh_c.zero();
590 bool ahlrichs_simplification =
false;
592 bool part0_has_unit =
false;
593 bool part1_has_unit =
false;
595 ahlrichs_simplification = (sh_a.pure_sh() && sh_b.is_unit()) ||
596 (sh_c.pure_sh() && sh_d.is_unit());
597 unit_s = sh_b.is_unit();
598 part0_has_unit = sh_b.is_unit();
599 part1_has_unit = sh_d.is_unit();
602 ahlrichs_simplification = (sh_b.pure_sh() && sh_a.is_unit()) ||
603 (sh_d.pure_sh() && sh_c.is_unit());
604 unit_s = sh_a.is_unit();
605 part0_has_unit = sh_a.is_unit();
606 part1_has_unit = sh_c.is_unit();
609 const OriginDerivative<3u> dA = target_->bra(0,0).deriv();
610 const OriginDerivative<3u> dB = target_->ket(0,0).deriv();
611 const OriginDerivative<3u> dC = target_->bra(1,0).deriv();
612 const OriginDerivative<3u> dD = target_->ket(1,0).deriv();
613 const bool deriv = !dA.zero() ||
618 oss <<
"using namespace libint2;" << std::endl;
622 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
623 <<
"VRR_xs_xs<" << part <<
"," << sh_a.norm() <<
"," << sh_c.norm() <<
",";
626 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
627 <<
"VRR_sx_sx<" << part <<
"," << sh_b.norm() <<
"," << sh_d.norm() <<
",";
629 if (not ahlrichs_simplification) oss << (unit_s ?
"true," :
"false,");
630 oss << ((context->cparams()->max_vector_length() == 1) ?
"false" :
"true");
631 oss <<
">::compute(inteval";
633 oss <<
"," << args->symbol(0);
634 if (not ahlrichs_simplification && unit_s)
636 const unsigned int nargs = args->n();
637 for(
unsigned int a=1; a<nargs; a++) {
638 oss <<
"," << args->symbol(a);
644 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
645 <<
"VRR_xs_xs_deriv<" << part <<
"," << sh_a.norm() <<
"," << sh_c.norm() <<
",";
648 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
649 <<
"VRR_sx_sx_deriv<" << part <<
"," << sh_b.norm() <<
"," << sh_d.norm() <<
",";
652 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_a.deriv().d(xyz) <<
",";
653 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_b.deriv().d(xyz) <<
",";
654 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_c.deriv().d(xyz) <<
",";
655 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_d.deriv().d(xyz) <<
",";
656 if (not ahlrichs_simplification) oss << (unit_s ?
"true," :
"false,");
657 oss << ((context->cparams()->max_vector_length() == 1) ?
"false" :
"true");
658 oss <<
">::compute(inteval";
664 oss <<
"," << args->symbol(0);
665 if (not ahlrichs_simplification && unit_s)
668 unsigned int arg = 1;
670 arg<(ahlrichs_simplification? 3 : (unit_s ? 5 : 6));
672 oss <<
"," << args->symbol(arg);
674 for(
unsigned int xyz=0; xyz<3; ++xyz) {
675 if (sh_a.deriv().d(xyz) > 0) {
677 oss <<
"," << (part0_has_unit ? std::to_string(0) : args->symbol(arg++));
678 oss <<
"," << args->symbol(arg++);
682 if (sh_b.deriv().d(xyz) > 0) {
684 oss <<
"," << (part0_has_unit ? std::to_string(0) : args->symbol(arg++));
685 oss <<
"," << args->symbol(arg++);
689 if (sh_c.deriv().d(xyz) > 0) {
690 oss <<
"," << args->symbol(arg++);
694 if (sh_d.deriv().d(xyz) > 0) {
695 oss <<
"," << args->symbol(arg++);
Set of basis functions.
Definition: bfset.h:42
Generic integral over a two-body operator with one bfs for each particle in bra and ket.
Definition: integral_11_11.h:33
RRImpl must inherit GenericRecurrenceRelation<RRImpl>
Definition: generic_rr.h:47
bool is_simple() const override
Implementation of RecurrenceRelation::is_simple()
Definition: generic_rr.h:79
static SafePtr< RRImpl > Instance(const SafePtr< TargetType > &Tint, unsigned int dir)
Return an instance if applicable, or a null pointer otherwise.
Definition: generic_rr.h:55
static bool default_directional()
is this recurrence relation parameterized by a direction (x, y, or z).
Definition: generic_rr.h:99
VRR Recurrence Relation for 2-e ERI.
Definition: vrr_11_twoprep_11.h:36
static bool directional()
Default directionality.
Definition: vrr_11_twoprep_11.h:48
these objects help to construct BraketPairs
Definition: src/bin/libint/braket.h:270
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
bool exists(const IncableBFSet &A)
Return true if A is valid.
Definition: bfset.h:92
DefaultQuantumNumbers< unsignedint, 1 >::Result mType
mType is the type that describes the auxiliary index of standard 2-body repulsion integrals
Definition: quanta.h:408
std::string to_string(const T &x)
Converts x to its string representation.
Definition: entity.h:74