relentless.optimize.ObjectiveFunction#
- class relentless.optimize.ObjectiveFunction#
Abstract base class for the optimization objective function.
An
ObjectiveFunctiondefines the objective function parametrized on one or more adjustableIndependentVariables. The function must also have a defined value and gradient for all values of its parameters.Methods
compute(variables[, directory])Evaluate the value and gradient of the objective function.
- abstract compute(variables, directory=None)#
Evaluate the value and gradient of the objective function.
- Parameters:
variables (
Variableor tuple) – Variables to record in result.directory (str or
Directory) – The ouptut directory. In addition to simulation output, the pair potential design variables at the time of computation are saved (defaults toNone).
- Returns:
The result of the function.
- Return type: