CheMPS2
CheMPS2::Problem Class Reference

#include <Problem.h>

Public Member Functions

 Problem (const Hamiltonian *Hamin, const int TwoSin, const int Nin, const int Irrepin)
 Constructor. More...
 
virtual ~Problem ()
 Destructor.
 
int gL () const
 Get the number of orbitals. More...
 
int gSy () const
 Get the point group symmetry. More...
 
int gIrrep (const int nOrb) const
 Get an orbital irrep. More...
 
int gTwoS () const
 Get twice the targeted spin. More...
 
int gN () const
 Get the targeted particle number. More...
 
int gIrrep () const
 Get the targeted irrep. More...
 
double gEconst () const
 Get the constant part of the Hamiltonian. More...
 
double gMxElement (const int alpha, const int beta, const int gamma, const int delta) const
 Get a specific interaction matrix element. More...
 
void setMxElement (const int alpha, const int beta, const int gamma, const int delta, const double value)
 Set the matrix elements: Note that each time you create a DMRG object, they will be overwritten with the eightfold permutation symmetric Hamiltonian again!!! More...
 
void construct_mxelem ()
 Construct a table with the h-matrix elements (two-body augmented with one-body). Remember to recall this function each time you change the Hamiltonian!
 
bool checkConsistency () const
 Check whether the given parameters L, N, and TwoS are not inconsistent and whether 0<=Irrep<nIrreps. A more thorough test will be done when the FCI virtual dimensions are constructed. More...
 
bool gReorder () const
 Get whether the Hamiltonian orbitals are reordered for the DMRG calculation. More...
 
int gf1 (const int HamOrb) const
 Get the DMRG index corresponding to a Ham index. More...
 
int gf2 (const int DMRGOrb) const
 Get the Ham index corresponding to a DMRG index. More...
 
void SetupReorderD2h ()
 Reorder the orbitals, so that they form irrep blocks, with order of irreps Ag B1u B3u B2g B2u B3g B1g Au. Previous reorderings are cleared.
 
void SetupReorderC2v ()
 Reorder the orbitals, so that they form irrep blocks, with order of irreps A1 B1 B2 A2. Previous reorderings are cleared.
 
void setup_reorder_custom (int *dmrg2ham)
 Reorder the orbitals to a custom ordering. Previous reorderings are cleared. More...
 
void setup_reorder_dinfh (int *docc, const double sp_threshold=1e-5)
 Reorder the orbitals for d(infinity)h. Previous reorderings are cleared. More...
 

Detailed Description

Problem class.

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

Setup of the problem that is fed to the DMRG class. It contains

  • the Hamiltonian
  • the targeted spin
  • the targeted particle number
  • the targeted wavefunction irrep

Definition at line 35 of file Problem.h.

Constructor & Destructor Documentation

CheMPS2::Problem::Problem ( const Hamiltonian Hamin,
const int  TwoSin,
const int  Nin,
const int  Irrepin 
)

Constructor.

Parameters
HaminPointer to the Hamiltonian
TwoSinTwice the targeted spin
NinThe targeted particle number
IrrepinThe targeted irrep

Definition at line 31 of file Problem.cpp.

+ Here is the call graph for this function:

Member Function Documentation

bool CheMPS2::Problem::checkConsistency ( ) const

Check whether the given parameters L, N, and TwoS are not inconsistent and whether 0<=Irrep<nIrreps. A more thorough test will be done when the FCI virtual dimensions are constructed.

Returns
True if consistent, else false

Definition at line 385 of file Problem.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::Problem::gEconst ( ) const
inline

Get the constant part of the Hamiltonian.

Returns
The constant part of the Hamiltonian

Definition at line 76 of file Problem.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CheMPS2::Problem::gf1 ( const int  HamOrb) const

Get the DMRG index corresponding to a Ham index.

Parameters
HamOrbThe Ham index
Returns
The DMRG index

Definition at line 347 of file Problem.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Problem::gf2 ( const int  DMRGOrb) const

Get the Ham index corresponding to a DMRG index.

Parameters
DMRGOrbThe DMRG index
Returns
The Ham index

Definition at line 348 of file Problem.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Problem::gIrrep ( const int  nOrb) const

Get an orbital irrep.

Parameters
nOrbThe orbital index
Returns
The irrep of the orbital with index nOrb

Definition at line 336 of file Problem.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CheMPS2::Problem::gIrrep ( ) const
inline

Get the targeted irrep.

Returns
The targeted irrep

Definition at line 72 of file Problem.h.

+ Here is the caller graph for this function:

int CheMPS2::Problem::gL ( ) const
inline

Get the number of orbitals.

Returns
The number of orbitals

Definition at line 51 of file Problem.h.

+ Here is the caller graph for this function:

double CheMPS2::Problem::gMxElement ( const int  alpha,
const int  beta,
const int  gamma,
const int  delta 
) const

Get a specific interaction matrix element.

Parameters
alphaThe first index (0 <= alpha < L)
betaThe second index
gammaThe third index
deltaThe fourth index
Returns
$ h_{\alpha \beta ; \gamma \delta} = \left(\alpha \beta \mid V \mid \gamma \delta \right) + \frac{1}{N-1} \left( \left( \alpha \mid T \mid \gamma \right) \delta_{\beta \delta} + \delta_{\alpha \gamma} \left( \beta \mid T \mid \delta \right) \right) $

Definition at line 350 of file Problem.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Problem::gN ( ) const
inline

Get the targeted particle number.

Returns
The targeted particle number

Definition at line 68 of file Problem.h.

+ Here is the caller graph for this function:

bool CheMPS2::Problem::gReorder ( ) const

Get whether the Hamiltonian orbitals are reordered for the DMRG calculation.

Returns
Whether the Hamiltonian orbitals are reordered

Definition at line 346 of file Problem.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Problem::gSy ( ) const
inline

Get the point group symmetry.

Returns
The point group symmetry

Definition at line 55 of file Problem.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CheMPS2::Problem::gTwoS ( ) const
inline

Get twice the targeted spin.

Returns
Twice the targeted spin

Definition at line 64 of file Problem.h.

+ Here is the caller graph for this function:

void CheMPS2::Problem::setMxElement ( const int  alpha,
const int  beta,
const int  gamma,
const int  delta,
const double  value 
)

Set the matrix elements: Note that each time you create a DMRG object, they will be overwritten with the eightfold permutation symmetric Hamiltonian again!!!

Parameters
alphaThe first index (0 <= alpha < L)
betaThe second index
gammaThe third index
deltaThe fourth index
valueThe value to set the matrix element to

Definition at line 356 of file Problem.cpp.

+ Here is the caller graph for this function:

void CheMPS2::Problem::setup_reorder_custom ( int *  dmrg2ham)

Reorder the orbitals to a custom ordering. Previous reorderings are cleared.

Parameters
dmrg2hamArray which contains the reordering: dmrg2ham[ dmrg_lattice_site ] = hamiltonian_index.

Definition at line 150 of file Problem.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::Problem::setup_reorder_dinfh ( int *  docc,
const double  sp_threshold = 1e-5 
)

Reorder the orbitals for d(infinity)h. Previous reorderings are cleared.

Parameters
doccArray which contains for each irrep the number of doubly occupied orbitals
sp_thresholdThreshold to detect Delta_g and Delta_u partners based on single-particle energies

Definition at line 177 of file Problem.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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