CheMPS2
CheMPS2::DMRGSCFintegrals Class Reference

#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...
 

Detailed Description

DMRGSCFintegrals class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
January 27, 2015

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:

\begin{eqnarray*} Coulomb & : & ( c_1 c_2 | a_1 a_2 ) \\ Exchange & : & ( c_1 v_1 | c_2 v_2 ) \end{eqnarray*}

where $c$ denote core (occupied + active) orbitals, $v$ virtual orbitals, and $a$ both core and virtual orbitals. For the Coulomb integrals the fourfold permutation symmetry $c_1 \leq c_2$ and $a_1 \leq a_2$ is taken into account and for the exchange integrals the twofold permutation symmetry $c_1 \leq c_2$.

Consider for example a molecule in C1 symmetry with 100 core (occupied + active) and 300 virtual orbitals. The FourIndex class needs to store $\frac{1}{8}(N_{core} + N_{virt})^4$ doubles or 25.6 GB. This class needs to store $\frac{1}{4} N_{core}^2 (N_{core}+N_{virt})^2 + \frac{1}{2} N_{core}^2 N_{virt}^2$ doubles or 6.8 GB. The eightfold permutation symmetry of the $( c_1 c_2 | c_3 c_4 )$ part of the Coulomb object is not used in this class. For the example, this would however only result in a reduction of $\frac{1}{8} N_{core}^4$ doubles or 0.1 GB.

Definition at line 39 of file DMRGSCFintegrals.h.

Constructor & Destructor Documentation

CheMPS2::DMRGSCFintegrals::DMRGSCFintegrals ( DMRGSCFindices iHandler)

Constructor.

Parameters
iHandlerThe DMRGSCFindices which contain information on the core (occupied + active) and virtual spaces

Definition at line 24 of file DMRGSCFintegrals.cpp.

+ Here is the call graph for this function:

Member Function Documentation

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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Ia1The irrep of the first core+virtual index
Ia2The irrep of the second core+virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
a1The first core+virtual index (within the irrep block)
a2The second core+virtual index (within the irrep block)
valThe 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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Iv1The irrep of the first virtual index
Iv2The irrep of the second virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
v1The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ])
v2The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ])
valThe 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.

Parameters
I1The irrep of the first index
I2The irrep of the second index
I3The irrep of the third index
I4The irrep of the fourth index
index1The first index (within the irrep block)
index2The second index (within the irrep block)
index3The third index (within the irrep block)
index4The fourth index (within the irrep block)
Returns
The desired two-body matrix element

Definition at line 245 of file DMRGSCFintegrals.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Ia1The irrep of the first core+virtual index
Ia2The irrep of the second core+virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
a1The first core+virtual index (within the irrep block)
a2The second core+virtual index (within the irrep block)
Returns
The desired value of the Coulomb object

Definition at line 194 of file DMRGSCFintegrals.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Iv1The irrep of the first virtual index
Iv2The irrep of the second virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
v1The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ])
v2The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ])
Returns
The desired value of the Exchange object

Definition at line 239 of file DMRGSCFintegrals.cpp.

+ Here is the caller graph for this function:

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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Ia1The irrep of the first core+virtual index
Ia2The irrep of the second core+virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
a1The first core+virtual index (within the irrep block)
a2The second core+virtual index (within the irrep block)
valThe 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 )

Parameters
Ic1The irrep of the first core index
Ic2The irrep of the second core index
Iv1The irrep of the first virtual index
Iv2The irrep of the second virtual index
c1The first core index (within the irrep block)
c2The second core index (within the irrep block)
v1The first virtual index (within the irrep block; counting starts at NCORE[ Iv1 ])
v2The second virtual index (within the irrep block; counting starts at NCORE[ Iv2 ])
valThe value to which the element of the object should be set

Definition at line 227 of file DMRGSCFintegrals.cpp.


The documentation for this class was generated from the following files: