TBTK
Need a break? Support the development by playing Polarity Puzzles
GaussianBasisGenerator.h
1 /* Copyright 2019 Kristofer Björnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
17 
24 #ifndef COM_DAFER45_TBTK_GAUSSIAN_BASIS_GENERATOR
25 #define COM_DAFER45_TBTK_GAUSSIAN_BASIS_GENERATOR
26 
27 #include "TBTK/GaussianState.h"
28 
29 #include <unordered_map>
30 #include <vector>
31 
32 #include <libint2.hpp>
33 
34 namespace TBTK{
35 
36 class GaussianBasisGenerator{
37 public:
39  GaussianBasisGenerator();
40 
42  GaussianBasisGenerator(
43  const GaussianBasisGenerator &gaussianBasisGenerator
44  ) = delete;
45 
47  ~GaussianBasisGenerator();
48 
50  GaussianBasisGenerator& operator=(
51  const GaussianBasisGenerator &rhs
52  ) = delete;
53 
55  std::vector<GaussianState> generateBasis();
56 private:
57  std::vector<GaussianState> basisSet;
58 
59  libint2::BasisSet libintBasisSet;
60 
61  std::unordered_map<size_t, std::vector<size_t>> libintShellPairList;
62 
63  std::vector<
64  std::vector<std::shared_ptr<libint2::ShellPair>>
65  > libintShellPairData;
66 
67  std::vector<libint2::Atom> atoms;
68 
69  static unsigned int instanceCounter;
70 
72  void initialize();
73 
75  void initializeBasisSet();
76 
78  void computeShellPairs(double threshold = 1e-12);
79 
81  void calculateSingleParticleTerms(
82  libint2::Operator o,
83  std::function<
84  void(
85  std::complex<double> value,
86  unsigned int linearBraIndex,
87  unsigned int linearKetIndex
88  )
89  > &&lambdaStoreResult
90  );
91 
93  void calculateTwoBodyFockTerms();
94 };
95 
96 }; //End of namespace TBTK
97 
98 #endif
99 
Definition: Boolean.h:32