1#ifndef EOM_1RDM_DENSITY_MATRIX_DEFINED
2#define EOM_1RDM_DENSITY_MATRIX_DEFINED
28 if (Rij) {
return Rij; }
29 const int No(R.get(0)->lens[1]);
30 const int oo[] = {No, No};
31 const int syms[] = {NS, NS};
36 (*Rij)[
"ii"] = (*R.get(0))[
"aj"] * (*R.get(0))[
"aj"];
37 (*Rij)[
"ij"] += (-1.0) * (*R.get(0))[
"ai"] * (*R.get(0))[
"aj"];
42 if (Rab) {
return Rab; }
43 const int Nv(R.get(0)->lens[0]);
44 const int vv[] = {Nv, Nv};
45 const int syms[] = {NS, NS};
49 (*Rab)[
"ab"] = (*R.get(0))[
"ai"] * (*R.get(0))[
"bi"];
77 LOG(0,
"OneBodyRDM") <<
"Calculating eom ccsd 1rdm" << std::endl;
81 if (Rai) {
return Rai; }
85 (*Rai)[
"ai"] += (*L->get(0))[
"ke"] * (*R->get(1))[
"eaki"];
86 (*Rai)[
"ai"] += (*L->get(0))[
"ke"] * (*R->get(0))[
"ak"] * (*Tai)[
"ei"];
87 (*Rai)[
"ai"] += (*L->get(0))[
"ke"] * (*R->get(0))[
"ei"] * (*Tai)[
"ak"];
89 (-0.5) * (*L->get(1))[
"kled"] * (*R->get(0))[
"di"] * (*Tabij)[
"eakl"];
91 (-0.5) * (*L->get(1))[
"kled"] * (*R->get(0))[
"al"] * (*Tabij)[
"edki"];
93 (-0.5) * (*L->get(1))[
"kled"] * (*Tai)[
"di"] * (*R->get(1))[
"eakl"];
95 (-0.5) * (*L->get(1))[
"kled"] * (*Tai)[
"al"] * (*R->get(1))[
"edki"];
101 if (Rij) {
return Rij; }
102 const int No(Tai->lens[1]);
103 const int oo[] = {No, No};
104 const int syms[] = {NS, NS};
108 (*Rij)[
"ij"] += (*L->get(0))[
"je"] * (*R->get(0))[
"ei"];
109 (*Rij)[
"ij"] += 0.5 * (*L->get(1))[
"kjed"] * (*R->get(1))[
"edki"];
110 (*Rij)[
"ij"] += (*L->get(1))[
"kjed"] * (*R->get(0))[
"ek"] * (*Tai)[
"di"];
112 (*Rij)[
"ij"] += (*L->get(1))[
"kjed"] * (*R->get(0))[
"di"] * (*Tai)[
"ek"];
118 if (Rab) {
return Rab; }
119 const int Nv(Tai->lens[0]);
120 const int vv[] = {Nv, Nv};
121 const int syms[] = {NS, NS};
125 (*Rab)[
"ab"] += (-1.0) * (*L->get(0))[
"ka"] * (*R->get(0))[
"bk"];
126 (*Rab)[
"ab"] += (-0.5) * (*L->get(1))[
"klea"] * (*R->get(1))[
"ebkl"];
128 (-1.0) * (*L->get(1))[
"klea"] * (*R->get(0))[
"ek"] * (*Tai)[
"bl"];
131 (-1.0) * (*L->get(1))[
"klea"] * (*R->get(0))[
"bl"] * (*Tai)[
"ek"];
137 if (Ria) {
return Ria; }
138 const int Nv(Tai->lens[0]), No(Tai->lens[1]);
139 const int ov[] = {No, Nv};
140 const int syms[] = {NS, NS};
147 (*Ria)[
"ia"] += (*L->get(1))[
"oifa"] * (*R->get(0))[
"fo"];
#define LOG(...)
Definition Log.hpp:119
#define NEW(TYPE,...)
Definition SharedPointer.hpp:10
#define PTR(TYPE)
Definition SharedPointer.hpp:8
Definition OneBodyReducedDensityMatrix.hpp:23
This implements one body rdm for eom ccsd In principle it calculates p T <0| L \rho R e |0> q For L a...
Definition OneBodyReducedDensityMatrix.hpp:67
EomOneBodyReducedDensityMatrix(Tensor< F > *Tai_, Tensor< F > *Tabij_, const SDFockVector< F > *L_, const SDFockVector< F > *R_)
Definition OneBodyReducedDensityMatrix.hpp:69
std::shared_ptr< Tensor< F > > getAB() override
Definition OneBodyReducedDensityMatrix.hpp:117
std::shared_ptr< Tensor< F > > getIA() override
Definition OneBodyReducedDensityMatrix.hpp:136
std::shared_ptr< Tensor< F > > getIJ() override
Definition OneBodyReducedDensityMatrix.hpp:100
std::shared_ptr< Tensor< F > > getAI() override
Definition OneBodyReducedDensityMatrix.hpp:80
Definition OneBodyReducedDensityMatrix.hpp:13
~OneBodyReducedDensityMatrix()
Definition OneBodyReducedDensityMatrix.hpp:15
virtual std::shared_ptr< Tensor< F > > getAI()=0
virtual std::shared_ptr< Tensor< F > > getAB()=0
virtual std::shared_ptr< Tensor< F > > getIJ()=0
virtual std::shared_ptr< Tensor< F > > getIA()=0
Definition FockVector.hpp:631
Definition FockVector.hpp:589
static CTF::World * world
Definition Sisi4s.hpp:17
Definition Algorithm.hpp:10
CTF::Tensor< F > Tensor
Definition Tensor.hpp:9
void conjugate(Tensor< double > &c)
Definition ComplexTensor.cxx:96