Skip to content

Commit 69379a7

Browse files
Factor the equilibrium factor out
1 parent 6afe4b3 commit 69379a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

overreact/simulate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from overreact import _constants as constants
2323
from overreact._misc import _found_jax
2424

25+
EF = 1e4
26+
27+
2528
logger = logging.getLogger(__name__)
2629

2730

@@ -157,7 +160,7 @@ def r(t):
157160
return y, r
158161

159162

160-
def get_dydt(scheme, k, ef=1e4):
163+
def get_dydt(scheme, k, ef=EF):
161164
"""Generate a rate function that models a reaction scheme.
162165
163166
Parameters
@@ -241,7 +244,7 @@ def _jac(t, y):
241244
return _dydt
242245

243246

244-
def _adjust_k(scheme, k, ef=1e4):
247+
def _adjust_k(scheme, k, ef=EF):
245248
"""Adjust reaction rate constants so that equilibria are equilibria.
246249
247250
Parameters

0 commit comments

Comments
 (0)