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
ElementParameters.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_ELEMENTPARAMETERS_H
9 #define SPARROW_ELEMENTPARAMETERS_H
10 
11 #include "AtomicParameters.h"
14 #include <memory>
15 
16 namespace Scine {
17 namespace Sparrow {
18 
19 namespace nddo {
20 
27  public:
28  using par_t = std::unique_ptr<AtomicParameters>;
29  using PPContainer = std::vector<par_t>;
30 
31  ElementParameters() : parameters_(110) {
32  }
33  void clear() {
34  std::fill(parameters_.begin(), parameters_.end(), nullptr);
35  }
36  bool isSet(Utils::ElementType e) const {
37  return parameters_[Utils::ElementInfo::Z(e)] != nullptr;
38  }
39  void set(Utils::ElementType e, par_t parameters) {
40  parameters_[Utils::ElementInfo::Z(e)] = std::move(parameters);
41  } // TODO: elementtype not needed, included in parameters
42  const AtomicParameters& get(Utils::ElementType e) const {
43  return *parameters_[Utils::ElementInfo::Z(e)];
44  }
45 
46  private:
47  PPContainer parameters_;
48 };
49 
50 } // namespace nddo
51 
52 } // namespace Sparrow
53 } // namespace Scine
54 #endif // SPARROW_ELEMENTPARAMETERS_H
Definition: ElementParameters.h:26
static constexpr unsigned Z(const ElementType e) noexcept
Definition: AtomicParameters.h:29