| SimBiology® | ![]() |
reactionObj = addreaction(modelObj,'ReactionValue')
reactionObj =
addreaction(modelObj, 'ReactantsValue', 'ProductsValue')
reactionObj = addreaction(modelObj, 'ReactantsValue', RStoichCoefficients, 'ProductsValue', PStoichCoefficients)
reactionObj = addreaction(...'PropertyName', PropertyValue...)
| modelObj | SimBiology® model object |
| ReactionValue | Specify the reaction equation. Enter a character string. A hyphen preceded by a space and followed by a right angle bracket (->) indicate reactants going forward to products. A hyphen with left and right angle brackets (<->) indicate a reversible reaction. Coefficients before reactant or product names must be followed by a space. Examples 'A -> B', 'A + B -> C', '2 A + B -> 2 C', 'A <-> B'.Enter reactions with spaces between the species. If there are multiple compartments, or to specify the compartment name, use compartmentName.speciesName Examples 'cytoplasm.A -> cytoplasm.B', 'cytoplasm.A -> nucleus.A', 'cytoplasm.A + cytoplasm.B -> nucleus.AB' |
| ReactantsValue | A string defining the species name, a cell array of strings, a species object or an array of species objects. If using name strings, qualify with compartment names if there are multiple compartments. |
| ProductsValue | A string defining the species name, a cell array of strings, a species object or an array of species objects. If using name strings, qualify with compartment names if there are multiple compartments. |
| RStoichCoefficients | Stoichiometric coefficients for reactants, length of array equal to length of ReactantsValue. |
| PStoichCoefficients | Stoichiometric coefficients for products, length of array equal to length of ProductsValue. |
reactionObj = addreaction(modelObj,'ReactionValue') creates a reaction object, assigns a value (ReactionValue) to the property Reaction, assigns reactant species object(s) to the property Reactants, assigns the product species object(s) to the property Products, and assigns the model object to the property Parent. In the Model object (modelObj), this method assigns the reaction object to the property Reactions, and returns the reaction object (reactionObj).
reactionObj = addreaction(modelObj, 'a -> b')

When you define a reaction with a new species,
if no compartment objects exist in the model, the method creates a compartment object (called 'unnamed') in the model and adds the newly created species to that compartment.
if only one compartment object (compObj) exists in the model, the method creates a species object in that compartment.
if there is more than one compartment object (compObj) in the model, you must qualify the species name with the compartment name.
For example cell.glucose denotes that you want to put the species named glucose into a compartment named cell. Additionally, if the compartment named cell does not exist, the process of adding the reaction creates the compartment and names it cell.
You can manually add a species to a compartment object with the method addspecies.
You can add species to a reaction object using the methods addreactant or addproduct. You can remove species from a reaction object with the methods rmreactant or rmproduct. The property Reaction is modified by adding or removing species from the reaction equation.
You can copy a SimBiology reaction object to a model object with the function, copyobj. You can remove SimBiology reaction object from a SimBiology model object with the function delete.
You can view additional reaction object properties with the get command, for example, the reaction equation of reactionObj can be viewed with the command, get(reactionObj, 'Reaction'). You can modify additional reaction object properties with the command, set .
reactionObj = addreaction(modelObj, 'ReactantsValue', 'ProductsValue') creates a reaction object, assigns a value to the property Reaction using the reactant (ReactantsValue) and product (ProductsValue) names, assigns the species objects to the properties Reactants and Products, and assigns the model object to the property Parent. In the model object (modelObj), this method assigns the reaction object to the property Reactions, and returns the reaction object (reactionObj). The stoichiometric values are assumed to be 1.
reactionObj = addreaction(modelObj, 'ReactantsValue', RStoichCoefficients, 'ProductsValue', PStoichCoefficients) adds stoichiometric coefficients (RStoichCoefficients) for reactant species, and stoichiometric coefficients (PStoichCoefficients) for product species to the property Stoichiometry. The length of Reactants and RCoefficients must be equal, and the length of Products and PCoefficients must be equal.
reactionObj = addreaction(...'PropertyName', PropertyValue...) defines optional
properties. The property name/property value pairs can be in any format
supported by the function set (for example, name-value
string pairs, structures, and name-value cell array pairs).
Methods for reaction objects
| addkineticlaw (reaction) | Create kinetic law object and add to reaction object |
| addproduct (reaction) | Add product species object to reaction object |
| addreactant (reaction) | Add species object as reactant to reaction object |
| copyobj (any object) | Copy SimBiology® object and its children |
| delete (any object) | Delete SimBiology® object |
| display (any object) | Display summary of SimBiology® object |
| rmproduct (reaction) | Remove species object from reaction object products |
| rmreactant (reaction) | Remove species object from reaction object reactants |
Properties for reaction objects
| Active | Indicate object in use during simulation |
| Annotation | Store link to URL or file |
| KineticLaw | Show kinetic law used for ReactionRate |
| Name | Specify name of object |
| Notes | HTML text describing SimBiology® object |
| Parent | Indicate parent object |
| Products | Array of reaction products |
| Reactants | Array of reaction reactants |
| Reaction | Reaction object reaction |
| ReactionRate | Reaction rate equation in reaction object |
| Reversible | Specify whether reaction is reversible or irreversible |
| Stoichiometry | Species coefficients in reaction |
| Tag | Specify label for SimBiology® object |
| Type | Display top-level SimBiology® object type |
| UserData | Specify data to associate with object |
Create a model, add a reaction object and assign the expression for the reaction rate equation.
Create a model object, then add a reaction object.
modelObj = sbiomodel('my_model');
reactionObj = addreaction(modelObj, 'a -> c + d');Create a kinetic law object for the reaction object, of the type 'Henri-Michaelis-Menten' .
kineticlawObj = addkineticlaw(reactionObj, 'Henri-Michaelis-Menten');
reactionObj KineticLaw property is configured to kineticlawObj.
The 'Henri-Michaelis-Menten' kinetic law has two parameter variables (Vm and Km) and one species variable (S) that should to be set. To set these variables, first create the parameter variables as parameter objects (parameterObj1, parameterObj2) with names Vm_d, and Km_d, and assign the objects Parent property value to the kineticlawObj.
parameterObj1 = addparameter(kineticlawObj, 'Vm_d'); parameterObj2 = addparameter(kineticlawObj, 'Km_d');
Set the variable names for the kinetic law object.
set(kineticlawObj,'ParameterVariableNames', {'Vm_d' 'Km_d'});
set(kineticlawObj,'SpeciesVariableNames', {'a'});Verify that the reaction rate is expressed correctly in the reaction object ReactionRate property.
get (reactionObj, 'ReactionRate')
MATLAB returns
ans = Vm_d*a/(Km_d+a)
addkineticlaw, addproduct, addreactant, rmproduct, rmreactant
![]() | addreactant (reaction) | addrule (model) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |