def test_shooting_move(self):
     self.shooter = BackwardShootMover(ensemble=self.ens,
                                       selector=FinalFrameSelector(),
                                       engine=self.dyn)
     change = self.shooter.move(self.gs)
     samples = change.trials
     assert_equal(change.accepted, True)
     assert_items_equal(
         [0.1, 0.2, 0.3, 0.4, 0.5],
         [s.coordinates[0][0] for s in samples[0].trajectory])
 def test_dict_cycle(self):
     scheme = SpringShootingMoveScheme(network=self.network,
                                       delta_max=1,
                                       k_spring=0.0,
                                       initial_guess=3)
     dct = scheme.to_dict()
     scheme2 = SpringShootingMoveScheme.from_dict(dct)
     assert_items_equal(scheme2.movers, scheme.movers)
     assert scheme2.delta_max == 1
     assert scheme2.k_spring == 0.0
     assert scheme2.initial_guess == 3
 def test_backward_mover(self):
     mover = BackwardSpringMover(ensemble=self.ens,
                                 selector=self.sel,
                                 engine=self.dyn)
     trials, details = mover(self.samp)
     traj = trials[0].trajectory
     assert_items_equal([-0.1, 0.1, 0.2, 0.3, 0.5],
                        [s.coordinates[0][0] for s in traj])
     assert details['shooting_index'] == 3
     assert details['last_accepted_shooting_index'] is None
     assert details['direction'] == 'backward'
 def test_shooting_move(self):
     self.shooter = ForwardShootMover(ensemble=self.ens,
                                      selector=FirstFrameSelector(),
                                      engine=self.dyn)
     change = self.shooter.move(self.gs)
     samples = change.trials
     assert_equal(len(samples), 1)
     assert_equal(change.accepted, True)
     assert_items_equal(
         [-0.5, -0.4, -0.3, -0.2, -0.1],
         [s.coordinates[0][0] for s in samples[0].trajectory])
 def test_shooting_move(self):
     self.shooter = BackwardShootMover(
         ensemble=self.ens,
         selector=FinalFrameSelector(),
         engine=self.dyn
     )
     change = self.shooter.move(self.gs)
     samples = change.trials
     assert_equal(change.accepted, True)
     assert_items_equal(
         [0.1, 0.2, 0.3, 0.4, 0.5],
         [s.coordinates[0][0] for s in samples[0].trajectory]
     )
 def test_shooting_move(self):
     self.shooter = ForwardShootMover(
         ensemble=self.ens,
         selector=FirstFrameSelector(),
         engine=self.dyn
     )
     change = self.shooter.move(self.gs)
     samples = change.trials
     assert_equal(len(samples), 1)
     assert_equal(change.accepted, True)
     assert_items_equal(
         [-0.5, -0.4, -0.3, -0.2, -0.1],
         [s.coordinates[0][0] for s in samples[0].trajectory]
     )