From a07a9aa366082d7bf0a98d352961b88a74ebb8f7 Mon Sep 17 00:00:00 2001 From: Richard West Date: Wed, 8 Jun 2011 12:26:06 +0100 Subject: [PATCH] Cythonized the new toHTML() methods in kinetics. I forgot these when I added the methods. Hope this is correct. --- rmgpy/kinetics.pxd | 4 ++++ rmgpy/kinetics.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/rmgpy/kinetics.pxd b/rmgpy/kinetics.pxd index 1f9fda6953..96c35a58dc 100644 --- a/rmgpy/kinetics.pxd +++ b/rmgpy/kinetics.pxd @@ -50,6 +50,8 @@ cdef class KineticsModel: cpdef bint isPressureDependent(self) cpdef numpy.ndarray getRateCoefficients(self, numpy.ndarray Tlist) + + cpdef str toHTML(self) ################################################################################ @@ -60,6 +62,8 @@ cdef class KineticsData(KineticsModel): cpdef bint isPressureDependent(self) cpdef double getRateCoefficient(self, double T, double P=?) + + cpdef str toHTML(self) ################################################################################ diff --git a/rmgpy/kinetics.py b/rmgpy/kinetics.py index 42dfb0cf11..5801c11d23 100644 --- a/rmgpy/kinetics.py +++ b/rmgpy/kinetics.py @@ -212,6 +212,8 @@ def toHTML(self): """ Return an HTML rendering. """ + cython.declare(T=cython.double, k=cython.double) + cython.declare(string=str) string = '\n '.format(self.Tdata.units) for T in self.Tdata.values: string += ''.format(T)
T/[{0!s}]{0:.0f}