v2DM-DOCI
1.0
|
#include <FourIndex.h>
Public Member Functions | |
FourIndex (const int nGroup, const int *IrrepSizes) | |
Constructor. More... | |
FourIndex (const FourIndex &) | |
virtual | ~FourIndex () |
Destructor. More... | |
void | set (const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l, const double val) |
Set an element. More... | |
void | add (const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l, const double val) |
Add a double to an element. More... | |
double | get (const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l) const |
Get an element. More... | |
void | save (const std::string name) const |
Save the FourIndex object. More... | |
void | save2 (const std::string name) const |
void | read (const std::string name) |
Load the FourIndex object. More... | |
void | read2 (const std::string name) |
void | reset () |
set everything to zero More... | |
Private Member Functions | |
long long | calcNumberOfUniqueElements (const bool allocateStorage) |
long long | getPointer (const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l) const |
long long | getPtrIrrepOrderOK (const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l) const |
long long | getPtrAllOK (const int number, const int Icent, const int irrep_i, const int irrep_k, const int i, const int j, const int k, const int l) const |
Private Attributes | |
Irreps | SymmInfo |
int * | Isizes |
long long ***** | storage |
long long | arrayLength |
double * | theElements |
FourIndex class.
Container class for four-index tensors with Abelian point group symmetry (real character table; see Irreps.h): 2-particle matrix elements. The four-index tensor element V_ijkl has 8-fold permutation symmetry and is only nonzero when I_i x I_j = I_k x I_l. To clarify the convention, the potential energy is given:
\(\frac{1}{2} \sum\limits_{ijkl\sigma\tau} V_{ijkl} \delta_{I_i \otimes I_j \otimes I_k \otimes I_l, I_{trivial}} \hat{a}_{i \sigma}^{\dagger} \hat{a}_{j \tau}^{\dagger} \hat{a}_{l \tau} \hat{a}_{k \sigma} \).
Hence \( V_{ijkl} = ( ij \mid V \mid kl ) \) in physics notation, i.e. with i and k the same integration coordinate for the electron repulsion integrals.
Definition at line 34 of file FourIndex.h.
CheMPS2::FourIndex::FourIndex | ( | const int | nGroup, |
const int * | IrrepSizes | ||
) |
Constructor.
nGroup | The symmetry group number (see Irreps.h) |
IrrepSizes | Array with length the number of irreps of the specified group, containing the number of orbitals of that irrep |
Definition at line 33 of file FourIndex.cpp.
CheMPS2::FourIndex::FourIndex | ( | const FourIndex & | orig | ) |
Definition at line 49 of file FourIndex.cpp.
|
virtual |
Destructor.
Definition at line 161 of file FourIndex.cpp.
void CheMPS2::FourIndex::add | ( | const int | irrep_i, |
const int | irrep_j, | ||
const int | irrep_k, | ||
const int | irrep_l, | ||
const int | i, | ||
const int | j, | ||
const int | k, | ||
const int | l, | ||
const double | val | ||
) |
Add a double to an element.
irrep_i | The irrep number of the first orbital (see Irreps.h) |
irrep_j | The irrep number of the second orbital |
irrep_k | The irrep number of the third orbital |
irrep_l | The irrep number of the fourth orbital |
i | The first index (within the symmetry block) |
j | The second index (within the symmetry block) |
k | The third index (within the symmetry block) |
l | The fourth index (within the symmetry block) |
val | The value which should be added to the matrixelement |
Definition at line 176 of file FourIndex.cpp.
|
private |
Definition at line 64 of file FourIndex.cpp.
double CheMPS2::FourIndex::get | ( | const int | irrep_i, |
const int | irrep_j, | ||
const int | irrep_k, | ||
const int | irrep_l, | ||
const int | i, | ||
const int | j, | ||
const int | k, | ||
const int | l | ||
) | const |
Get an element.
irrep_i | The irrep number of the first orbital (see Irreps.h) |
irrep_j | The irrep number of the second orbital |
irrep_k | The irrep number of the third orbital |
irrep_l | The irrep number of the fourth orbital |
i | The first index (within the symmetry block) |
j | The second index (within the symmetry block) |
k | The third index (within the symmetry block) |
l | The fourth index (within the symmetry block) |
Definition at line 182 of file FourIndex.cpp.
|
private |
Definition at line 188 of file FourIndex.cpp.
|
private |
Definition at line 303 of file FourIndex.cpp.
|
private |
Definition at line 230 of file FourIndex.cpp.
void CheMPS2::FourIndex::read | ( | const std::string | name | ) |
void CheMPS2::FourIndex::read2 | ( | const std::string | name | ) |
Definition at line 504 of file FourIndex.cpp.
void CheMPS2::FourIndex::reset | ( | ) |
set everything to zero
Definition at line 561 of file FourIndex.cpp.
void CheMPS2::FourIndex::save | ( | const std::string | name | ) | const |
void CheMPS2::FourIndex::save2 | ( | const std::string | name | ) | const |
Definition at line 383 of file FourIndex.cpp.
void CheMPS2::FourIndex::set | ( | const int | irrep_i, |
const int | irrep_j, | ||
const int | irrep_k, | ||
const int | irrep_l, | ||
const int | i, | ||
const int | j, | ||
const int | k, | ||
const int | l, | ||
const double | val | ||
) |
Set an element.
irrep_i | The irrep number of the first orbital (see Irreps.h) |
irrep_j | The irrep number of the second orbital |
irrep_k | The irrep number of the third orbital |
irrep_l | The irrep number of the fourth orbital |
i | The first index (within the symmetry block) |
j | The second index (within the symmetry block) |
k | The third index (within the symmetry block) |
l | The fourth index (within the symmetry block) |
val | The value to which the element of the matrix should be set |
Definition at line 170 of file FourIndex.cpp.
|
private |
Definition at line 133 of file FourIndex.h.
|
private |
Definition at line 103 of file FourIndex.h.
|
private |
Definition at line 127 of file FourIndex.h.
|
private |
Definition at line 100 of file FourIndex.h.
|
private |
Definition at line 136 of file FourIndex.h.