コード例 #1
0
 def default_selector(self):
     sel = SpringShootingSelector(delta_max=1,
                                  k_spring=0,
                                  initial_guess=self.initial_guess)
     sel._fw_prob_list = [1.0, 0.0, 0.0]
     sel._bw_prob_list = [0.0, 0.0, 1.0]
     sel._total_bias = 1.0
     return sel
コード例 #2
0
 def setup(self):
     super(MoverTest, self).setup()
     sel = SpringShootingSelector(delta_max=1, k_spring=0)
     sel._fw_prob_list = [1.0, 0.0, 0.0]
     sel._bw_prob_list = [0.0, 0.0, 1.0]
     sel._total_bias = 1.0
     self.sel = sel
     self.samp = self.ges.samples[0]
コード例 #3
0
 def test_sanity_breaking_total():
     sel = SpringShootingSelector(delta_max=1, k_spring=1)
     sel._total_bias = sum([0, 0, 0])
     with pytest.raises(RuntimeError):
         sel.check_sanity()
コード例 #4
0
 def test_sanity_breaking_total_pick(self):
     sel = SpringShootingSelector(delta_max=1, k_spring=1)
     sel._total_bias = sum([0, 0, 0])
     with pytest.raises(RuntimeError):
         sel.pick(trajectory=self.mytraj, direction='forward')