The DescentMinimizer
class – …¶

class
nifty.
DescentMinimizer
[source]¶ Bases:
keepers.logging.loggable.Loggable
,object
A base class used by gradient methods to find a local minimum.
Descent minimization methods are used to find a local minimum of a scalar function by following a descent direction. This class implements the minimization procedure once a descent direction is known. The descent direction has to be implemented separately.
Parameters: line_searcher : callable optional
Function which infers the step size in the descent direction (default : LineSearchStrongWolfe()).
callback : callable optional
Function f(energy, iteration_number) supplied by the user to perform insitu analysis at every iteration step. When being called the current energy and iteration_number are passed. (default: None)
convergence_tolerance : float optional
Tolerance specifying the case of convergence. (default: 1E4)
convergence_level : integer optional
Number of times the tolerance must be undershot before convergence is reached. (default: 3)
iteration_limit : integer optional
Maximum number of iterations performed (default: None).
Notes
The callback function can be used to externally stop the minimization by raising a StopIteration exception. Check get_descent_direction of a derived class for information on the concrete minization scheme.
Attributes
convergence_tolerance (float) Tolerance specifying the case of convergence. convergence_level (integer) Number of times the tolerance must be undershot before convergence is reached. (default: 3) iteration_limit (integer) Maximum number of iterations performed. line_searcher (LineSearch) Function which infers the optimal step size for functional minization given a descent direction. callback (function) Function f(energy, iteration_number) supplied by the user to perform insitu analysis at every iteration step. When being called the current energy and iteration_number are passed. Methods
__call__
(energy)Performs the minimization of the provided Energy functional. get_descend_direction
(energy)