8 #ifndef READUCT_ELEMENTARYSTEPOPTIMIZATION_COSTCALCULATORS_REACTIONPATHCOSTCALCULATOR_H
9 #define READUCT_ELEMENTARYSTEPOPTIMIZATION_COSTCALCULATORS_REACTIONPATHCOSTCALCULATOR_H
11 #include "../MSVCCompatibility.h"
22 namespace ElementaryStepOptimization {
23 struct EnergiesAndGradientsAlongSpline;
25 namespace CostBasedOptimization {
41 std::unique_ptr<ReactionPathCostCalculator> clone()
const;
53 bool energiesRequired()
const;
68 double getCost()
const;
74 Eigen::MatrixXd getCostDerivatives()
const;
77 virtual std::unique_ptr<ReactionPathCostCalculator> cloneImpl()
const = 0;
78 virtual bool energiesRequiredImpl()
const = 0;
81 virtual double getCostImpl()
const = 0;
82 virtual Eigen::MatrixXd getCostDerivativesImpl()
const = 0;
85 inline std::unique_ptr<ReactionPathCostCalculator> ReactionPathCostCalculator::clone()
const {
90 return energiesRequiredImpl();
95 calculateCostImpl(spline, energyValues);
103 return getCostDerivativesImpl();
112 #endif // READUCT_ELEMENTARYSTEPOPTIMIZATION_COSTCALCULATORS_REACTIONPATHCOSTCALCULATOR_H
Interface for the cost calculation of reaction paths.
Definition: ReactionPathCostCalculator.h:39
double getCost() const
Get the cost associated with a given spline (after it has been evaluated).
Definition: ReactionPathCostCalculator.h:98
Definition: EnergiesAndGradientsAlongSpline.h:25
bool energiesRequired() const
Whether energies (and their gradients) are required in the cost calculation.
Definition: ReactionPathCostCalculator.h:89
Eigen::MatrixXd getCostDerivatives() const
Get the cost derivatives associated with a given spline.
Definition: ReactionPathCostCalculator.h:102
void calculateCost(const Utils::BSplines::BSpline &spline, const EnergiesAndGradientsAlongSpline &energyValues)
Evaluate the cost associated with a given spline.
Definition: ReactionPathCostCalculator.h:93