Expression
Expression to determine reaction rate equation or expression of observable object
Description
The Expression
property can be a property of
KineticLaw
(or AbstractKineticLaw
) object or an
observable
object.
For an observable
object, the Expression
property is a mathematical expression that lets you perform post-simulation
calculations. For details, see SimBiology.Observable
.
For a KineticLaw
object, the Expression
property
indicates the mathematical expression that is used to determine the ReactionRate
property of the reaction object. Expression
is a reaction rate
expression assigned by the kinetic law definition used by the reaction. The kinetic law
being used is indicated by the property KineticLawName
. You can configure
Expression
for user-defined kinetic laws, but not for built-in
kinetic laws. Expression
is read only for kinetic law objects.
Note
If you set the Expression
property to a reaction rate
expression that is not continuous and differentiable, see Using Events to Address Discontinuities in Rule and Reaction Rate Expressions before simulating your model.
Kinetic Law Definition
The kinetic law definition provides a mechanism for applying
a specific rate law to multiple reactions. It acts as a mapping template for the
reaction rate. The kinetic law is defined by a mathematical expression, (defined in
the property Expression
), and includes the species and parameter
variables used in the expression. The species variables are defined in the
SpeciesVariables
property, and the parameter variables are
defined in the ParameterVariables
property of the kinetic law object.
If a reaction is using a kinetic law definition, the
ReactionRate
property of the reaction object shows the result
of a mapping from the kinetic law definition. To determine
ReactionRate
, the species variables and parameter variables
that participate in the reaction rate should be mapped in the kinetic law for the
reaction. In this case, SimBiology® software determines the ReactionRate
by using the
Expression
property of the abstract kinetic law object, and
by mapping SpeciesVariableNames
to SpeciesVariables
and ParameterVariableNames
to
ParameterVariables
.
For example, the kinetic law definition Henri-Michaelis-Menten
has the Expression
Vm*S/(Km+S), where Vm
and
Km
are defined as parameters in the
ParameterVariables
property of the abstract kinetic law
object, and S
is defined as a species in the
SpeciesVariable
property of the abstract kinetic law
object.
By applying the Henri-Michaelis-Menten
kinetic law to a
reaction A -> B
with Va
mapping to
Vm
, A
mapping to S
, and
Ka
mapping to Km
, the rate equation for
the reaction becomes Va*A/(Ka+A).
The exact expression of a reaction using MassAction
kinetic law
varies depending upon the number of reactants. Thus, for mass action kinetics the
Expression
property is set to MassAction
because in general for mass action kinetics the reaction rate is defined as
where [Si]
is the concentration of the
ith
reactant, mi
is
the stoichiometric coefficient of [Si]
,
nr
is the number of reactants, and
k
is the mass action reaction rate constant.
SimBiology software contains some built-in kinetic laws. You can also define your
own kinetic laws. To find the list of available kinetic laws, use the
sbiowhos -kineticlaw
command (sbiowhos
).
You can create a kinetic law definition with the function
sbioabstractkineticlaw
and add it to the library using
sbioaddtolibrary
.
Characteristics
Applies to | Objects: abstract kinetic law, kinetic law, observable |
Data type | Character vector |
Data values | Defined by kinetic law definition |
Access | Read-only in kinetic law object. Read/write in user-defined kinetic law. |
Examples
Define Michaelis Menten Reaction Kinetics in SimBiology Model
Create a SimBiology model with a reaction.
m1 = sbiomodel("m1"); r1 = addreaction(m1,"A -> B");
Add a kinetic law for the reaction by using the built-in kinetic law (Michaelis Menten). Check the expression of the kinetic law.
kl = addkineticlaw(r1,"Henri-Michaelis-Menten");
kl.Expression
ans = 'Vm*S/(Km + S)'
Query the parameters and species variables defined in the kinetic law.
kl.ParameterVariables
ans = 2x1 cell
{'Vm'}
{'Km'}
kl.SpeciesVariables
ans = 1x1 cell array
{'S'}
Define Va
and Ka
as ParameterVariableNames
, which correspond to the ParameterVariables
Vm and Km defined in the Expression property of the kinetic law. To set these variables, first create the parameter variables as parameter objects (p1, p2) with the names Va and Ka, and then add them to the kinetic law object kl. The species object with the name A is created when the reaction object r1 is created and need not be redefined.
p1 = addparameter(kl,"Va"); p2 = addparameter(kl,"Ka");
Set the variable names for the kinetic law object.
kl.ParameterVariableNames = ["Va","Ka"]; kl.SpeciesVariableNames = ["A"];
Verified that the reaction rate is expressed correctly in the ReactionRate
property of the reaction object
r1.ReactionRate
ans = 'Va*A/(Ka+A)'
Define Mass Action Reaction Kinetics in SimBiology Model
Create a SimBiology model with a reaction.
m1 = sbiomodel("m1"); r1 = addreaction(m1,"a + b -> c + d");
Add a kinetic law for the reaction by using the built-in kinetic law (Mass Action). Check the expression of the kinetic law.
kl = addkineticlaw(r1,"MassAction");
kl.Expression
ans = 'MassAction'
Assign the rate constant for the reaction.
kl.ParameterVariableNames = "k";
Check the reaction rate.
r1.ReactionRate
ans = 'k*a*b'