Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rmgpy/constants.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
# #
###############################################################################

cdef double pi, Na, kB, R, h, hbar, c, e, m_e, m_p, m_n, amu, a0, E_h
cdef double pi, Na, kB, R, h, hbar, c, e, m_e, m_p, m_n, amu, a0, E_h, F
4 changes: 4 additions & 0 deletions rmgpy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
#: :math:`\pi = 3.14159 \ldots`
pi = float(math.pi)

#: Faradays Constant F in C/mol
F = 96485.3321233100184

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

# Cython does not automatically place module-level variables into the module
Expand All @@ -130,4 +133,5 @@
'm_n': m_n,
'm_p': m_p,
'pi': pi,
'F': F
})
3 changes: 3 additions & 0 deletions rmgpy/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from rmgpy.data.reference import Reference, Article, Book, Thesis
from rmgpy.exceptions import DatabaseError, InvalidAdjacencyListError
from rmgpy.kinetics.uncertainties import RateUncertainty
from rmgpy.kinetics.arrhenius import ArrheniusChargeTransfer, ArrheniusChargeTransferBM
from rmgpy.molecule import Molecule, Group


Expand Down Expand Up @@ -228,6 +229,8 @@ def load(self, path, local_context=None, global_context=None):
local_context['shortDesc'] = self.short_desc
local_context['longDesc'] = self.long_desc
local_context['RateUncertainty'] = RateUncertainty
local_context['ArrheniusChargeTransfer'] = ArrheniusChargeTransfer
local_context['ArrheniusChargeTransferBM'] = ArrheniusChargeTransferBM
local_context['metal'] = self.metal
local_context['site'] = self.site
local_context['facet'] = self.facet
Expand Down
5 changes: 3 additions & 2 deletions rmgpy/data/kinetics/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from rmgpy.molecule import Molecule, Group
from rmgpy.reaction import Reaction, same_species_lists
from rmgpy.species import Species

from rmgpy.data.solvation import SoluteData

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

Expand Down Expand Up @@ -79,7 +79,8 @@ def __init__(self):
'SurfaceArrhenius': SurfaceArrhenius,
'SurfaceArrheniusBEP': SurfaceArrheniusBEP,
'R': constants.R,
'ArrheniusBM': ArrheniusBM
'ArrheniusBM': ArrheniusBM,
'SoluteData': SoluteData,
}
self.global_context = {}

Expand Down
438 changes: 289 additions & 149 deletions rmgpy/data/kinetics/family.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion rmgpy/kinetics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

from rmgpy.kinetics.model import KineticsModel, PDepKineticsModel, TunnelingModel, \
get_rate_coefficient_units_from_reaction_order, get_reaction_order_from_rate_coefficient_units
from rmgpy.kinetics.arrhenius import Arrhenius, ArrheniusEP, PDepArrhenius, MultiArrhenius, MultiPDepArrhenius, ArrheniusBM
from rmgpy.kinetics.arrhenius import Arrhenius, ArrheniusEP, PDepArrhenius, MultiArrhenius, MultiPDepArrhenius, \
ArrheniusBM, ArrheniusChargeTransfer, ArrheniusChargeTransferBM
from rmgpy.kinetics.chebyshev import Chebyshev
from rmgpy.kinetics.falloff import ThirdBody, Lindemann, Troe
from rmgpy.kinetics.kineticsdata import KineticsData, PDepKineticsData
Expand Down
51 changes: 51 additions & 0 deletions rmgpy/kinetics/arrhenius.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,55 @@ cdef class MultiPDepArrhenius(PDepKineticsModel):

cpdef bint is_identical_to(self, KineticsModel other_kinetics) except -2


cpdef change_rate(self, double factor)

################################################################################
cdef class ArrheniusChargeTransfer(KineticsModel):

cdef public ScalarQuantity _A
cdef public ScalarQuantity _n
cdef public ScalarQuantity _Ea
cdef public ScalarQuantity _T0
cdef public ScalarQuantity _V0
cdef public ScalarQuantity _alpha
cdef public ScalarQuantity _electrons

cpdef double get_activation_energy_from_potential(self, double V=?, bint non_negative=?)

cpdef double get_rate_coefficient(self, double T, double V=?) except -1

cpdef change_rate(self, double factor)

cpdef change_t0(self, double T0)

cpdef change_v0(self, double V0)

cpdef fit_to_data(self, np.ndarray Tlist, np.ndarray klist, str kunits, double T0=?, np.ndarray weights=?, bint three_params=?)

cpdef bint is_identical_to(self, KineticsModel other_kinetics) except -2


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

cdef class ArrheniusChargeTransferBM(KineticsModel):

cdef public ScalarQuantity _A
cdef public ScalarQuantity _n
cdef public ScalarQuantity _E0
cdef public ScalarQuantity _w0
cdef public ScalarQuantity _V0
cdef public ScalarQuantity _alpha
cdef public ScalarQuantity _electrons

cpdef change_v0(self, double V0)

cpdef double get_activation_energy(self, double dGrxn) except -1

cpdef double get_rate_coefficient_from_potential(self, double T, double V, double dGrxn) except -1

cpdef ArrheniusChargeTransfer to_arrhenius_charge_transfer(self, double dGrxn)

cpdef bint is_identical_to(self, KineticsModel other_kinetics) except -2

cpdef change_rate(self, double factor)
Loading