File ConvergenceCheck.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
class ConvergenceCheck
#include <ConvergenceCheck.h>

The base class for all convergence checks.

Similar to the actual Optimizer the convergence check is abstracted into a class that shall allow both usage via Settings object and as a ‘raw’ class using the public members to adjust the convergence criteria.

To this end the base class defines and enforces the presence of the functions that parse the

Settings into these members and vice versa.

In general, it is adviseable to derive classes that also only require the use of a default constructor, after all the convergence checks are mostly defined by a set of thresholds and any data should be required in the actual optimization cycles and not upon creation of the derived object.

Subclassed by Scine::Utils::GradientBasedCheck

Public Functions

ConvergenceCheck()

Default Constructor.

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

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

This function has to be implemented in derived classes in order to allow for all ConvergenceChecks to be used and configured at runtime by end users.

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

virtual void applySettings(const Settings &settings) = 0

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

This function has to be implemented in derived classes in order to allow for all ConvergenceChecks to be used and configured at runtime by end users.

Note: Additional settings that are not used by the optimizer shall not generate errors, or warnings, they shall simply be ignored.

Parameters
  • settings: The settings to update the option of this optimizer with.