sisi4s
Loading...
Searching...
No Matches
SimilarityTransformedHamiltonian.hpp
Go to the documentation of this file.
1#ifndef SIM_TRANS_HAMILTONIAN_DEFINED
2#define SIM_TRANS_HAMILTONIAN_DEFINED
3
4// Utility Macros
5
6#define _DEFINE_SETTER(type, name, default) \
7 SimilarityTransformedHamiltonian &set##name(type t) { \
8 name = t; \
9 return *this; \
10 } \
11 type name = default
12
13#define _MAKE_WITH_FUNCTION(type, name, default) \
14 SimilarityTransformedHamiltonian &with##name(type const &v) { \
15 _with##name = v; \
16 return *this; \
17 } \
18 type &with##name() { return _with##name; } \
19 type _with##name = default
20
23#include <math/FockVector.hpp>
25#include <util/Tensor.hpp>
26
27namespace sisi4s {
28
29template <typename F = complex>
31public:
33
40 enum Dressing {
43 NONE, // Some terms will be then set to zero instead of multiplying by 0
45 GENERAL, // For a general T not fulfiling any particular criterium
46 };
47
49 : No(No_)
50 , Nv(Nv_){};
52
53 // RPA, singles
55
56 // CISD
58
59 // ccsd fok vectors
66
67 // ccsdt fok vectors
70
71 // ip and ea ccsd
75
79
80 // Structure factor
82 double energy;
84 };
90 };
92 const StructureFactorSettings &s = {
93 .onlySingles = false,
94 .onlyDoubles = false,
95 .hartreeInOneBody = false,
96 .fockInOneBody = false});
97
98 //
99 // External resources that should not be cleaned up after
100 // Hamiltonian class gets destroyed
101 //
102 // One body
108
109 // Two body
120
121 // three body
123
124 // t amplitudes
129
130 // one body part
134
135 // Coulomb Integrals
151
156
157 // coulomb vertex setter
159
161 dressing = d;
162 return *this;
163 }
164
166
167 std::string getAbbreviation() const { return "STH"; }
168
169 _MAKE_WITH_FUNCTION(bool, _right_apply_intermediates, false);
171 _MAKE_WITH_FUNCTION(bool, RingCCSDT, false);
174
175private:
176 PTR(StantonIntermediatesUCCSD<F>) stantonIntermediatesUccsd;
177 PTR(StantonIntermediatesUCCSD<F>) getStantonIntermediatesUCCSD();
178
179 int No, Nv;
180 Dressing dressing;
181
182 //
183 // Resources that should be destroyed after the class gets destroyed
184 //
186 // one body
187 Wij, Wab, Wia, Wai,
188
189 // two body
190 Wabij, Wijab, Wabcd, Wabci, Waibc, Wiabj, Wiajk, Wijka, Wijkl,
191
192 // three body
193 Wabcijk,
194
195 // intermediate quantities
196 Tau_abij;
197};
198
199} // namespace sisi4s
200
201#undef _DEFINE_SETTER
202#undef _MAKE_WITH_FUNCTION
203
204#endif
#define _DEFINE_SETTER(type, name, default)
Definition CcsdPreconditioner.hpp:4
#define PTR(TYPE)
Definition SharedPointer.hpp:8
#define _MAKE_WITH_FUNCTION(type, name, default)
Definition SimilarityTransformedHamiltonian.hpp:13
@ CISD
Definition UnrestrictedCIS.cxx:24
@ CIS
Definition UnrestrictedCIS.cxx:24
Represents the direct sum of Tensors and provides the vector space operations of addition,...
Definition FockVector.hpp:26
Definition FockVector.hpp:631
Definition FockVector.hpp:678
Definition FockVector.hpp:589
Definition SimilarityTransformedHamiltonian.hpp:30
Tensor< sisi4s::complex > * GammaGqr
Definition SimilarityTransformedHamiltonian.hpp:158
Tensor< F > * Viabc
Definition SimilarityTransformedHamiltonian.hpp:141
Tensor< F > * VVijka
Definition SimilarityTransformedHamiltonian.hpp:154
Tensor< F > * Vijab
Definition SimilarityTransformedHamiltonian.hpp:138
std::shared_ptr< Tensor< F > > getAI()
Definition SimilarityTransformedHamiltonian.cxx:1175
std::shared_ptr< Tensor< F > > getIJKL()
Definition SimilarityTransformedHamiltonian.cxx:1513
Tensor< F > * Vaibc
Definition SimilarityTransformedHamiltonian.hpp:144
SDFockVector< F > right_apply_hirata(SDFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:672
Tensor< F > * Tabcdijkl
Definition SimilarityTransformedHamiltonian.hpp:128
Tensor< F > * Fij
Definition SimilarityTransformedHamiltonian.hpp:131
SDFockVector< F > right_apply_Intermediates_CCSD_IP(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:72
std::shared_ptr< Tensor< F > > getABCIJK()
Definition wabcijk.cxx:20
Tensor< F > * Vabij
Definition SimilarityTransformedHamiltonian.hpp:150
STH & setDressing(Dressing d)
Definition SimilarityTransformedHamiltonian.hpp:160
std::shared_ptr< Tensor< F > > getABIJ()
Definition wabij.cxx:14
Tensor< F > * Fab
Definition SimilarityTransformedHamiltonian.hpp:132
std::shared_ptr< Tensor< F > > getIJ()
Definition SimilarityTransformedHamiltonian.cxx:1121
Tensor< F > * Tai
Definition SimilarityTransformedHamiltonian.hpp:125
std::shared_ptr< Tensor< F > > getTauABIJ()
Definition SimilarityTransformedHamiltonian.cxx:42
std::shared_ptr< Tensor< F > > getIJKA()
Definition SimilarityTransformedHamiltonian.cxx:1499
Tensor< F > * Vaijb
Definition SimilarityTransformedHamiltonian.hpp:148
SDFockVector< F > right_apply_hirata_CCSD_EA(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:343
std::shared_ptr< Tensor< F > > getABIJ_RPA()
Definition wabij.cxx:215
Tensor< F > * VViabc
Definition SimilarityTransformedHamiltonian.hpp:153
std::shared_ptr< Tensor< F > > getIJAB()
Definition SimilarityTransformedHamiltonian.cxx:1288
std::shared_ptr< Tensor< F > > getABCD()
Definition SimilarityTransformedHamiltonian.cxx:1298
Dressing
Definition SimilarityTransformedHamiltonian.hpp:40
@ NONE
Definition SimilarityTransformedHamiltonian.hpp:43
@ GENERAL
Definition SimilarityTransformedHamiltonian.hpp:45
@ RPA
Definition SimilarityTransformedHamiltonian.hpp:44
@ CCSDT
Definition SimilarityTransformedHamiltonian.hpp:42
@ CCSD
Definition SimilarityTransformedHamiltonian.hpp:41
FockVector< F > right_apply_CISD(FockVector< F > &R)
Definition SimilarityTransformedHamiltonian.cxx:596
std::shared_ptr< Tensor< F > > getAI_RPA()
Definition SimilarityTransformedHamiltonian.cxx:1230
Tensor< F > * Vabcd
Definition SimilarityTransformedHamiltonian.hpp:136
SDFockVector< F > right_apply_hirata_CCSD_IP(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:124
SDFockVector< F > right_apply_Intermediates(SDFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:1015
SDFockVector< F > right_apply_CCSD_EA(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:291
Tensor< F > * VVaijb
Definition SimilarityTransformedHamiltonian.hpp:152
SDFockVector< F > right_apply_CCSD_IP(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:65
std::shared_ptr< Tensor< F > > getAIBC()
Definition SimilarityTransformedHamiltonian.cxx:1412
Tensor< F > * Vabic
Definition SimilarityTransformedHamiltonian.hpp:143
SDFockVector< F > leftApplyIntermediates(SDFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:1533
SDFockVector< F > right_apply_Intermediates_CCSD_EA(SDFockVector< F > &)
Definition SimilarityTransformedHamiltonian.cxx:298
SDFockVector< F > right_apply(SDFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:58
Tensor< F > * Tabcijk
Definition SimilarityTransformedHamiltonian.hpp:127
std::shared_ptr< Tensor< F > > getIABJ()
Definition SimilarityTransformedHamiltonian.cxx:1425
SDFockVector< F > leftApply_hirata(SDFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:1602
Tensor< F > * Vijka
Definition SimilarityTransformedHamiltonian.hpp:140
Tensor< F > * Viajk
Definition SimilarityTransformedHamiltonian.hpp:142
std::shared_ptr< Tensor< F > > getAB()
Definition SimilarityTransformedHamiltonian.cxx:1148
Tensor< F > * Viabj
Definition SimilarityTransformedHamiltonian.hpp:146
SimilarityTransformedHamiltonian(int No_, int Nv_)
Definition SimilarityTransformedHamiltonian.hpp:48
SDFockVector< F > leftApply(SDFockVector< F > &v)
StructureFactor structureFactor(SDFockVector< F > &t, const StructureFactorSettings &s={ .onlySingles=false,.onlyDoubles=false,.hartreeInOneBody=false,.fockInOneBody=false})
Definition SimilarityTransformedHamiltonian.cxx:3863
Tensor< F > * VVijab
Definition SimilarityTransformedHamiltonian.hpp:155
Tensor< F > * Tabij
Definition SimilarityTransformedHamiltonian.hpp:126
Tensor< F > * Viajb
Definition SimilarityTransformedHamiltonian.hpp:137
std::string getAbbreviation() const
Definition SimilarityTransformedHamiltonian.hpp:167
~SimilarityTransformedHamiltonian()
Definition SimilarityTransformedHamiltonian.hpp:51
Tensor< F > * Vijak
Definition SimilarityTransformedHamiltonian.hpp:147
Tensor< F > * Fia
Definition SimilarityTransformedHamiltonian.hpp:133
Tensor< F > * Vabci
Definition SimilarityTransformedHamiltonian.hpp:149
std::shared_ptr< Tensor< F > > getABCI()
Definition SimilarityTransformedHamiltonian.cxx:1318
SimilarityTransformedHamiltonian STH
Definition SimilarityTransformedHamiltonian.hpp:32
SFockVector< F > right_apply_hirata_RPA(SFockVector< F > &v)
Definition SimilarityTransformedHamiltonian.cxx:518
std::shared_ptr< Tensor< F > > getIA()
Definition SimilarityTransformedHamiltonian.cxx:1270
Tensor< F > * Vijkl
Definition SimilarityTransformedHamiltonian.hpp:139
std::shared_ptr< Tensor< F > > getIAJK()
Definition SimilarityTransformedHamiltonian.cxx:1446
Tensor< F > * Vaibj
Definition SimilarityTransformedHamiltonian.hpp:145
Definition StantonIntermediatesUCCSD.hpp:20
Definition Algorithm.hpp:10
CTF::Tensor< F > Tensor
Definition Tensor.hpp:9
Definition SimilarityTransformedHamiltonian.hpp:85
bool hartreeInOneBody
Definition SimilarityTransformedHamiltonian.hpp:88
bool onlyDoubles
Definition SimilarityTransformedHamiltonian.hpp:87
bool fockInOneBody
Definition SimilarityTransformedHamiltonian.hpp:89
bool onlySingles
Definition SimilarityTransformedHamiltonian.hpp:86
Definition SimilarityTransformedHamiltonian.hpp:81
double energy
Definition SimilarityTransformedHamiltonian.hpp:82
Tensor< F > S
Definition SimilarityTransformedHamiltonian.hpp:83