Class Scine::Utils::Bofill

class Bofill : public Scine::Utils::Optimizer

An implementation of the Bofill optimization algorithm for saddlepoints.

Minimizes along all coordinates except one, along which it maximizes.

Implemented, as described in: Phys. Chem. Chem. Phys., 2002, 4, 11–15 The original paper by Bofill is the following: J. Comput. Chem., 1994, 15, 1

Public Functions

Bofill()

Default constructor.

template<class UpdateFunction>
int optimize(Eigen::VectorXd &parameters, UpdateFunction &&function, GradientBasedCheck &check)

The main routine of the optimizer that carries out the actual optimization.

Return

int Returns the number of optimization cycles carried out until the conclusion of the optimization function.

Template Parameters
  • UpdateFunction: A lambda function with a void return value, and the arguments:

    1. const Eigen::VectorXd& parameters

    2. double& value

    3. Eigen::VectorXd& gradients

    4. Eigen::Matrixd& the Hessian

    5. bool a flag if the Hessian is to be calculated

Parameters
  • parameters: The parameters to be optimized.

  • function: The function to be evaluated in order to get values and gradients for a given set of parameters.

  • check: The ConvergenceCheck to be used in order to determine when the optimization is finished or should stop for other reasons.

virtual void addSettingsDescriptors(UniversalSettings::DescriptorCollection &collection) const

Adds all relevant options to the given UniversalSettings::DescriptorCollection thus expanding it to include the Bofill’s options.

Parameters
  • collection: The DescriptorCollection to which new fields shall be added.

virtual void applySettings(const Settings &settings)

Updates the Bofill’s options with those values given in the Settings.

Parameters
  • settings: The settings to update the option of the steepest descent with.

Public Members

double trustRadius = 0.1

The maximum RMS of a taken step.

int hessianUpdate = 5

The number of cycles in between full Hessian updates.

std::unique_ptr<std::function<void(Eigen::MatrixXd&)>> projection = nullptr

A possible Hessian projection.