8 #ifndef MMPARAMETRIZATION_DATABASEHELPER_H
9 #define MMPARAMETRIZATION_DATABASEHELPER_H
13 #include <unordered_set>
33 namespace MMParametrization {
34 struct ParametrizationData;
62 void resetAnalyzedCalculationsAndDetectExistingSubsequentCalculations();
67 bool analyzedCalculationsHasFailed(
const Database::Calculation& calculation)
const;
72 void addCalculationsToDatabaseForUnoptimizedStructures();
77 void collectResultsAndSubmitSubsequentCalculations();
84 int handleCompletedCalculations(std::shared_ptr<Database::Collection> calculations,
85 std::shared_ptr<Database::Collection> structures,
86 std::shared_ptr<Database::Collection> properties);
93 int handleFailedCalculations(std::shared_ptr<Database::Collection> calculations,
94 std::shared_ptr<Database::Collection> structures);
97 void addStructuresToDatabase();
101 void setNameOfHessianOrder();
105 void setNameOfStructureOptimizationOrder();
109 void setNameOfBondOrdersOrder();
113 void setNameOfAtomicChargesOrder();
117 bool mustCalculateAtomicChargesSeparately()
const;
121 void evaluatePriorities();
126 bool optimizedStructureIsValid(
int structureIndex)
const;
130 std::vector<std::unique_ptr<Database::ID>> structureIDs_;
132 int numberOfStructures_;
136 bool refineConnectivity_;
140 bool earlyTerminationEnabled_;
151 std::vector<int> failedCalculationsScoreForEachFragment_;
153 std::vector<std::vector<std::string>> failedCalculationsForEachFragment_;
157 std::unordered_set<int> fragmentsWithHessianCalculationsInDatabase_;
159 std::unordered_set<int> fragmentsWithAtomicChargesCalculationsInDatabase_;
161 std::string referenceProgram_;
163 std::string referenceMethod_;
165 std::string referenceBasisSet_;
167 std::string nameOfStructureOptimizationOrder_;
169 std::string nameOfHessianOrder_;
171 std::string nameOfBondOrdersOrder_;
173 std::string nameOfAtomicChargesOrder_;
175 std::vector<int> priorities_;
179 std::shared_ptr<Utils::Settings> settings_;
181 std::unique_ptr<Database::Manager> database_;
189 #endif // MMPARAMETRIZATION_DATABASEHELPER_H
Definition: DatabaseHelper.h:36
void runCalculationsAndCollectResults()
Runs structure optimizations and other reference calculations (Hessians, charges, bond orders) and sa...
Definition: DatabaseHelper.cpp:95
This struct holds all objects used inside the MM parametrization algorithm.
Definition: ParametrizationData.h:29
DatabaseHelper(ParametrizationData &data, const std::shared_ptr< Utils::Settings > &settings, Core::Log &log)
Constructor.
Definition: DatabaseHelper.cpp:40
void dropDatabase()
Deletes the database.
Definition: DatabaseHelper.cpp:554
~DatabaseHelper()
Destructor.