Skip to content

Commit

Permalink
Cythonized the new toHTML() methods in kinetics.
Browse files Browse the repository at this point in the history
I forgot these when I added the methods. Hope this is correct.
  • Loading branch information
rwest committed Jun 8, 2011
1 parent fef7b23 commit a07a9aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rmgpy/kinetics.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ cdef class KineticsModel:
cpdef bint isPressureDependent(self)

cpdef numpy.ndarray getRateCoefficients(self, numpy.ndarray Tlist)

cpdef str toHTML(self)

################################################################################

Expand All @@ -60,6 +62,8 @@ cdef class KineticsData(KineticsModel):
cpdef bint isPressureDependent(self)

cpdef double getRateCoefficient(self, double T, double P=?)

cpdef str toHTML(self)

################################################################################

Expand Down
2 changes: 2 additions & 0 deletions rmgpy/kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def toHTML(self):
"""
Return an HTML rendering.
"""
cython.declare(T=cython.double, k=cython.double)
cython.declare(string=str)
string = '<table class="KineticsData"><tr class="KineticsData_Tdata"><th>T/[{0!s}]</th>\n '.format(self.Tdata.units)
for T in self.Tdata.values:
string += '<td>{0:.0f}</td>'.format(T)
Expand Down

0 comments on commit a07a9aa

Please sign in to comment.