Scine::Sparrow  5.0.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
TwoCenterIntegralContainer.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_TWOCENTERINTEGRALCONTAINER_H
9 #define SPARROW_TWOCENTERINTEGRALCONTAINER_H
10 
11 #include "Global2c2eTerms.h"
12 #include <Utils/Typenames.h>
13 #include <memory>
14 #include <utility>
15 #include <vector>
16 
17 namespace Scine {
18 
19 namespace Sparrow {
20 
21 namespace nddo {
22 class ElementParameters;
23 namespace multipole {
24 class Global2c2eMatrix;
25 }
26 
34  public:
35  using integralMatrix_t = std::shared_ptr<multipole::Global2c2eMatrix>;
36  using Container = std::vector<std::vector<integralMatrix_t>>;
37 
46  const ElementParameters& ep);
50  void initialize();
55  void update(Utils::DerivativeOrder order);
56 
63  void set(unsigned int a, unsigned int b, integralMatrix_t mat) {
64  matrices_[a][b] = std::move(mat);
65  }
66 
73  integralMatrix_t get(unsigned int a, unsigned int b) const {
74  // NB: TwoElectronMatrix designed such that always called with a<b.
75  return matrices_[a][b];
76  }
77 
78  private:
79  // Initializes the matrix corresponding to a given atom pair.
80  void initializePair(unsigned int i, unsigned int j);
81  // Updates the matrix corresponding to a given atom pair.
82  void updatePair(unsigned int i, unsigned int j, Utils::DerivativeOrder order);
83 
85  const ElementParameters& elementParameters_;
86  Container matrices_;
87  unsigned int nAtoms_;
88  const Utils::ElementTypeCollection& elementTypes_;
89  const Utils::PositionCollection& positions_;
90 };
91 
92 } // namespace nddo
93 
94 } // namespace Sparrow
95 } // namespace Scine
96 #endif // SPARROW_TWOCENTERINTEGRALCONTAINER_H
Definition: ElementParameters.h:26
void update(Utils::DerivativeOrder order)
Updated the Global2c2eMatrix for each atom pair.
Definition: TwoCenterIntegralContainer.cpp:52
TwoCenterIntegralContainer(const Utils::ElementTypeCollection &elements, const Utils::PositionCollection &positions, const ElementParameters &ep)
constructor, give a reference to the positions, to the elements and to the element paramters...
Definition: TwoCenterIntegralContainer.cpp:18
This class contains smart pointers to two-center two-electron matrices for different atoms...
Definition: TwoCenterIntegralContainer.h:33
Definition: Global2c2eTerms.h:34
void initialize()
Initializes the Global2c2eMatrix for each atom pair. Their size depend on the element pair in questio...
Definition: TwoCenterIntegralContainer.cpp:23
void set(unsigned int a, unsigned int b, integralMatrix_t mat)
sets a Global2c2eMatrix to correspond to a certain atom pair.
Definition: TwoCenterIntegralContainer.h:63