8 #ifndef SPARROW_GLOBAL2C2EMATRIX_H
9 #define SPARROW_GLOBAL2C2EMATRIX_H
23 class ChargeSeparationParameter;
24 class KlopmanParameter;
33 using orb_index_t = int;
34 using orbPair_index_t = int;
53 localZero_.setSymmetric(sym);
54 localOne_.setSymmetric(sym);
58 template<Utils::DerivativeOrder O>
59 void calculate(
const Eigen::Vector3d& Rab);
61 template<Utils::Derivative O>
62 Utils::AutomaticDifferentiation::DerivativeType<O> getDerivative(orb_index_t o1, orb_index_t o2, orb_index_t o3,
63 orb_index_t o4)
const;
64 template<Utils::Derivative O>
65 Utils::AutomaticDifferentiation::DerivativeType<O> getDerivative(orbPair_index_t op1, orbPair_index_t op2)
const;
66 double get(orb_index_t o1, orb_index_t o2, orb_index_t o3, orb_index_t o4)
const;
67 double get(orbPair_index_t op1, orbPair_index_t op2)
const;
68 orbPair_index_t getPairIndex(orb_index_t o1, orb_index_t o2)
const;
69 const Eigen::MatrixXd& getGlobalMatrix()
const;
73 Eigen::RowVector3d getFirstDerivative(orbPair_index_t op1, orbPair_index_t op2)
const;
76 template<Utils::DerivativeOrder O>
79 template<Utils::DerivativeOrder O>
80 Utils::AutomaticDifferentiation::Value3DType<O> evaluateMatrixElement(orbPair_index_t op1, orbPair_index_t op2);
92 double R_, RNormX_, RNormY_, RNormZ_;
94 Eigen::MatrixXd globalMatrix_;
95 Eigen::Matrix<Utils::AutomaticDifferentiation::First3D, Eigen::Dynamic, Eigen::Dynamic> globalMatrixOne_;
96 Eigen::Matrix<Utils::AutomaticDifferentiation::Second3D, Eigen::Dynamic, Eigen::Dynamic> globalMatrixTwo_;
101 inline Eigen::RowVector3d Global2c2eMatrix::getFirstDerivative(orbPair_index_t op1, orbPair_index_t op2)
const {
102 if (op1 == 100 || op2 == 100)
103 return Utils::Gradient::Zero();
105 return globalMatrixOne_(op1, op2).derivatives();
109 orbPair_index_t op2)
const {
110 if (op1 == 100 || op2 == 100)
113 return globalMatrixTwo_(op1, op2);
116 template<Utils::Derivative O>
117 Utils::AutomaticDifferentiation::DerivativeType<O> Global2c2eMatrix::getDerivative(orb_index_t o1, orb_index_t o2,
118 orb_index_t o3, orb_index_t o4)
const {
119 return getDerivative<O>(getPairIndex(o1, o2), getPairIndex(o3, o4));
123 inline Utils::AutomaticDifferentiation::DerivativeType<Utils::Derivative::First>
124 Global2c2eMatrix::getDerivative<Utils::Derivative::First>(orbPair_index_t op1, orbPair_index_t op2)
const {
125 return getFirstDerivative(op1, op2);
128 inline const Eigen::MatrixXd& Global2c2eMatrix::getGlobalMatrix()
const {
129 return globalMatrix_;
133 inline Utils::AutomaticDifferentiation::DerivativeType<Utils::Derivative::SecondAtomic>
134 Global2c2eMatrix::getDerivative<Utils::Derivative::SecondAtomic>(orbPair_index_t op1, orbPair_index_t op2)
const {
135 return getSecondDerivative(op1, op2);
139 inline Utils::AutomaticDifferentiation::DerivativeType<Utils::Derivative::SecondFull>
140 Global2c2eMatrix::getDerivative<Utils::Derivative::SecondFull>(orbPair_index_t op1, orbPair_index_t op2)
const {
141 return getSecondDerivative(op1, op2);
150 #endif // SPARROW_GLOBAL2C2EMATRIX_H
Definition: Global2c2eMatrix.h:31
This class initializes and stores as a static array the indices of the charge distributions on one ce...
Definition: TwoElectronIntegralIndexes.h:36
This class is the container for the Klopman-Ohno parameters used for the evaluation of the multipoles...
Definition: KlopmanParameter.h:29
Global2c2eMatrix(int l1, int l2, const ChargeSeparationParameter &D1, const ChargeSeparationParameter &D2, const KlopmanParameter &r1, const KlopmanParameter &r2)
constructor of the Global2c2eMatrix, constaining the 2 centers 2 electrons integrals between two atom...
Definition: Global2c2eMatrix.cpp:22
Definition: Global2c2eTerms.h:34
void setSymmetric(bool sym)
set whether the class refers to integrals within two elements of the same type.
Definition: Global2c2eMatrix.h:52
Charge separation D of semi-empirical models. It describes the separation between two charges of oppo...
Definition: ChargeSeparationParameter.h:29