CheMPS2
CheMPS2::DMRG Class Reference

#include <DMRG.h>

Public Member Functions

 DMRG (Problem *Probin, ConvergenceScheme *OptSchemeIn, const bool makechkpt=CheMPS2::DMRG_storeMpsOnDisk, const string tmpfolder=CheMPS2::defaultTMPpath)
 Constructor. More...
 
virtual ~DMRG ()
 Destructor.
 
double Solve ()
 Solver. More...
 
void PreSolve ()
 Reconstruct the renormalized operators when you overwrite the matrix elements with Prob->setMxElement()
 
void calc2DMandCorrelations ()
 Calculate the 2-RDM and correlations. Afterwards the MPS is again in LLLLLLLC gauge.
 
void calc_rdms_and_correlations (const bool do_3rdm, const bool disk_3rdm=false)
 Calculate the reduced density matrices and correlations. Afterwards the MPS is again in LLLLLLLC gauge. More...
 
TwoDMget2DM ()
 Get the pointer to the 2-RDM. More...
 
ThreeDMget3DM ()
 Get the pointer to the 3-RDM. More...
 
void Symm4RDM (double *output, const int ham_orb1, const int ham_orb2, const bool last_case)
 Obtain the symmetrized 4-RDM terms 0.5 * ( Gamma4_ijkl,pqrt + Gamma4_ijkt,pqrl ) with l and t fixed, after the 3-RDM has been calculated. More...
 
CorrelationsgetCorrelations ()
 Get the pointer to the Correlations. More...
 
double getSpecificCoefficient (int *coeff) const
 Get a specific FCI coefficient. The array coeff contains the occupation numbers of the L Hamiltonian orbitals. It is assumed that the unpaired electrons are all alpha electrons, and that this number equals twice the total targeted spin. More...
 
double getFCIcoefficient (int *alpha, int *beta, const bool mpi_chemps2_master_only=true) const
 Get a specific FCI coefficient. The arrays alpha and beta contain the alpha and beta occupation numbers of the L Hamiltonian orbitals. More...
 
void deleteStoredMPS ()
 Call "rm " + CheMPS2::DMRG_MPS_storage_prefix + "*.h5".
 
void deleteStoredOperators ()
 Call "rm " + tempfolder + "/" + CheMPS2::DMRG_OPERATOR_storage_prefix + string(thePID) + "*.h5";.
 
void activateExcitations (const int maxExcIn)
 Activate the necessary storage and machinery to handle excitations. More...
 
void newExcitation (const double EshiftIn)
 Push back current calculation and set everything up to calculate a (new) excitation. More...
 

Static Public Member Functions

static void PrintLicense ()
 Print the license.
 

Detailed Description

DMRG class.

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

The DMRG class solves the Problem with its given parameters. A fully SU(2) symmetric MPS wavefunction is variationally optimized in a two-site sweep algorithm. When the solution has been reached, the converged energy and spin contracted 2DMs can be accessed. For more information, please take a look at

S. Wouters, W. Poelmans, P.W. Ayers and D. Van Neck,
CheMPS2: a free open-source spin-adapted implementation of the density matrix renormalization group for ab initio quantum chemistry,
Computer Physics Communications 185, 1501-1514 (2014)
http://dx.doi.org/10.1016/j.cpc.2014.01.019
http://arxiv.org/abs/1312.2415

S. Wouters and D. Van Neck,
The density matrix renormalization group for ab initio quantum chemistry,
European Physical Journal D 68, 272 (2014)
http://dx.doi.org/10.1140/epjd/e2014-50500-1
http://arxiv.org/abs/1407.2040

The user manual: http://sebwouters.github.io/CheMPS2/index.html

Definition at line 82 of file DMRG.h.

Constructor & Destructor Documentation

CheMPS2::DMRG::DMRG ( Problem Probin,
ConvergenceScheme OptSchemeIn,
const bool  makechkpt = CheMPS2::DMRG_storeMpsOnDisk,
const string  tmpfolder = CheMPS2::defaultTMPpath 
)

Constructor.

Parameters
ProbinThe problem to be solved
OptSchemeInThe optimization scheme for the DMRG sweeps
makechkptWhether or not to save MPS checkpoints in the working directory
tmpfolderTemporary folder on a large partition to store the renormalized operators on disk (by default "/tmp")

Definition at line 36 of file DMRG.cpp.

+ Here is the call graph for this function:

Member Function Documentation

void CheMPS2::DMRG::activateExcitations ( const int  maxExcIn)

Activate the necessary storage and machinery to handle excitations.

Parameters
maxExcInThe max. number of excitations desired

Definition at line 384 of file DMRG.cpp.

+ Here is the caller graph for this function:

void CheMPS2::DMRG::calc_rdms_and_correlations ( const bool  do_3rdm,
const bool  disk_3rdm = false 
)

Calculate the reduced density matrices and correlations. Afterwards the MPS is again in LLLLLLLC gauge.

Parameters
do_3rdmWhether or not to calculate the 3-RDM
disk_3rdmWhether or not to use disk in order to avoid storing the full 3-RDM of size L^6

Definition at line 40 of file DMRGtechnics.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TwoDM* CheMPS2::DMRG::get2DM ( )
inline

Get the pointer to the 2-RDM.

Returns
The 2-RDM. Returns a NULL pointer if not yet calculated.

Definition at line 113 of file DMRG.h.

+ Here is the caller graph for this function:

ThreeDM* CheMPS2::DMRG::get3DM ( )
inline

Get the pointer to the 3-RDM.

Returns
The 3-RDM. Returns a NULL pointer if not yet calculated.

Definition at line 117 of file DMRG.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Correlations* CheMPS2::DMRG::getCorrelations ( )
inline

Get the pointer to the Correlations.

Returns
The Correlations. Returns a NULL pointer if not yet calculated.

Definition at line 128 of file DMRG.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::DMRG::getFCIcoefficient ( int *  alpha,
int *  beta,
const bool  mpi_chemps2_master_only = true 
) const

Get a specific FCI coefficient. The arrays alpha and beta contain the alpha and beta occupation numbers of the L Hamiltonian orbitals.

Parameters
alphaArray containing the alpha electron occupation numbers of the L Hamiltonian orbitals (occupations can be 0 or 1).
betaArray containing the beta electron occupation numbers of the L Hamiltonian orbitals (occupations can be 0 or 1).
mpi_chemps2_master_onlyWhen running with MPI, whether only the master process should calculate the FCI coefficient. If false, any process can calculate the FCI coefficient, and it won't be broadcasted (allows for parallel FCI coefficient calculation).
Returns
The desired FCI coefficient

Definition at line 341 of file DMRGtechnics.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::DMRG::getSpecificCoefficient ( int *  coeff) const

Get a specific FCI coefficient. The array coeff contains the occupation numbers of the L Hamiltonian orbitals. It is assumed that the unpaired electrons are all alpha electrons, and that this number equals twice the total targeted spin.

Parameters
coeffArray containing the occupation numbers of the L Hamiltonian orbitals (occupations can be 0, 1, or 2).
Returns
The desired FCI coefficient

Definition at line 324 of file DMRGtechnics.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::DMRG::newExcitation ( const double  EshiftIn)

Push back current calculation and set everything up to calculate a (new) excitation.

Parameters
EshiftInTo the Hamiltonian, a level shift is introduced to exclude the previously calculated MPS: Hnew = Hold + EshiftIn * | prev> <prev|

Definition at line 395 of file DMRG.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::DMRG::Solve ( )

Solver.

Returns
The min. energy encountered so far during the sweeps.

Definition at line 199 of file DMRG.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::DMRG::Symm4RDM ( double *  output,
const int  ham_orb1,
const int  ham_orb2,
const bool  last_case 
)

Obtain the symmetrized 4-RDM terms 0.5 * ( Gamma4_ijkl,pqrt + Gamma4_ijkt,pqrl ) with l and t fixed, after the 3-RDM has been calculated.

Parameters
outputArray to store the symmetrized 4-RDM terms in Hamiltonian index notation: output[ i + L * ( j + L * ( k + L * ( p + L * ( q + L * r )))) ] = 0.5 * ( Gamma4_ijkl,pqrt + Gamma4_ijkt,pqrl ).
ham_orb1The Hamiltonian index of the first fixed orbital.
ham_orb2The Hamiltonian index of the second fixed orbital.
last_caseIf true, everything will be set up to allow to continue sweeping.

Definition at line 41 of file DMRGfock.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: