BngSimulator
. See the release notes for details.
X()
accounting for all monomers (bound and unbound, active and inactives) to specific ones stating the state of each site. However, in Rules, you define only the states needed for the reaction (for instance, to dimerize, X must be inactive, active, or you don't care about it)
cplx_rpoa_rpoa = Prot_rpoA(PBD_01 = 1, PBD_02 = None) % Prot_rpoA(PBD_01 = None, PBD_02 = 1)
X()
in a rule or observable, it will match both states, regardless of whether it is bound or not. You can also generate model components (rules, observables, initial conditions etc.) programmatically using a for
loop or similar.
'R1' A(),X(),X() <-> X(),X(),X() @ 'a1','a2'
; is kappa code, but I think you understand the idea). Gillespie argued that trimolecular (and higher order) reactions have very low probability (because molecules should collide at the same time and with correct orientation and velocity or energy). Just be aware of the rule rate. The propensivity is the multiplication of the rule rate (a1
in the example) and the quantities of A and X (sort of), so you could have a rule with very high probability of ocurrence. The example rule is part of the Schloegl's model, and there are papers showing the propensivity for each reaction.
from pysb.bng import generate_equations
generate_equations(model)