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
Global2c2eTerms.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_GLOBAL2C2ETERMS_H
9 #define SPARROW_GLOBAL2C2ETERMS_H
10 
11 #include "OrbitalRotation.h"
13 #include <array>
14 #include <list>
15 #include <vector>
16 
17 namespace Scine {
18 namespace Sparrow {
19 
20 namespace nddo {
21 
22 namespace multipole {
23 
24 struct RotationTerm {
25  RotationTerm(unsigned int p1, unsigned int p2, GeneralTypes::rotationOrbitalPair f1, GeneralTypes::rotationOrbitalPair f2,
26  GeneralTypes::rotationOrbitalPair f3, GeneralTypes::rotationOrbitalPair f4)
27  : f1_(f1), f2_(f2), f3_(f3), f4_(f4), pair1_(p1), pair2_(p2) {
28  }
29 
30  GeneralTypes::rotationOrbitalPair f1_, f2_, f3_, f4_; // NB: or store directly the uint ?
31  unsigned int pair1_, pair2_;
32 };
33 
35  public:
36  using RotationTerms = std::list<RotationTerm>;
37  using RotationTermsArray = std::vector<std::vector<RotationTerms>>;
38 
39  using orb_index_t = int;
40  using orbPair_index_t = int;
41 
42  const RotationTerms& getTermList(orbPair_index_t op1, orbPair_index_t op2) const {
43  static RotationTermsArray expressions = createRotationTerms();
44  return expressions[op1][op2];
45  }
46 
47  private:
48  static RotationTermsArray createRotationTerms();
49  static void createTerm(RotationTermsArray& expressions, std::array<int, 8> i);
50  static bool compatibleOrbitals(int a, int b);
51 };
52 
53 } // namespace multipole
54 
55 } // namespace nddo
56 
57 } // namespace Sparrow
58 } // namespace Scine
59 #endif // SPARROW_GLOBAL2C2ETERMS_H
Definition: Global2c2eTerms.h:24
Definition: Global2c2eTerms.h:34