8 #ifndef READUCT_ELEMENTARYSTEPOPTIMIZATION_COSTCALCULATORS_REACTIONPATHCOSTCALCULATOR_H
9 #define READUCT_ELEMENTARYSTEPOPTIMIZATION_COSTCALCULATORS_REACTIONPATHCOSTCALCULATOR_H
21 namespace ElementaryStepOptimization {
22 struct EnergiesAndGradientsAlongSpline;
24 namespace CostBasedOptimization {
40 std::unique_ptr<ReactionPathCostCalculator> clone()
const;
76 virtual std::unique_ptr<ReactionPathCostCalculator> cloneImpl()
const = 0;
77 virtual bool energiesRequiredImpl()
const = 0;
80 virtual double getCostImpl()
const = 0;
81 virtual Eigen::MatrixXd getCostDerivativesImpl()
const = 0;
84 inline std::unique_ptr<ReactionPathCostCalculator> ReactionPathCostCalculator::clone()
const {
89 return energiesRequiredImpl();
94 calculateCostImpl(spline, energyValues);
102 return getCostDerivativesImpl();
111 #endif // ELEMENTARYSTEPOPTIMIZATION_COSTBASEDOPTIMIZATION_REACTIONPATHCOSTCALCULATOR_H
Interface for the cost calculation of reaction paths.
Definition: ReactionPathCostCalculator.h:38
double getCost() const
Get the cost associated with a given spline (after it has been evaluated).
Definition: ReactionPathCostCalculator.h:97
virtual ~ReactionPathCostCalculator()=default
Default destructor.
Definition: EnergiesAndGradientsAlongSpline.h:25
bool energiesRequired() const
Whether energies (and their gradients) are required in the cost calculation.
Definition: ReactionPathCostCalculator.h:88
Eigen::MatrixXd getCostDerivatives() const
Get the cost derivatives associated with a given spline.
Definition: ReactionPathCostCalculator.h:101
void calculateCost(const Utils::BSplines::BSpline &spline, const EnergiesAndGradientsAlongSpline &energyValues)
Evaluate the cost associated with a given spline.
Definition: ReactionPathCostCalculator.h:92