File Settings.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 Settings : public Scine::Utils::UniversalSettings::ValueCollection
#include <Settings.h>

An interface for settings of all sorts.

This interface allows all other interfaces in Scine::Core to have a central place for Settings, while their implementations maintain their specific settings independently.

Implementation Notes:

  • A derived class of the Settings class has to define a construcor that populates the protected _fields member with a set of possible options and their default/descriptions.

Subclassed by Scine::Utils::AFIROptimizerSettings< OptimizerType, ConvergenceCheckType >, Scine::Utils::GeometryOptimizerSettings< OptimizerType, ConvergenceCheckType >, Scine::Utils::IRCOptimizerSettings< OptimizerType, ConvergenceCheckType >, Scine::Utils::OrcaCalculatorSettings

Public Functions

Settings(std::string name)

Construct a new Settings object.

Parameters
  • name:

Settings(Utils::UniversalSettings::ValueCollection settings, Utils::UniversalSettings::DescriptorCollection fields)

Constructor from ValueCollection and DescriptorCollection.

const std::string &name() const

Getter for the name set in the constructor of the settings object.

Return

std::string Returns the name.

bool check() const

Checks if the current settings are acceptable w.r.t.

the defined boundaries.

Return

true If the settings are valid.

false If the settings are not valid.

void resetToDefaults()

Resets the current settings to the default ones.

const Utils::UniversalSettings::DescriptorCollection &getDescriptorCollection() const

Returns a const reference of the protected member _fields.

Return

const Utils::UniversalSettings::DescriptorCollection& Underlying descriptor collection.

Settings getDefaultSettingsForOptionListWithSettings(const std::string &key, const std::string &option)

Returns the default ValueCollection as a settings object for a given key and option.

Return

Settings The default settings corresponding to the option.

Parameters
  • key: The key describing the ParametrizedOptionListDescriptor.

  • option: The option of which the default ValueCollection should be returned.

Protected Attributes

std::string _name

The blueprint for the allowed options.

All derived classes need to populate this collection in their constructor.

Utils::UniversalSettings::DescriptorCollection _fields