Scine::Sparrow  5.1.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::Sparrow::CISPseudoDensityBuilder< restrictedness > Class Template Reference

This class evaluates pseudo-density matrices for the construction of the sigma-vectors in the Davidson-Liu algorithm. The calculation is performed according to J. B. Foresman, M. Head-Gordon, J. A. Pople and M. J. Frisch; J. Phys. Chem. 1992, 96, 1, 135-149. More...

#include <CISPseudoDensityBuilder.h>

Collaboration diagram for Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >:
Collaboration graph

Public Types

using SAMType = Utils::SpinAdaptedContainer< restrictedness, Eigen::MatrixXd >
 

Public Member Functions

 CISPseudoDensityBuilder (const Utils::MolecularOrbitals &molecularOrbitals, const Utils::LcaoUtils::ElectronicOccupation &occupation)
 Constructs the class by building the virtual and occupied blocks from the full coefficient matrix. This is done by initializing two matrices to be filled by construct orbitals together with the full coefficient matrix and a vector with the indexes of the occupied orbitals. The constructor is template-specified to call construct-Orbitals once for the restricted and twice for the unrestricted reference (alpha and beta). More...
 
 ~CISPseudoDensityBuilder ()=default
 Destructor.
 
void constructOrbitals (Eigen::MatrixXd &occupiedOrbitals, Eigen::MatrixXd &virtualOrbitals, const Eigen::MatrixXd &allMOs, const std::vector< int > &filledOrbitals)
 Constructs the virtual and occupied blocks from the full coefficient matrix. The blocks are constructed from the full coefficient matrix (allMOs) and the index vector (filledOrbitals), as well as two already initialized matrices for the virtual and occupied coefficients. More...
 
const SAMType getPseudoDensityMatrix (const Utils::SpinAdaptedContainer< restrictedness, Eigen::VectorXd > &guessVector) const
 Evaluates and returns the pseudo-density matrix Calculates the pseudo-density matrix with one guessVector from the Davidson-Liu algorithm. This function calls mapAndMultiply for the calculation of the restricted, alpha and beta variants. More...
 
SAMType getOccupiedOrbitals () const
 Getter for occupied block of coefficient matrix. More...
 
SAMType getVirtualOrbitals () const
 Getter for virtual block of coefficient matrix. More...
 
Eigen::MatrixXd mapAndMultiply (const Eigen::VectorXd &Vector, const Eigen::MatrixXd &virtualMOs, const Eigen::MatrixXd &occupiedMOs) const
 Perform a matrix multiplication of the coefficient blocks with a mapped guessVector. More...
 
template<>
 CISPseudoDensityBuilder (const Utils::MolecularOrbitals &molecularOrbitals, const Utils::LcaoUtils::ElectronicOccupation &occupation)
 
template<>
 CISPseudoDensityBuilder (const Utils::MolecularOrbitals &molecularOrbitals, const Utils::LcaoUtils::ElectronicOccupation &occupation)
 
template<>
const
Utils::SpinAdaptedContainer
< Utils::Reference::Unrestricted,
Eigen::MatrixXd > 
getPseudoDensityMatrix (const Utils::SpinAdaptedContainer< Utils::Reference::Unrestricted, Eigen::VectorXd > &guessVector) const
 
template<>
const
Utils::SpinAdaptedContainer
< Utils::Reference::Restricted,
Eigen::MatrixXd > 
getPseudoDensityMatrix (const Utils::SpinAdaptedContainer< Utils::Reference::Restricted, Eigen::VectorXd > &guessVector) const
 

Detailed Description

template<Utils::Reference restrictedness>
class Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >

This class evaluates pseudo-density matrices for the construction of the sigma-vectors in the Davidson-Liu algorithm. The calculation is performed according to J. B. Foresman, M. Head-Gordon, J. A. Pople and M. J. Frisch; J. Phys. Chem. 1992, 96, 1, 135-149.

\(P\): pseudo-density matrix

\(C\): coefficient matrix with either only occupied or virtual orbitals

\(c\): guess vector

single element of \(P\): \( P_{\lambda \sigma} = \sum_{j b}{C_{\lambda j}}^* c_{j b} C_{\sigma b} \)

Whole \(P\): \( P = C^T c~ C \)

The coefficient matrices are built upon construction of the class, since the full coefficient matrix does not change as well as the occupation.

Template Parameters
restrictednessof the reference calculation as template argument (either restricted or unrestricted)

Constructor & Destructor Documentation

template<Utils::Reference restrictedness>
Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::CISPseudoDensityBuilder ( const Utils::MolecularOrbitals molecularOrbitals,
const Utils::LcaoUtils::ElectronicOccupation occupation 
)

Constructs the class by building the virtual and occupied blocks from the full coefficient matrix. This is done by initializing two matrices to be filled by construct orbitals together with the full coefficient matrix and a vector with the indexes of the occupied orbitals. The constructor is template-specified to call construct-Orbitals once for the restricted and twice for the unrestricted reference (alpha and beta).

Parameters
molecularOrbitals
occupation

Member Function Documentation

template<Utils::Reference restrictedness>
void Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::constructOrbitals ( Eigen::MatrixXd &  occupiedOrbitals,
Eigen::MatrixXd &  virtualOrbitals,
const Eigen::MatrixXd &  allMOs,
const std::vector< int > &  filledOrbitals 
)

Constructs the virtual and occupied blocks from the full coefficient matrix. The blocks are constructed from the full coefficient matrix (allMOs) and the index vector (filledOrbitals), as well as two already initialized matrices for the virtual and occupied coefficients.

Parameters
occupiedOrbitals
virtualOrbitals
allMOs
filledOrbitals
template<Utils::Reference restrictedness>
Utils::SpinAdaptedContainer< restrictedness, Eigen::MatrixXd > Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::getOccupiedOrbitals ( ) const

Getter for occupied block of coefficient matrix.

Returns
occupiedOrbitals
template<Utils::Reference restrictedness>
const SAMType Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::getPseudoDensityMatrix ( const Utils::SpinAdaptedContainer< restrictedness, Eigen::VectorXd > &  guessVector) const

Evaluates and returns the pseudo-density matrix Calculates the pseudo-density matrix with one guessVector from the Davidson-Liu algorithm. This function calls mapAndMultiply for the calculation of the restricted, alpha and beta variants.

Parameters
guessVector
Returns
pseudoDensityMatrix
template<Utils::Reference restrictedness>
CISPseudoDensityBuilder< restrictedness >::SAMType Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::getVirtualOrbitals ( ) const

Getter for virtual block of coefficient matrix.

Returns
virtualOrbitals
template<Utils::Reference restrictedness>
Eigen::MatrixXd Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::mapAndMultiply ( const Eigen::VectorXd &  Vector,
const Eigen::MatrixXd &  virtualMOs,
const Eigen::MatrixXd &  occupiedMOs 
) const

Perform a matrix multiplication of the coefficient blocks with a mapped guessVector.

Parameters
Vector
virtualMOs
occupiedMOs
Returns
Eigen::MatrixXd

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