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
DFTBMethodWrapper.h
Go to the documentation of this file.
1 
7 #ifndef SPARROW_DFTBMETHODWRAPPER_H
8 #define SPARROW_DFTBMETHODWRAPPER_H
9 
12 
13 namespace Scine {
14 namespace Sparrow {
15 class TDDFTBData;
16 
18  : public Utils::CloneInterface<Utils::Abstract<DFTBMethodWrapper>, GenericMethodWrapper, Core::Calculator> {
19  public:
25  ~DFTBMethodWrapper() override;
32  TDDFTBData getTDDFTBData() const;
37  bool allowsPythonGILRelease() const override {
38  return true;
39  };
40 
41  private:
42  void assembleResults(const std::string& description) final;
43 
44  protected:
45  virtual TDDFTBData getTDDFTBDataImpl() const = 0;
46 
47  // Extracted method from all copy constructors and copy assignment operators.
48  template<class DFTBMethod>
49  void copyInto(DFTBMethod& instance, const DFTBMethod& classToCopy) {
50  auto results = classToCopy.results();
51  instance.settings() = classToCopy.settings();
52  // Concurrent calling of the logger introduces race conditions
53  // that eventually trigger a segfault
54  instance.setStructure(*classToCopy.getStructure());
55  instance.results() = std::move(results);
56  instance.loadState(classToCopy.getState());
57  instance.setLog(classToCopy.getLog());
58  }
59  bool getZPVEInclusion() const final;
60 };
61 
62 } // namespace Sparrow
63 } // namespace Scine
64 
65 #endif // SPARROW_DFTBMETHODWRAPPER_H
Definition: DFTBMethodWrapper.h:17
bool allowsPythonGILRelease() const override
Whether the calculator has no underlying Python code and can therefore release the global interpreter...
Definition: DFTBMethodWrapper.h:37
DFTBMethodWrapper()
Constructor. It plays with the befriended states handler by giving it a *this reference.
This class contains the infos needed to perform a TD-DFTB calculation. This way excited states proper...
Definition: TDDFTBData.h:27
Utils::PropertyList possibleProperties() const final
Get the list of the possible properties to calculate analytically. Since it is the same for all DFTB...
Definition: DFTBMethodWrapper.cpp:20