v2DM-DOCI  1.0
CheMPS2::FourIndex Class Reference

#include <FourIndex.h>

+ Collaboration diagram for CheMPS2::FourIndex:

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
 

Detailed Description

FourIndex class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
February 8, 2013

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.

Constructor & Destructor Documentation

CheMPS2::FourIndex::FourIndex ( const int  nGroup,
const int *  IrrepSizes 
)

Constructor.

Parameters
nGroupThe symmetry group number (see Irreps.h)
IrrepSizesArray 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.

CheMPS2::FourIndex::~FourIndex ( )
virtual

Destructor.

Definition at line 161 of file FourIndex.cpp.

Member Function Documentation

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.

Parameters
irrep_iThe irrep number of the first orbital (see Irreps.h)
irrep_jThe irrep number of the second orbital
irrep_kThe irrep number of the third orbital
irrep_lThe irrep number of the fourth orbital
iThe first index (within the symmetry block)
jThe second index (within the symmetry block)
kThe third index (within the symmetry block)
lThe fourth index (within the symmetry block)
valThe value which should be added to the matrixelement

Definition at line 176 of file FourIndex.cpp.

long long CheMPS2::FourIndex::calcNumberOfUniqueElements ( const bool  allocateStorage)
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.

Parameters
irrep_iThe irrep number of the first orbital (see Irreps.h)
irrep_jThe irrep number of the second orbital
irrep_kThe irrep number of the third orbital
irrep_lThe irrep number of the fourth orbital
iThe first index (within the symmetry block)
jThe second index (within the symmetry block)
kThe third index (within the symmetry block)
lThe fourth index (within the symmetry block)

Definition at line 182 of file FourIndex.cpp.

long long CheMPS2::FourIndex::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
private

Definition at line 188 of file FourIndex.cpp.

long long CheMPS2::FourIndex::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

Definition at line 303 of file FourIndex.cpp.

long long CheMPS2::FourIndex::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
private

Definition at line 230 of file FourIndex.cpp.

void CheMPS2::FourIndex::read ( const std::string  name)

Load the FourIndex object.

Parameters
namefilename

Definition at line 445 of file FourIndex.cpp.

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

Save the FourIndex object.

Parameters
namefilename

Definition at line 324 of file FourIndex.cpp.

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.

Parameters
irrep_iThe irrep number of the first orbital (see Irreps.h)
irrep_jThe irrep number of the second orbital
irrep_kThe irrep number of the third orbital
irrep_lThe irrep number of the fourth orbital
iThe first index (within the symmetry block)
jThe second index (within the symmetry block)
kThe third index (within the symmetry block)
lThe fourth index (within the symmetry block)
valThe value to which the element of the matrix should be set

Definition at line 170 of file FourIndex.cpp.

Member Data Documentation

long long CheMPS2::FourIndex::arrayLength
private

Definition at line 133 of file FourIndex.h.

int* CheMPS2::FourIndex::Isizes
private

Definition at line 103 of file FourIndex.h.

long long***** CheMPS2::FourIndex::storage
private

Definition at line 127 of file FourIndex.h.

Irreps CheMPS2::FourIndex::SymmInfo
private

Definition at line 100 of file FourIndex.h.

double* CheMPS2::FourIndex::theElements
private

Definition at line 136 of file FourIndex.h.


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