Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
ParameterOptimizer.h
Go to the documentation of this file.
1 
8 #ifndef MMPARAMETRIZATION_PARAMETEROPTIMIZER_H
9 #define MMPARAMETRIZATION_PARAMETEROPTIMIZER_H
10 
11 #include <memory>
12 
13 namespace Scine {
14 
15 namespace Core {
16 struct Log;
17 } // namespace Core
18 
19 namespace Utils {
20 class Settings;
21 } // namespace Utils
22 
23 namespace MMParametrization {
24 struct ParametrizationData;
25 
31  public:
35  ParameterOptimizer(ParametrizationData& data, std::shared_ptr<Utils::Settings> settings, Core::Log& log);
40  void optimizeParameters();
41 
42  private:
43  // Implementation of the optimization function
44  void optimizeParametersImpl();
45  // Implementation of the optimization of dihedral parameters
46  void optimizeDihedralParametersImpl();
47  // Implementation of the optimization of angle parameters
48  void optimizeAngleParametersImpl();
49  // Implementation of the optimization of bond parameters
50  void optimizeBondParametersImpl();
51  // Implementation of the optimization of improper dihedral parameters
52  void optimizeImproperDihedralParametersImpl();
53  // The data used within all MM parametrization classes
54  ParametrizationData& data_;
55  // The settings
56  std::shared_ptr<Utils::Settings> settings_;
57  // The logger.
58  Core::Log& log_;
59  // Maximum number of function evaluations employed for the least squares partial Hessian fit
60  static constexpr int maximumNumberOfFunctionEvaluationsInOptimization_ = 7;
61 };
62 
63 } // namespace MMParametrization
64 } // namespace Scine
65 
66 #endif // MMPARAMETRIZATION_PARAMETEROPTIMIZER_H
The class optimizes the force constants of the MM model in a least squares manner.
Definition: ParameterOptimizer.h:30
ParameterOptimizer(ParametrizationData &data, std::shared_ptr< Utils::Settings > settings, Core::Log &log)
Constructor.
Definition: ParameterOptimizer.cpp:23
void optimizeParameters()
This function optimizes the force constants of the MM model, which part of the MM parameters stored i...
Definition: ParameterOptimizer.cpp:27
This struct holds all objects used inside the MM parametrization algorithm.
Definition: ParametrizationData.h:29