21#ifndef LIBINT_COMP_1_ΣPVΣP_1_H
22#define LIBINT_COMP_1_ΣPVΣP_1_H
24#include <generic_rr.h>
38 CR_1_σpVσp_1<F>, F, GenIntegralSet_1_1<F, σpVσpOper, EmptySet>> {
41 typedef F BasisFunctionType;
42 typedef σpVσpOper OperType;
48 static const unsigned int max_nchildren = 100;
52 static bool directional() {
return false; }
56 using ParentType::target_;
57 using ParentType::RecurrenceRelation::expr_;
58 using ParentType::RecurrenceRelation::nflops_;
62 CR_1_σpVσp_1(
const std::shared_ptr<TargetType> &,
unsigned int = 0);
64 static std::string descr() {
return "CR"; }
70 : ParentType(Tint, 0) {
71 assert(Tint->num_func_bra( 0) == 1);
72 assert(Tint->num_func_ket( 0) == 1);
73 const auto &a = Tint->bra(0, 0);
74 const auto &b = Tint->ket(0, 0);
75 const auto &oper = Tint->oper();
79 if (a.contracted() || b.contracted())
return;
81 using namespace libint2::algebra;
82 using namespace libint2::prefactor;
83 using libint2::algebra::operator*;
85 const mType zero_m(0u);
110 switch (oper->descr().pauli_index()) {
112 auto Dx_a_V_Dx_b = factory.make_child(Dx_a, Dx_b, zero_m);
113 auto Dy_a_V_Dy_b = factory.make_child(Dy_a, Dy_b, zero_m);
114 auto Dz_a_V_Dz_b = factory.make_child(Dz_a, Dz_b, zero_m);
116 expr_ = Dx_a_V_Dx_b + Dy_a_V_Dy_b + Dz_a_V_Dz_b;
122 auto Dy_a_V_Dz_b = factory.make_child(Dy_a, Dz_b, zero_m);
123 auto Dz_a_V_Dy_b = factory.make_child(Dz_a, Dy_b, zero_m);
125 expr_ = Dy_a_V_Dz_b - Dz_a_V_Dy_b;
131 auto Dz_a_V_Dx_b = factory.make_child(Dz_a, Dx_b, zero_m);
132 auto Dx_a_V_Dz_b = factory.make_child(Dx_a, Dz_b, zero_m);
134 expr_ = Dz_a_V_Dx_b - Dx_a_V_Dz_b;
141 auto Dx_a_V_Dy_b = factory.make_child(Dx_a, Dy_b, zero_m);
142 auto Dy_a_V_Dx_b = factory.make_child(Dy_a, Dx_b, zero_m);
144 expr_ = Dx_a_V_Dy_b - Dy_a_V_Dx_b;
149 throw std::runtime_error(
"CR_1_σpVσp_1: invalid Pauli index");
this computes integral of over CGShell/CGF by rewriting it as a linear combination of integrals over...
Definition comp_1_σpVσp_1.h:38
Helps GenericRecurrenceRelation to work around the compiler problem with make_child.
Definition generic_rr.h:150
Generic integral over a one-body operator with one bfs for each particle in bra and ket.
Definition integral_1_1.h:36
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
QuantumNumbersA<T,N> is a set of N quantum numbers of type T implemented in terms of a C-style array.
Definition quanta.h:193
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24