Scine::Sparrow
5.1.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
|
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>
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 |
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.
restrictedness | of the reference calculation as template argument (either restricted or unrestricted) |
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).
molecularOrbitals | |
occupation |
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.
occupiedOrbitals | |
virtualOrbitals | |
allMOs | |
filledOrbitals |
Utils::SpinAdaptedContainer< restrictedness, Eigen::MatrixXd > Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::getOccupiedOrbitals | ( | ) | const |
Getter for occupied block of coefficient matrix.
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.
guessVector |
CISPseudoDensityBuilder< restrictedness >::SAMType Scine::Sparrow::CISPseudoDensityBuilder< restrictedness >::getVirtualOrbitals | ( | ) | const |
Getter for virtual block of coefficient matrix.
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.
Vector | |
virtualMOs | |
occupiedMOs |