28#include <initializer_list>
40template <
typename _Shell>
55 std::vector<Shell> shells;
75 ShellSet(
const std::initializer_list<GTOShell>& list) :
88 for (
auto& shell : this->shells) {
89 shell.embedNormalizationFactor();
101 for (
auto& shell : this->shells) {
102 shell.embedNormalizationFactorsOfPrimitives();
114 for (
auto& shell : this->shells) {
115 shell.unEmbedNormalizationFactorsOfPrimitives();
130 for (
const auto& shell : this->shells) {
131 value += shell.numberOfBasisFunctions();
143 std::vector<BasisFunction> basis_functions;
145 for (
const auto& shell : this->shells) {
146 const auto shell_basis_functions = shell.basisFunctions();
147 for (
const auto& shell_basis_function : shell_basis_functions) {
148 basis_functions.push_back(shell_basis_function);
152 return basis_functions;
165 for (
size_t i = 0; i < shell_index; i++) {
166 bf_index += this->shells[i].numberOfBasisFunctions();
180 const std::vector<Shell>&
asVector()
const {
return this->shells; }
193 std::vector<Nucleus>
nuclei {};
194 for (
const auto& shell : this->shells) {
195 const auto& nucleus = shell.nucleus();
197 const auto unary_predicate = [nucleus](
const Nucleus& other) {
200 const auto& p = std::find_if(
nuclei.begin(),
nuclei.end(), unary_predicate);
203 nuclei.push_back(nucleus);
217 std::vector<size_t> angular_momenta {};
220 for (
const auto& shell : this->
asVector()) {
221 angular_momenta.push_back(shell.angularMomentum());
224 const auto it = std::max_element(angular_momenta.begin(), angular_momenta.end());
235 std::vector<size_t> number_of_primitives {};
238 for (
const auto& shell : this->
asVector()) {
239 number_of_primitives.push_back(shell.contractionSize());
242 const auto it = std::max_element(number_of_primitives.begin(), number_of_primitives.end());
258 template <
typename Z = Shell>
262 std::vector<LondonGTOShell> london_shells;
264 for (
const auto& gto_shell : this->
asVector()) {
266 london_shells.push_back(london_shell);
Definition: HomogeneousMagneticField.hpp:30
Definition: LondonGTOShell.hpp:32
Definition: Nucleus.hpp:36
static std::function< bool(const Nucleus &, const Nucleus &)> equalityComparer(const double tolerance=1.0e-08)
Definition: Nucleus.cpp:117
Definition: ShellSet.hpp:41
enable_if_t< std::is_same< Z, GTOShell >::value, ShellSet< LondonGTOShell > > applyLondonModification(const HomogeneousMagneticField &B) const
Definition: ShellSet.hpp:259
void embedNormalizationFactors()
Definition: ShellSet.hpp:86
typename Shell::Primitive Primitive
Definition: ShellSet.hpp:47
typename Shell::BasisFunction BasisFunction
Definition: ShellSet.hpp:50
_Shell Shell
Definition: ShellSet.hpp:44
const std::vector< Shell > & asVector() const
Definition: ShellSet.hpp:180
size_t maximumAngularMomentum() const
Definition: ShellSet.hpp:214
std::vector< BasisFunction > basisFunctions() const
Definition: ShellSet.hpp:141
void unEmbedNormalizationFactorsOfPrimitives()
Definition: ShellSet.hpp:112
size_t numberOfShells() const
Definition: ShellSet.hpp:185
ShellSet(const std::vector< Shell > &shells)
Definition: ShellSet.hpp:66
std::vector< Nucleus > nuclei() const
Definition: ShellSet.hpp:190
size_t numberOfBasisFunctions() const
Definition: ShellSet.hpp:127
ShellSet(const std::initializer_list< GTOShell > &list)
Definition: ShellSet.hpp:75
void embedNormalizationFactorsOfPrimitives()
Definition: ShellSet.hpp:99
size_t maximumNumberOfPrimitives() const
Definition: ShellSet.hpp:232
size_t basisFunctionIndex(const size_t shell_index) const
Definition: ShellSet.hpp:161
Definition: BaseOneElectronIntegralBuffer.hpp:25
typename std::enable_if< B, T >::type enable_if_t
Definition: type_traits.hpp:37