def do_check_committors(self, A, B):
     rcalc = RateCalculation(self.db.transition_states(), A, B)
     rcalc.compute_rates_and_committors()
     committors = rcalc.get_committors()
     
     rla = RatesLinalg(self.db.transition_states(), A, B)
     cla = rla.compute_committors()
     
     for m, qla in cla.iteritems():
         self.assertAlmostEqual(committors[m], qla, 7)
Пример #2
0
    def do_check_committors(self, A, B):
        rcalc = RateCalculation(self.db.transition_states(), A, B)
        rcalc.compute_rates_and_committors()
        committors = rcalc.get_committors()

        rla = RatesLinalg(self.db.transition_states(), A, B)
        cla = rla.compute_committors()

        for m, qla in cla.items():
            self.assertAlmostEqual(committors[m], qla, 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)
 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)
Пример #5
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)
Пример #6
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("")
Пример #7
0
print len(A), "A minima"
print len(B), "B minima"

        
        

print A[0].energy
print B[0].energy

#rate_constants = reduce_rates(rate_constants, B, A=A)


print "computing rates from minima data"
T = .05
print "temperature", T
pele_rates = RateCalculation(db.transition_states(), A, B, T=T, use_fvib=True)
pele_rates._make_kmc_graph()
rates = pele_rates.rate_constants
weights = pele_rates._get_equilibrium_occupation_probabilities()
rate_norm = np.exp(-pele_rates.max_log_rate)
#Peq = pele_rates._get_equilibrium_occupation_probabilities()

print "reducing rates"
rate_constants = reduce_rates(rates, B, A=A)



print "max rate constant", max(rates.itervalues())
print "min rate constant", min(rates.itervalues())

if False:
Пример #8
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)