Ejemplo n.º 1
0
    def test1(self):
        m1 = self.db.getMinimum(1)
        m2 = self.db.getMinimum(2)
        m3 = self.db.getMinimum(3)
        m4 = self.db.getMinimum(4)

        rcalc = RateCalculation(self.db.transition_states(), [m1], [m2],
                                T=0.592)
        rcalc.compute_rates()
        self.assertAlmostEqual(rcalc.get_rate_AB(), 7106337458., delta=1e4)
        self.assertAlmostEqual(rcalc.get_rate_BA(), 1955395816., delta=1e4)

        rcalc = RateCalculation(self.db.transition_states(), [m1, m3],
                                [m2, m4],
                                T=0.592)
        rcalc.compute_rates()
        self.assertAlmostEqual(rcalc.get_rate_AB(), 8638736600., delta=1e4)
        self.assertAlmostEqual(rcalc.get_rate_BA(), 3499625167., delta=1e4)

        rla = RatesLinalg(self.db.transition_states(), [m1], [m2], T=0.592)
        rAB = rla.compute_rates()
        self.assertAlmostEqual(rAB, 7106337458., delta=1e4)

        rla = RatesLinalg(self.db.transition_states(), [m1, m3], [m2, m4],
                          T=0.592)
        rAB = rla.compute_rates()
        self.assertAlmostEqual(rAB, 8638736600., delta=1e4)
Ejemplo n.º 2
0
    def do_check_rates(self, A, B):
        rcalc = RateCalculation(self.db.transition_states(), A, B)
        rcalc.compute_rates()
        rAB = rcalc.get_rate_AB()
        rBA = rcalc.get_rate_BA()

        rla = RatesLinalg(self.db.transition_states(), A, B)
        rAB_la = rla.compute_rates()

        self.assertAlmostEqual(rAB, rAB_la, 7)
 def do_check_rates(self, A, B):
     rcalc = RateCalculation(self.db.transition_states(), A, B)
     rcalc.compute_rates()
     rAB = rcalc.get_rate_AB()
     rBA = rcalc.get_rate_BA()
     
     rla = RatesLinalg(self.db.transition_states(), A, B)
     rAB_la = rla.compute_rates()
     
     self.assertAlmostEqual(rAB, rAB_la, 7)
Ejemplo n.º 4
0
 def _compute_rates(self):
     
     self.ui.label_status.setText("computing rates %s <-> %s" % (self.A, self.B))
     T = float(self.ui.lineEdit_T.text())
     calculator = RateCalculation(self.transition_states, self.A, self.B, 
                                  T=T, use_fvib=True)
     calculator.compute_rates()
     rAB = calculator.get_rate_AB()
     rBA = calculator.get_rate_BA()
     self._add_result(self.A, self.B, rAB, rBA)
     
     self.ui.label_status.setText("")
 def test1(self):
     m1 = self.db.getMinimum(1)
     m2 = self.db.getMinimum(2)
     m3 = self.db.getMinimum(3)
     m4 = self.db.getMinimum(4)
     
     rcalc = RateCalculation(self.db.transition_states(), [m1], [m2], T=0.592)
     rcalc.compute_rates()
     self.assertAlmostEqual(rcalc.get_rate_AB(), 7106337458., delta=1e4)
     self.assertAlmostEqual(rcalc.get_rate_BA(), 1955395816., delta=1e4)
     
     rcalc = RateCalculation(self.db.transition_states(), [m1,m3], [m2, m4], T=0.592)
     rcalc.compute_rates()
     self.assertAlmostEqual(rcalc.get_rate_AB(), 8638736600., delta=1e4)
     self.assertAlmostEqual(rcalc.get_rate_BA(), 3499625167., delta=1e4)
     
     rla = RatesLinalg(self.db.transition_states(), [m1], [m2], T=0.592)
     rAB = rla.compute_rates()
     self.assertAlmostEqual(rAB, 7106337458., delta=1e4)
     
     rla = RatesLinalg(self.db.transition_states(), [m1, m3], [m2, m4], T=0.592)
     rAB = rla.compute_rates()
     self.assertAlmostEqual(rAB, 8638736600., delta=1e4)