SolverStep¶
- class hoomd.tune.SolverStep¶
Abstract base class various solver types.
Requires a single method
solve_one
that steps forward one iteration in solving the given variable relationship. Users can use subclasses of this withhoomd.tune.ManualTuneDefinition
to tune attributes with a functional relation.Note
A
SolverStep
object requires manual iteration to converge. This is to support the use case of measuring quantities that require running the simulation for some amount of time after one iteration before remeasuring the dependent variable (i.e. the y).SolverStep
object can be used inhoomd.custom.Action
subclasses for user defined tuners and updaters.- abstract reset()¶
Reset all solving internals.
This should put the solver in its initial state as if it has not seen any tunables or done any solving yet.
- solve(tunables)¶
Iterates towards a solution for a list of tunables.
If a y for one of the
tunables
isNone
then we skip thattunable
. Skipping implies that the quantity is not tuned andsolve
will returnFalse
.- Parameters:
tunables (list[
hoomd.tune.ManualTuneDefinition
]) – A list of tunable objects that represent a relationship f(x) = y.- Returns:
Returns whether or not all tunables were considered tuned by the object.
- Return type:
- abstract solve_one(tunable)¶
Takes in a tunable object and attempts to solve x for a specified y.
- Parameters:
tunable (
hoomd.tune.ManualTuneDefinition
) – A tunable object that represents a relationship of f(x) = y.- Returns:
Whether or not the tunable converged to the target.
- Return type: