Add empty_pathmover; empty_strategy

parent 45b7ccd1
class MyPathMover(paths.PathMover):
def __init__(self, ensemble, my_option):
# addition ensembles possible,
super(MyPathMover, self).__init__()
self.ensemble = ensemble
self.my_option = my_option
def _called_ensembles(self):
# ensemble for input samples to __call__
return [self.ensemble]
def _get_in_ensembles(self):
# input ensembles
return [self.ensemble]
# _get_out_ensembles defaults to _get_in_ensembles
def __call__(self, sample_for_ensemble):
# additional samples possible
# do the stuff to make trial samples
details = {'my_detail': 'value'}
return [sample], details
from openpathsampling.high_level import move_strategy
class MyStrategy(move_strategy.MoveStrategy):
_level = move_strategy.levels.MOVER
def __init__(self, my_option, ensembles=None, group="group_name",
replace=True):
super(MyStrategy, self).__init__(ensembles, group, replace)
self.my_option = my_option
def make_movers(self, scheme):
ensemble_list = self.get_init_ensembles(scheme)
# make a list of the movers
return mover_list
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment