CheMPS2
|
#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... | |
Problem class.
Setup of the problem that is fed to the DMRG class. It contains
CheMPS2::Problem::Problem | ( | const Hamiltonian * | Hamin, |
const int | TwoSin, | ||
const int | Nin, | ||
const int | Irrepin | ||
) |
Constructor.
Hamin | Pointer to the Hamiltonian |
TwoSin | Twice the targeted spin |
Nin | The targeted particle number |
Irrepin | The targeted irrep |
Definition at line 31 of file Problem.cpp.
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.
Definition at line 385 of file Problem.cpp.
|
inline |
Get the constant part of the Hamiltonian.
Definition at line 76 of file Problem.h.
int CheMPS2::Problem::gf1 | ( | const int | HamOrb | ) | const |
Get the DMRG index corresponding to a Ham index.
HamOrb | The Ham index |
Definition at line 347 of file Problem.cpp.
int CheMPS2::Problem::gf2 | ( | const int | DMRGOrb | ) | const |
Get the Ham index corresponding to a DMRG index.
DMRGOrb | The DMRG index |
Definition at line 348 of file Problem.cpp.
int CheMPS2::Problem::gIrrep | ( | const int | nOrb | ) | const |
Get an orbital irrep.
nOrb | The orbital index |
Definition at line 336 of file Problem.cpp.
|
inline |
|
inline |
double CheMPS2::Problem::gMxElement | ( | const int | alpha, |
const int | beta, | ||
const int | gamma, | ||
const int | delta | ||
) | const |
Get a specific interaction matrix element.
alpha | The first index (0 <= alpha < L) |
beta | The second index |
gamma | The third index |
delta | The fourth index |
Definition at line 350 of file Problem.cpp.
|
inline |
bool CheMPS2::Problem::gReorder | ( | ) | const |
Get whether the Hamiltonian orbitals are reordered for the DMRG calculation.
Definition at line 346 of file Problem.cpp.
|
inline |
|
inline |
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!!!
alpha | The first index (0 <= alpha < L) |
beta | The second index |
gamma | The third index |
delta | The fourth index |
value | The value to set the matrix element to |
Definition at line 356 of file Problem.cpp.
void CheMPS2::Problem::setup_reorder_custom | ( | int * | dmrg2ham | ) |
Reorder the orbitals to a custom ordering. Previous reorderings are cleared.
dmrg2ham | Array which contains the reordering: dmrg2ham[ dmrg_lattice_site ] = hamiltonian_index. |
Definition at line 150 of file Problem.cpp.
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.
docc | Array which contains for each irrep the number of doubly occupied orbitals |
sp_threshold | Threshold to detect Delta_g and Delta_u partners based on single-particle energies |
Definition at line 177 of file Problem.cpp.