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> 34 template <
class BFSet,
int part, FunctionPosition where>
37 GenIntegralSet_11_11<BFSet,TwoPRep,mType> >
45 static const unsigned int max_nchildren = 26;
47 using ParentType::Instance;
50 static bool directional() {
return ParentType::default_directional(); }
53 using ParentType::RecurrenceRelation::expr_;
54 using ParentType::RecurrenceRelation::nflops_;
55 using ParentType::target_;
56 using ParentType::is_simple;
61 static std::string descr() {
return "OSVRR"; }
65 std::string generate_label()
const 67 typedef typename TargetType::AuxIndexType mType;
68 static SafePtr<mType> aux0(
new mType(0u));
70 os << descr() <<
"P" << part << to_string(where)
71 << genintegralset_label(target_->bra(),target_->ket(),aux0,target_->oper());
75 #if LIBINT_ENABLE_GENERIC_CODE 76 bool has_generic(
const SafePtr<CompilationParameters>& cparams)
const;
79 std::string generic_header()
const;
81 std::string generic_instance(
const SafePtr<CodeContext>& context,
const SafePtr<CodeSymbols>& args)
const;
85 template <
class F,
int part, FunctionPosition where>
86 VRR_11_TwoPRep_11<F,part,where>::VRR_11_TwoPRep_11(
const SafePtr< TargetType >& Tint,
90 using namespace libint2::algebra;
91 using namespace libint2::prefactor;
93 const unsigned int m = Tint->aux()->elem(0);
94 const F& _1 = unit<F>(dir);
101 if (a.contracted() ||
109 const OriginDerivative<3u> dA = Tint->bra(0,0).deriv();
110 const OriginDerivative<3u> dB = Tint->ket(0,0).deriv();
111 const OriginDerivative<3u> dC = Tint->bra(1,0).deriv();
112 const OriginDerivative<3u> dD = Tint->ket(1,0).deriv();
113 const bool deriv = dA.zero() ==
false ||
114 dB.zero() ==
false ||
115 dC.zero() ==
false ||
119 #if LIBINT_ENABLE_GENERIC_CODE 121 F sh_a(target_->bra(0,0));
122 F sh_b(target_->ket(0,0));
123 F sh_c(target_->bra(1,0));
124 F sh_d(target_->ket(1,0));
127 if (sh_b.zero() && sh_d.zero() &&
128 (sh_a.norm() > 1u && sh_c.norm() > 1u)
133 if (sh_a.zero() && sh_c.zero() &&
134 (sh_b.norm() > 1u && sh_d.norm() > 1u)
142 typedef TargetType ChildType;
143 ChildFactory<ThisType,ChildType> factory(
this);
145 bool part0_has_unit=
false, part1_has_unit=
false;
148 if (part == 0 && where == InBra) {
149 F a(Tint->bra(0,0) - _1);
151 F b(Tint->ket(0,0));
const bool unit_b = (b == F::unit()); part0_has_unit |= unit_b;
155 SafePtr<DGVertex> ABCD_m;
if (not unit_b) ABCD_m = factory.make_child(a,b,c,d,m);
156 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
159 expr_ = Vector(
"PA")[dir] * ABCD_m + Vector(
"WP")[dir] * ABCD_mp1; nflops_+=3;
162 expr_ = Vector(
"WP")[dir] * ABCD_mp1; nflops_+=1;
167 const bool ahlrichs_simplification = a.pure_sh() && unit_b;
169 if (
exists(am1) && not ahlrichs_simplification) {
170 auto Am1BCD_m = factory.make_child(am1,b,c,d,m);
171 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
172 #if LIBINT_GENERATE_FMA 174 if (
is_simple()) { expr_ -= Scalar(a[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * Am1BCD_mp1 - Am1BCD_m); nflops_+=5; }
176 if (
is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2z") * (Am1BCD_m - Scalar(
"roz") * Am1BCD_mp1); nflops_+=5; }
179 const F& bm1 = b - _1;
181 auto ABm1CD_m = factory.make_child(a,bm1,c,d,m);
182 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
183 #if LIBINT_GENERATE_FMA 185 if (
is_simple()) { expr_ -= Scalar(b[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * ABm1CD_mp1 - ABm1CD_m); nflops_+=5; }
187 if (
is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2z") * (ABm1CD_m - Scalar(
"roz") * ABm1CD_mp1); nflops_+=5; }
190 const F& cm1 = c - _1;
192 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
193 if (
is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2ze") * ABCm1D_mp1; nflops_+=3; }
195 const F& dm1 = d - _1;
197 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
198 if (
is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2ze") * ABCDm1_mp1; nflops_+=3; }
202 if (part == 0 && where == InKet) {
203 F a(Tint->bra(0,0));
const bool unit_a = (a == F::unit()); part0_has_unit |= unit_a;
204 F b(Tint->ket(0,0) - _1);
209 SafePtr<DGVertex> ABCD_m;
if (not unit_a) ABCD_m = factory.make_child(a,b,c,d,m);
210 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
213 expr_ = Vector(
"PB")[dir] * ABCD_m + Vector(
"WP")[dir] * ABCD_mp1; nflops_+=3;
216 expr_ = Vector(
"WP")[dir] * ABCD_mp1; nflops_+=1;
220 const F& am1 = a - _1;
222 auto Am1BCD_m = factory.make_child(am1,b,c,d,m);
223 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
224 #if LIBINT_GENERATE_FMA 226 if (
is_simple()) { expr_ -= Scalar(a[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * Am1BCD_mp1 - Am1BCD_m); nflops_+=5; }
228 if (
is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2z") * (Am1BCD_m - Scalar(
"roz") * Am1BCD_mp1); nflops_+=5; }
232 const bool ahlrichs_simplification = b.pure_sh() && unit_a;
233 const F& bm1 = b - _1;
234 if (
exists(bm1) && not ahlrichs_simplification) {
235 auto ABm1CD_m = factory.make_child(a,bm1,c,d,m);
236 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
237 #if LIBINT_GENERATE_FMA 239 if (
is_simple()) { expr_ -= Scalar(b[dir]) * Scalar(
"oo2z") * (Scalar(
"roz") * ABm1CD_mp1 - ABm1CD_m); nflops_+=5; }
241 if (
is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2z") * (ABm1CD_m - Scalar(
"roz") * ABm1CD_mp1); nflops_+=5; }
244 const F& cm1 = c - _1;
246 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
247 if (
is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2ze") * ABCm1D_mp1; nflops_+=3; }
249 const F& dm1 = d - _1;
251 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
252 if (
is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2ze") * ABCDm1_mp1; nflops_+=3; }
256 if (part == 1 && where == InBra) {
259 F c(Tint->bra(1,0) - _1);
261 F d(Tint->ket(1,0));
const bool unit_d = (d == F::unit()); part1_has_unit |= unit_d;
263 SafePtr<DGVertex> ABCD_m;
if (not unit_d) ABCD_m = factory.make_child(a,b,c,d,m);
264 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
267 expr_ = Vector(
"QC")[dir] * ABCD_m + Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=3;
270 expr_ = Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=1;
275 const bool ahlrichs_simplification = c.pure_sh() && unit_d;
276 const F& cm1 = c - _1;
277 if (
exists(cm1) && not ahlrichs_simplification) {
278 auto ABCm1D_m = factory.make_child(a,b,cm1,d,m);
279 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
280 #if LIBINT_GENERATE_FMA 282 if (
is_simple()) { expr_ -= Scalar(c[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCm1D_mp1 - ABCm1D_m); nflops_+=5; }
284 if (
is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2e") * (ABCm1D_m - Scalar(
"roe") * ABCm1D_mp1); nflops_+=5; }
287 const F& dm1 = d - _1;
289 auto ABCDm1_m = factory.make_child(a,b,c,dm1,m);
290 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
291 #if LIBINT_GENERATE_FMA 293 if (
is_simple()) { expr_ -= Scalar(d[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCDm1_mp1 - ABCDm1_m); nflops_+=5; }
295 if (
is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2e") * (ABCDm1_m - Scalar(
"roe") * ABCDm1_mp1); nflops_+=5; }
298 const F& am1 = a - _1;
300 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
301 if (
is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2ze") * Am1BCD_mp1; nflops_+=3; }
303 const F& bm1 = b - _1;
305 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
306 if (
is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2ze") * ABm1CD_mp1; nflops_+=3; }
310 if (part == 1 && where == InKet) {
313 F c(Tint->bra(1,0));
const bool unit_c = (c == F::unit()); part1_has_unit |= unit_c;
314 F d(Tint->ket(1,0) - _1);
317 SafePtr<DGVertex> ABCD_m;
if (not unit_c) ABCD_m = factory.make_child(a,b,c,d,m);
318 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
321 expr_ = Vector(
"QD")[dir] * ABCD_m + Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=3;
324 expr_ = Vector(
"WQ")[dir] * ABCD_mp1; nflops_+=1;
328 const F& cm1 = c - _1;
330 auto ABCm1D_m = factory.make_child(a,b,cm1,d,m);
331 auto ABCm1D_mp1 = factory.make_child(a,b,cm1,d,m+1);
332 #if LIBINT_GENERATE_FMA 334 if (
is_simple()) { expr_ -= Scalar(c[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCm1D_mp1 - ABCm1D_m); nflops_+=5; }
336 if (
is_simple()) { expr_ += Scalar(c[dir]) * Scalar(
"oo2e") * (ABCm1D_m - Scalar(
"roe") * ABCm1D_mp1); nflops_+=5; }
340 const bool ahlrichs_simplification = d.pure_sh() && unit_c;
341 const F& dm1 = d - _1;
342 if (
exists(dm1) && not ahlrichs_simplification) {
343 auto ABCDm1_m = factory.make_child(a,b,c,dm1,m);
344 auto ABCDm1_mp1 = factory.make_child(a,b,c,dm1,m+1);
345 #if LIBINT_GENERATE_FMA 347 if (
is_simple()) { expr_ -= Scalar(d[dir]) * Scalar(
"oo2e") * (Scalar(
"roe") * ABCDm1_mp1 - ABCDm1_m); nflops_+=5; }
349 if (
is_simple()) { expr_ += Scalar(d[dir]) * Scalar(
"oo2e") * (ABCDm1_m - Scalar(
"roe") * ABCDm1_mp1); nflops_+=5; }
352 const F& am1 = a - _1;
354 auto Am1BCD_mp1 = factory.make_child(am1,b,c,d,m+1);
355 if (
is_simple()) { expr_ += Scalar(a[dir]) * Scalar(
"oo2ze") * Am1BCD_mp1; nflops_+=3; }
357 const F& bm1 = b - _1;
359 auto ABm1CD_mp1 = factory.make_child(a,bm1,c,d,m+1);
360 if (
is_simple()) { expr_ += Scalar(b[dir]) * Scalar(
"oo2ze") * ABm1CD_mp1; nflops_+=3; }
368 F a( part == 0 && where == InBra ? Tint->bra(0,0) - _1 : Tint->bra(0,0) );
369 F b( part == 0 && where == InKet ? Tint->ket(0,0) - _1 : Tint->ket(0,0) );
370 F c( part == 1 && where == InBra ? Tint->bra(1,0) - _1 : Tint->bra(1,0) );
371 F d( part == 1 && where == InKet ? Tint->ket(1,0) - _1 : Tint->ket(1,0) );
376 for(
unsigned int dxyz=0; dxyz<3; ++dxyz) {
381 OriginDerivative<3u> _d1; _d1.inc(dxyz);
383 SafePtr<DGVertex> _nullptr;
387 const OriginDerivative<3u> dAm1(dA - _d1);
390 auto ABCD_m = (part == 0 && not part0_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
391 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
393 if (part == 0 && where == InBra) {
394 if (not part0_has_unit) {
395 expr_ -= Vector(dA)[dxyz] * (Scalar(
"rho12_over_alpha1") * ABCD_m + Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
398 expr_ -= Vector(dA)[dxyz] * (Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
401 if (part == 0 && where == InKet) {
402 if (not part0_has_unit) {
403 expr_ += Vector(dA)[dxyz] * (Scalar(
"rho12_over_alpha2") * ABCD_m - Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
406 expr_ -= Vector(dA)[dxyz] * (Scalar(
"alpha1_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
410 expr_ += Vector(dA)[dxyz] * Scalar(
"alpha1_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
418 const OriginDerivative<3u> dBm1(dB - _d1);
421 auto ABCD_m = (part == 0 && not part0_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
422 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
424 if (part == 0 && where == InBra) {
425 if (not part0_has_unit) {
426 expr_ += Vector(dB)[dxyz] * (Scalar(
"rho12_over_alpha1") * ABCD_m - Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
429 expr_ -= Vector(dB)[dxyz] * (Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
432 if (part == 0 && where == InKet) {
433 if (not part0_has_unit) {
434 expr_ -= Vector(dB)[dxyz] * (Scalar(
"rho12_over_alpha2") * ABCD_m + Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 5;
437 expr_ -= Vector(dB)[dxyz] * (Scalar(
"alpha2_rho_over_zeta2") * ABCD_mp1); nflops_ += 3;
441 expr_ += Vector(dB)[dxyz] * Scalar(
"alpha2_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
449 const OriginDerivative<3u> dCm1(dC - _d1);
452 auto ABCD_m = (part == 1 && not part1_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
453 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
456 expr_ += Vector(dC)[dxyz] * Scalar(
"alpha3_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
457 if (part == 1 && where == InBra) {
458 if (not part1_has_unit) {
459 expr_ -= Vector(dC)[dxyz] * (Scalar(
"rho34_over_alpha3") * ABCD_m + Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
462 expr_ -= Vector(dC)[dxyz] * (Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
465 if (part == 1 && where == InKet) {
466 if (not part1_has_unit) {
467 expr_ += Vector(dC)[dxyz] * (Scalar(
"rho34_over_alpha4") * ABCD_m - Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
470 expr_ -= Vector(dC)[dxyz] * (Scalar(
"alpha3_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
480 const OriginDerivative<3u> dDm1(dD - _d1);
483 auto ABCD_m = (part == 1 && not part1_has_unit) ? factory.make_child(a,b,c,d,m) : _nullptr;
484 auto ABCD_mp1 = factory.make_child(a,b,c,d,m+1);
487 expr_ += Vector(dD)[dxyz] * Scalar(
"alpha4_over_zetapluseta") * ABCD_mp1; nflops_ += 3; }
488 if (part == 1 && where == InBra) {
489 if (not part1_has_unit) {
490 expr_ += Vector(dD)[dxyz] * (Scalar(
"rho34_over_alpha3") * ABCD_m - Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
493 expr_ -= Vector(dD)[dxyz] * (Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
496 if (part == 1 && where == InKet) {
497 if (not part1_has_unit) {
498 expr_ -= Vector(dD)[dxyz] * (Scalar(
"rho34_over_alpha4") * ABCD_m + Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 5;
501 expr_ -= Vector(dD)[dxyz] * (Scalar(
"alpha4_rho_over_eta2") * ABCD_mp1); nflops_ += 3;
514 #if LIBINT_ENABLE_GENERIC_CODE 515 template <
class F,
int part, FunctionPosition where>
517 VRR_11_TwoPRep_11<F,part,where>::has_generic(
const SafePtr<CompilationParameters>& cparams)
const 519 if (TrivialBFSet<F>::result)
522 F sh_a(target_->bra(0,0));
523 F sh_b(target_->ket(0,0));
524 F sh_c(target_->bra(1,0));
525 F sh_d(target_->ket(1,0));
526 const unsigned int max_opt_am = cparams->max_am_opt();
529 if (sh_b.zero() && sh_d.zero() &&
530 (sh_a.norm() > std::max(2*max_opt_am,1u) ||
531 sh_c.norm() > std::max(2*max_opt_am,1u)
533 (sh_a.norm() > 1u && sh_c.norm() > 1u)
538 if (sh_a.zero() && sh_c.zero() &&
539 (sh_b.norm() > std::max(2*max_opt_am,1u) ||
540 sh_d.norm() > std::max(2*max_opt_am,1u)
542 (sh_b.norm() > 1u && sh_d.norm() > 1u)
550 template <
class F,
int part, FunctionPosition where>
552 VRR_11_TwoPRep_11<F,part,where>::generic_header()
const 554 F sh_a(target_->bra(0,0));
555 F sh_b(target_->ket(0,0));
556 F sh_c(target_->bra(1,0));
557 F sh_d(target_->ket(1,0));
558 const bool xsxs = sh_b.zero() && sh_d.zero();
559 const bool sxsx = sh_a.zero() && sh_c.zero();
561 const OriginDerivative<3u> dA = target_->bra(0,0).deriv();
562 const OriginDerivative<3u> dB = target_->ket(0,0).deriv();
563 const OriginDerivative<3u> dC = target_->bra(1,0).deriv();
564 const OriginDerivative<3u> dD = target_->ket(1,0).deriv();
565 const bool deriv = dA.zero() ==
false ||
566 dB.zero() ==
false ||
567 dC.zero() ==
false ||
570 if (deriv ==
false) {
571 if (xsxs)
return std::string(
"OSVRR_xs_xs.h");
572 if (sxsx)
return std::string(
"OSVRR_sx_sx.h");
575 if (xsxs)
return std::string(
"OSVRR_xs_xs_deriv.h");
576 if (sxsx)
return std::string(
"OSVRR_sx_sx_deriv.h");
581 template <
class F,
int part, FunctionPosition where>
583 VRR_11_TwoPRep_11<F,part,where>::generic_instance(
const SafePtr<CodeContext>& context,
const SafePtr<CodeSymbols>& args)
const 585 std::ostringstream oss;
586 F sh_a(target_->bra(0,0));
587 F sh_b(target_->ket(0,0));
588 F sh_c(target_->bra(1,0));
589 F sh_d(target_->ket(1,0));
590 const bool xsxs = sh_b.zero() && sh_d.zero();
591 const bool sxsx = sh_a.zero() && sh_c.zero();
592 bool ahlrichs_simplification =
false;
594 bool part0_has_unit =
false;
595 bool part1_has_unit =
false;
597 ahlrichs_simplification = (sh_a.pure_sh() && sh_b.is_unit()) ||
598 (sh_c.pure_sh() && sh_d.is_unit());
599 unit_s = sh_b.is_unit();
600 part0_has_unit = sh_b.is_unit();
601 part1_has_unit = sh_d.is_unit();
604 ahlrichs_simplification = (sh_b.pure_sh() && sh_a.is_unit()) ||
605 (sh_d.pure_sh() && sh_c.is_unit());
606 unit_s = sh_a.is_unit();
607 part0_has_unit = sh_a.is_unit();
608 part1_has_unit = sh_c.is_unit();
611 const OriginDerivative<3u> dA = target_->bra(0,0).deriv();
612 const OriginDerivative<3u> dB = target_->ket(0,0).deriv();
613 const OriginDerivative<3u> dC = target_->bra(1,0).deriv();
614 const OriginDerivative<3u> dD = target_->ket(1,0).deriv();
615 const bool deriv = dA.zero() ==
false ||
616 dB.zero() ==
false ||
617 dC.zero() ==
false ||
620 oss <<
"using namespace libint2;" << endl;
622 if (deriv ==
false) {
624 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
625 <<
"VRR_xs_xs<" << part <<
"," << sh_a.norm() <<
"," << sh_c.norm() <<
",";
628 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
629 <<
"VRR_sx_sx<" << part <<
"," << sh_b.norm() <<
"," << sh_d.norm() <<
",";
631 if (not ahlrichs_simplification) oss << (unit_s ?
"true," :
"false,");
632 oss << ((context->cparams()->max_vector_length() == 1) ?
"false" :
"true");
633 oss <<
">::compute(inteval";
635 oss <<
"," << args->symbol(0);
636 if (not ahlrichs_simplification && unit_s)
638 const unsigned int nargs = args->n();
639 for(
unsigned int a=1; a<nargs; a++) {
640 oss <<
"," << args->symbol(a);
646 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
647 <<
"VRR_xs_xs_deriv<" << part <<
"," << sh_a.norm() <<
"," << sh_c.norm() <<
",";
650 oss <<
"libint2::OS" << (ahlrichs_simplification ?
"A" :
"")
651 <<
"VRR_sx_sx_deriv<" << part <<
"," << sh_b.norm() <<
"," << sh_d.norm() <<
",";
654 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_a.deriv().d(xyz) <<
",";
655 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_b.deriv().d(xyz) <<
",";
656 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_c.deriv().d(xyz) <<
",";
657 for(
unsigned int xyz=0; xyz<3; ++xyz) oss << sh_d.deriv().d(xyz) <<
",";
658 if (not ahlrichs_simplification) oss << (unit_s ?
"true," :
"false,");
659 oss << ((context->cparams()->max_vector_length() == 1) ?
"false" :
"true");
660 oss <<
">::compute(inteval";
666 oss <<
"," << args->symbol(0);
667 if (not ahlrichs_simplification && unit_s)
670 unsigned int arg = 1;
672 arg<(ahlrichs_simplification? 3 : (unit_s ? 5 : 6));
674 oss <<
"," << args->symbol(arg);
676 for(
unsigned int xyz=0; xyz<3; ++xyz) {
677 if (sh_a.deriv().d(xyz) > 0) {
679 oss <<
"," << (part0_has_unit ? std::to_string(0) : args->symbol(arg++));
680 oss <<
"," << args->symbol(arg++);
684 if (sh_b.deriv().d(xyz) > 0) {
686 oss <<
"," << (part0_has_unit ? std::to_string(0) : args->symbol(arg++));
687 oss <<
"," << args->symbol(arg++);
691 if (sh_c.deriv().d(xyz) > 0) {
692 oss <<
"," << args->symbol(arg++);
696 if (sh_d.deriv().d(xyz) > 0) {
697 oss <<
"," << args->symbol(arg++);
707 #endif // #if !LIBINT_ENABLE_GENERIC_CODE Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
bool is_simple() const
Implementation of RecurrenceRelation::is_simple()
Definition: generic_rr.h:81
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:49
VRR Recurrence Relation for 2-e ERI.
Definition: vrr_11_twoprep_11.h:35
these objects help to construct BraketPairs
Definition: braket.h:270
bool exists(const IncableBFSet &A)
Return true if A is valid.
Definition: bfset.h:92
Set of basis functions.
Definition: bfset.h:42
static bool directional()
Default directionality.
Definition: vrr_11_twoprep_11.h:50