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
GTOOverlapMatrixBlock.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_GTOOVERLAPMATRIXBLOCK_H
9 #define SPARROW_GTOOVERLAPMATRIXBLOCK_H
10 
12 #include <Eigen/Core>
13 
14 namespace Scine {
15 
16 namespace Utils {
17 class MatrixWithDerivatives;
18 class GtoExpansion;
19 } // namespace Utils
20 
21 namespace Sparrow {
22 
23 namespace nddo {
24 
26  explicit AngularMomentum(int lx = 0, int ly = 0, int lz = 0) : x(lx), y(ly), z(lz) {
27  }
28  int x;
29  int y;
30  int z;
31 };
32 
39 template<Utils::DerivativeOrder O>
41  public:
42  using Value3D = Utils::AutomaticDifferentiation::Value3DType<O>;
43  using Value1D = Utils::AutomaticDifferentiation::Value1DType<O>;
47  Eigen::Matrix<Value3D, Eigen::Dynamic, Eigen::Dynamic>
48  getMatrixBlock(const Utils::GtoExpansion& gA, const Utils::GtoExpansion& gB, const Eigen::Vector3d& Rab);
49 
50  private:
51  void addGTFContribution(int GTFA, int GTFB, const Utils::GtoExpansion& gA, const Utils::GtoExpansion& gB,
52  const Eigen::Vector3d& Rab);
53  Eigen::Matrix<Value3D, Eigen::Dynamic, Eigen::Dynamic> computeBlock(const Utils::GtoExpansion& gA,
54  const Utils::GtoExpansion& gB);
55  Value3D directionsProduct(const Value1D& X, const Value1D& Y, const Value1D& Z);
56  Value3D getKBase(double x, double y, double z, double fac);
57  void setRArray(double x, double y, double z, double expSum);
58 
59  const double sqrt3, pi;
60 
61  const Value1D nullValue;
62  int startGTFA_, startGTFB_;
63  int nGTFsA_, nGTFsB_;
64  Eigen::Matrix<Value3D, Eigen::Dynamic, Eigen::Dynamic> result;
65  AngularMomentum momenta[10];
66  int AOIndexes[10];
67  Value1D r[3], p[3];
68  Value1D SDo[3][3][3];
69  Value3D KD, contributionD;
70  Value1D Dist1, Dist2;
71 };
72 
73 } // namespace nddo
74 
75 } // namespace Sparrow
76 } // namespace Scine
77 #endif // SPARROW_GTOOVERLAPMATRIXBLOCK_H
GTOOverlapMatrixBlock()
Constructor initializing the angular momenta and indices of the orbitals used for the calculation...
Definition: GTOOverlapMatrixBlock.cpp:25
Definition: GTOOverlapMatrixBlock.h:25
This class calculates the overlap matrix block and its derivatives for two groups of orbitals on diff...
Definition: GTOOverlapMatrixBlock.h:40
Eigen::Matrix< Value3D, Eigen::Dynamic, Eigen::Dynamic > getMatrixBlock(const Utils::GtoExpansion &gA, const Utils::GtoExpansion &gB, const Eigen::Vector3d &Rab)
Getter for the matrix block calculated.
Definition: GTOOverlapMatrixBlock.cpp:51