openmmslicer.minimise module

This module contains the GreedyBisectingMinimiser class which is used for adaptively creating an alchemical protocol.

class openmmslicer.minimise.GreedyBisectingMinimiser

Bases: object

A bisection algorithm specifically tailored for maximising the next lambda value over a threshold.

classmethod minimise(func, threshold_y, pivot_x, maximum_x, pivot_y=None, minimum_x=None, maxfun=100, tol=1e-08, *args, **kwargs)

Finds the maximum lambda value within a threshold using bisection

Parameters
  • func (function) – The function to be used for evaluation.

  • threshold_y (float) – The threshold value of the function.

  • pivot_x (float) – A pivot value of x which determines the desired side of the threshold.

  • maximum_x (float) – The maximum lambda value.

  • pivot_y (float) – The function evaluate at pivot_x. Default calls evaluation of func on pivot_x.

  • minimum_x (float) – The minimum lambda value. Default is no minimum.

  • maxfun (int) – The maximum number of calls to the function.

  • tol (float) – The relative tolerance of the function.

  • args – Positional arguments to be passed to func.

  • kwargs – Keyword arguments to be passed to func.

Returns

x – The maximum value of x within the threshold.

Return type

float