CheMPS2
CheMPS2::TwoIndex Class Reference

#include <TwoIndex.h>

Public Member Functions

 TwoIndex (const int nGroup, const int *IrrepSizes)
 Constructor. More...
 
virtual ~TwoIndex ()
 Destructor.
 
void Clear ()
 Set all one-body matrix elements to zero.
 
void set (const int irrep, const int i, const int j, const double val)
 Set an element. More...
 
double get (const int irrep, const int i, const int j) const
 Get an element. More...
 
void save (const std::string name) const
 Save the TwoIndex object. More...
 
void read (const std::string name)
 Load the TwoIndex object. More...
 

Detailed Description

TwoIndex 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 symmetric two-index tensors with Abelian point group symmetry (real character table; see Irreps.h): 1DMs and 1-particle matrix elements.

Definition at line 32 of file TwoIndex.h.

Constructor & Destructor Documentation

CheMPS2::TwoIndex::TwoIndex ( 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 31 of file TwoIndex.cpp.

Member Function Documentation

double CheMPS2::TwoIndex::get ( const int  irrep,
const int  i,
const int  j 
) const

Get an element.

Parameters
irrepThe irrep number (see Irreps.h)
iThe first index (within the symmetry block)
jThe second index (within the symmetry block)
Returns
The value of the matrix element

Definition at line 71 of file TwoIndex.cpp.

+ Here is the caller graph for this function:

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

Load the TwoIndex object.

Parameters
namefilename

Definition at line 140 of file TwoIndex.cpp.

+ Here is the caller graph for this function:

void CheMPS2::TwoIndex::save ( const std::string  name) const

Save the TwoIndex object.

Parameters
namefilename

Definition at line 78 of file TwoIndex.cpp.

+ Here is the caller graph for this function:

void CheMPS2::TwoIndex::set ( const int  irrep,
const int  i,
const int  j,
const double  val 
)

Set an element.

Parameters
irrepThe irrep number (see Irreps.h)
iThe first index (within the symmetry block)
jThe second index (within the symmetry block)
valThe value to which the element of the matrix should be set

Definition at line 64 of file TwoIndex.cpp.

+ Here is the caller graph for this function:


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