SolverStep¶
- class hoomd.tune.SolverStep¶
Abstract base class various solver types.
Requires a single method
solve_onethat steps forward one iteration in solving the given variable relationship. Users can use subclasses of this withhoomd.tune.ManualTuneDefinitionto tune attributes with a functional relation.Note
A
SolverStepobject 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).SolverStepobject can be used inhoomd.custom.Actionsubclasses 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
tunablesisNonethen we skip thattunable. Skipping implies that the quantity is not tuned andsolvewill 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: