CheMPS2
|
#include <DMRGSCFintegrals.h>
Public Member Functions | |
DMRGSCFintegrals (DMRGSCFindices *iHandler) | |
Constructor. More... | |
virtual | ~DMRGSCFintegrals () |
Destructor. | |
void | clear () |
Set the storage objects to zero. | |
void | set_coulomb (const int Ic1, const int Ic2, const int Ia1, const int Ia2, const int c1, const int c2, const int a1, const int a2, const double val) |
Set an element of the Coulomb object ( c1 c2 | a1 a2 ) More... | |
void | add_coulomb (const int Ic1, const int Ic2, const int Ia1, const int Ia2, const int c1, const int c2, const int a1, const int a2, const double val) |
Add a double to an element of the Coulomb object ( c1 c2 | a1 a2 ) More... | |
double | get_coulomb (const int Ic1, const int Ic2, const int Ia1, const int Ia2, const int c1, const int c2, const int a1, const int a2) const |
Get an element of the Coulomb object ( c1 c2 | a1 a2 ) More... | |
void | set_exchange (const int Ic1, const int Ic2, const int Iv1, const int Iv2, const int c1, const int c2, const int v1, const int v2, const double val) |
Set an element of the Exchange object ( c1 v1 | c2 v2 ) More... | |
void | add_exchange (const int Ic1, const int Ic2, const int Iv1, const int Iv2, const int c1, const int c2, const int v1, const int v2, const double val) |
Add a double to an element of the Exchange object ( c1 v1 | c2 v2 ) More... | |
double | get_exchange (const int Ic1, const int Ic2, const int Iv1, const int Iv2, const int c1, const int c2, const int v1, const int v2) const |
Get an element of the Exchange object ( c1 v1 | c2 v2 ) More... | |
double | FourIndexAPI (const int I1, const int I2, const int I3, const int I4, const int index1, const int index2, const int index3, const int index4) const |
Get a two-body matrix element with at most 2 virtual indices, using the FourIndex API. More... | |
DMRGSCFintegrals class.
Container class for rotated DMRGSCF integrals. At most two virtual indices are needed to compute the gradient and Hessian, which allows for computational as well as memory savings. The integrals are stored in two objects:
where denote core (occupied + active) orbitals, virtual orbitals, and both core and virtual orbitals. For the Coulomb integrals the fourfold permutation symmetry and is taken into account and for the exchange integrals the twofold permutation symmetry .
Consider for example a molecule in C1 symmetry with 100 core (occupied + active) and 300 virtual orbitals. The FourIndex class needs to store doubles or 25.6 GB. This class needs to store doubles or 6.8 GB. The eightfold permutation symmetry of the part of the Coulomb object is not used in this class. For the example, this would however only result in a reduction of doubles or 0.1 GB.
Definition at line 39 of file DMRGSCFintegrals.h.
CheMPS2::DMRGSCFintegrals::DMRGSCFintegrals | ( | DMRGSCFindices * | iHandler | ) |
Constructor.
iHandler | The DMRGSCFindices which contain information on the core (occupied + active) and virtual spaces |
Definition at line 24 of file DMRGSCFintegrals.cpp.
void CheMPS2::DMRGSCFintegrals::add_coulomb | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Ia1, | ||
const int | Ia2, | ||
const int | c1, | ||
const int | c2, | ||
const int | a1, | ||
const int | a2, | ||
const double | val | ||
) |
Add a double to an element of the Coulomb object ( c1 c2 | a1 a2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Ia1 | The irrep of the first core+virtual index |
Ia2 | The irrep of the second core+virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
a1 | The first core+virtual index (within the irrep block) |
a2 | The second core+virtual index (within the irrep block) |
val | The value with which the element should be augmented |
Definition at line 188 of file DMRGSCFintegrals.cpp.
void CheMPS2::DMRGSCFintegrals::add_exchange | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Iv1, | ||
const int | Iv2, | ||
const int | c1, | ||
const int | c2, | ||
const int | v1, | ||
const int | v2, | ||
const double | val | ||
) |
Add a double to an element of the Exchange object ( c1 v1 | c2 v2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Iv1 | The irrep of the first virtual index |
Iv2 | The irrep of the second virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
v1 | The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ]) |
v2 | The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ]) |
val | The value with which the element should be augmented |
Definition at line 233 of file DMRGSCFintegrals.cpp.
double CheMPS2::DMRGSCFintegrals::FourIndexAPI | ( | const int | I1, |
const int | I2, | ||
const int | I3, | ||
const int | I4, | ||
const int | index1, | ||
const int | index2, | ||
const int | index3, | ||
const int | index4 | ||
) | const |
Get a two-body matrix element with at most 2 virtual indices, using the FourIndex API.
I1 | The irrep of the first index |
I2 | The irrep of the second index |
I3 | The irrep of the third index |
I4 | The irrep of the fourth index |
index1 | The first index (within the irrep block) |
index2 | The second index (within the irrep block) |
index3 | The third index (within the irrep block) |
index4 | The fourth index (within the irrep block) |
Definition at line 245 of file DMRGSCFintegrals.cpp.
double CheMPS2::DMRGSCFintegrals::get_coulomb | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Ia1, | ||
const int | Ia2, | ||
const int | c1, | ||
const int | c2, | ||
const int | a1, | ||
const int | a2 | ||
) | const |
Get an element of the Coulomb object ( c1 c2 | a1 a2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Ia1 | The irrep of the first core+virtual index |
Ia2 | The irrep of the second core+virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
a1 | The first core+virtual index (within the irrep block) |
a2 | The second core+virtual index (within the irrep block) |
Definition at line 194 of file DMRGSCFintegrals.cpp.
double CheMPS2::DMRGSCFintegrals::get_exchange | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Iv1, | ||
const int | Iv2, | ||
const int | c1, | ||
const int | c2, | ||
const int | v1, | ||
const int | v2 | ||
) | const |
Get an element of the Exchange object ( c1 v1 | c2 v2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Iv1 | The irrep of the first virtual index |
Iv2 | The irrep of the second virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
v1 | The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ]) |
v2 | The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ]) |
Definition at line 239 of file DMRGSCFintegrals.cpp.
void CheMPS2::DMRGSCFintegrals::set_coulomb | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Ia1, | ||
const int | Ia2, | ||
const int | c1, | ||
const int | c2, | ||
const int | a1, | ||
const int | a2, | ||
const double | val | ||
) |
Set an element of the Coulomb object ( c1 c2 | a1 a2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Ia1 | The irrep of the first core+virtual index |
Ia2 | The irrep of the second core+virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
a1 | The first core+virtual index (within the irrep block) |
a2 | The second core+virtual index (within the irrep block) |
val | The value to which the element of the object should be set |
Definition at line 182 of file DMRGSCFintegrals.cpp.
void CheMPS2::DMRGSCFintegrals::set_exchange | ( | const int | Ic1, |
const int | Ic2, | ||
const int | Iv1, | ||
const int | Iv2, | ||
const int | c1, | ||
const int | c2, | ||
const int | v1, | ||
const int | v2, | ||
const double | val | ||
) |
Set an element of the Exchange object ( c1 v1 | c2 v2 )
Ic1 | The irrep of the first core index |
Ic2 | The irrep of the second core index |
Iv1 | The irrep of the first virtual index |
Iv2 | The irrep of the second virtual index |
c1 | The first core index (within the irrep block) |
c2 | The second core index (within the irrep block) |
v1 | The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ]) |
v2 | The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ]) |
val | The value to which the element of the object should be set |
Definition at line 227 of file DMRGSCFintegrals.cpp.