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
SparrowState.h
Go to the documentation of this file.
1 
8 #ifndef SPARROW_SPARROWSTATE_H
9 #define SPARROW_SPARROWSTATE_H
10 
13 #include <exception>
14 
15 namespace Scine {
16 namespace Sparrow {
17 
18 class GenericMethodWrapper;
19 
20 class IncompatibleStateException : public std::exception {
21  public:
22  const char* what() const noexcept final {
23  return "Sparrow state is not compatible with calculation (wrong number of electrons!).";
24  }
25 };
26 
32 struct SparrowState final : public Core::State {
33  explicit SparrowState(Utils::DensityMatrix densityMatrix) : densityMatrix_(std::move(densityMatrix)){};
34  ~SparrowState() final = default;
35 
36  const Utils::DensityMatrix& getDensityMatrix() const {
37  return densityMatrix_;
38  }
39 
40  private:
41  Utils::DensityMatrix densityMatrix_;
42 };
43 
44 } // namespace Sparrow
45 } // namespace Scine
46 
47 #endif // SPARROW_NDDOSTATE_H
Definition: SparrowState.h:20
Definition of a calculation state for methods implemented in Sparrow. The calculation state is define...
Definition: SparrowState.h:32