Skip to content

Commit cb9452b

Browse files
author
Andreagiovanni Reina
committed
fixed widgets for rates with equation
1 parent 091cb93 commit cb9452b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

mumot/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,10 @@ def _get_solutions(self):
17091709
def _get_rates_from_stoichiometry(self):
17101710
rates = set()
17111711
for reaction in self._stoichiometry.values():
1712-
rates.add( reaction['rate'] )
1712+
if reaction['rate']:
1713+
for symb in reaction['rate'].atoms():
1714+
if isinstance(symb, Symbol):
1715+
rates.add( symb )
17131716
return rates
17141717

17151718
def _create_free_param_dictionary_for_controller(self, inputParams, initWidgets=None, showSystemSize=False, showPlotLimits=False):
@@ -1843,7 +1846,7 @@ def _getFuncs(self):
18431846
argList.append(reactant)
18441847
for reactant in self._constantReactants:
18451848
argList.append(reactant)
1846-
for rate in self._rates:
1849+
for rate in self._get_rates_from_stoichiometry():
18471850
argList.append(rate)
18481851
if self._systemSize is not None:
18491852
argList.append(self._systemSize)

0 commit comments

Comments
 (0)