pele.takestep.adaptive#

class pele.takestep.adaptive.AdaptiveStepsize[source]

Source

class AdaptiveStepsize(TakestepInterface):

Adaptive stepsize adjustment

AdaptiveStepsize is a wrapper for a takestep object and automatically adjusts the stepsize by calling takestep.scale() to obtain a certain acceptance ration during basing hopping runs.

Parameters:
stepclasstakestep object

the takestep object which performs the takestep

acc_ratiofloat

target acceptance ratio

factorfloat

factor to adjust the stepsize if acc_ratio is too high.

intervalinteger

adjust the stepsize every interval steps

note: the keyword frequency is the same as interval. it exists only for backward compatability
AdaptiveStepsize.updateStep()[source]

Source

def updateStep(self, accepted, **kwargs):

tell us whether a step was accepted or rejected

AdaptiveStepsize.adjustStep()[source]

Source

def adjustStep(self):

adjust the stepsize