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
Exceptions.h
Go to the documentation of this file.
1 
7 #ifndef SPARROW_EXCEPTIONS_H
8 #define SPARROW_EXCEPTIONS_H
9 
10 namespace Scine {
11 namespace Core {
12 class Calculator;
13 } // namespace Core
14 namespace Sparrow {
15 
17 class InvalidCalculatorType : public std::exception {
18  public:
19  const char* what() const noexcept final {
20  return error.c_str();
21  }
22 
23  protected:
24  std::string error;
25 };
26 
31  public:
32  explicit InvalidCalculatorTypeForCIS(std::shared_ptr<Core::Calculator> method);
33 };
34 
39  public:
40  explicit InvalidCalculatorTypeForTDDFTB(std::shared_ptr<Core::Calculator> method);
41 };
42 
47 class SpinConstantsNotAvailableException : public std::exception {
48  const char* what() const noexcept final {
49  return "Triplet symmetry or Unrestricted TD-DFTB calculation requested, but some spin constants are unavailable.";
50  }
51 };
52 
56 class InvalidReferenceCalculationException : public std::exception {
57  const char* what() const noexcept final {
58  return "Result class of reference calculation does not contain any energy. Remember running "
59  "referenceCalculation().";
60  }
61 };
62 
66 class MissingReferenceCalculatorException : public std::exception {
67  const char* what() const noexcept final {
68  return "No reference calculator was set.";
69  }
70 };
71 
72 class InvalidSpinMultiplicityException : public std::exception {
73  const char* what() const noexcept final {
74  return "Invalid spin symmetry in excited states calculation from RHF reference.";
75  }
76 };
77 } // namespace Sparrow
78 } // namespace Scine
79 
80 #endif // SPARROW_EXCEPTIONS_H
Exception thrown if a non-NDDO calculator is set.
Definition: Exceptions.h:30
Exception for invalid reference calculations.
Definition: Exceptions.h:56
Exception for the case in which an unrestricted or triplet TD-DFTB calculation is asked for...
Definition: Exceptions.h:47
Definition: Exceptions.h:17
Exception thrown if no reference calculator was set.
Definition: Exceptions.h:66
Exception thrown if a non-DFTB calculator is set.
Definition: Exceptions.h:38