Main Content

SpeciesVariables

Species in abstract kinetic law

Description

This property shows species variables that are used in the Expression property of the kinetic law object to determine the ReactionRate equation in the reaction object. Use the function set to assign SpeciesVariables to an abstract kinetic law. For more information, see Kinetic Law Definition.

Characteristics

Applies toObjects: abstract kinetic law, kineticlaw
Data typeCell array of character vectors
Data valuesDefined by abstract kinetic law
AccessRead/write in abstract kinetic law. Read-only in 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)'