45#include "optimization/MinimizerParameters.hpp"
52 MinimizerParameters::MinimizerParameters() {
53 DefineOptionalParameterWithDefaultValue(UseMinimizer,
"useMinimizer",
55 DefineOptionalParameterWithDefaultValue(Method,
"method",
"SD");
56 DefineOptionalParameterWithDefaultValue(MaxIterations,
"maxIterations",
58 DefineOptionalParameterWithDefaultValue(
59 MaxStationaryStateIterations,
"maxStationaryStateIterations", 100);
60 DefineOptionalParameterWithDefaultValue(RootEpsilon,
"rootEpsilon", 1e-5);
61 DefineOptionalParameterWithDefaultValue(FunctionEpsilon,
"functionEpsilon",
63 DefineOptionalParameterWithDefaultValue(GradientNormEpsilon,
64 "gradientNormEpsilon", 1e-5);
65 DefineOptionalParameterWithDefaultValue(InitialStepSize,
"initialStepSize",
69 MinimizerParameters::~MinimizerParameters() {}
71 void MinimizerParameters::validate() {
72 CheckParameter(Method, isEqualIgnoreCase(
"SD") || isEqualIgnoreCase(
"CG") ||
73 isEqualIgnoreCase(
"BFGS"));
74 CheckParameter(MaxIterations, isPositive());
76 int mi = this->getMaxIterations();
79 CheckParameter(MaxStationaryStateIterations,
80 isGreaterThanOrEqualTo(one) && isLessThanOrEqualTo(mi));
81 CheckParameter(RootEpsilon, isPositive());
82 CheckParameter(GradientNormEpsilon, isPositive());
83 CheckParameter(InitialStepSize,
84 isGreaterThan(zero) && isLessThanOrEqualTo(oneR));
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.