KarrLab / wc_sim

A multi-algorithmic simulator for whole-cell models
MIT License
6 stars 2 forks source link

Avoid positive propensities for reactions in discrete submodels that lack adequate reactants #105

Closed artgoldberg closed 3 years ago

artgoldberg commented 3 years ago

Ensure that propensities used by stochastic submodels (SSA, NRM) evaluate to 0 when the population of any reactant is less than its stoichiometry.

artgoldberg commented 3 years ago

Done.

Existing dependency analysis already ensured that "Given a reaction x modeled by NRM, the propensity calculation for x depends on all reactions that consume x's reactants." Specifically, for every reaction x, the dependency analysis in DynamicModel.obtain_dependencies() finds every expression that depends on a species whose population is modified by x.