Simulate a Model and View Results


About the Example Model

This example uses the model described in Model of the Yeast Heterotrimeric G Protein Cycle to illustrate model simulation.

This table shows the reactions used to model the G protein cycle and the corresponding rate parameters (rate constants) for each mass action reaction. For reversible reactions, the forward rate parameter is listed first.

No.NameReaction1Rate Parameters
1Receptor-ligand interactionL + R <-> RLkRL, kRLm
2Heterotrimeric G protein formationGd + Gbg -> GkG1
3G protein activationRL + G -> Ga + Gbg + RLkGa
4Receptor synthesis and degradationR <-> nullkRdo, kRs
5Receptor-ligand degradationRL -> nullkRD1
6G protein inactivationGa -> GdkGd
1 Legend of species: L = ligand (alpha factor), R = alpha-factor receptor, Gd = inactive G-alpha-GDP, Gbg = free levels of G-beta:G-gamma complex, G = inactive Gbg:Gd complex, Ga = active G-alpha-GTP

About the Example

This example shows how to configure simulation settings and simulate a model, saving the results in a SimData object. It then illustrates how to plot all species in the SimData object, as well as plot only the species or parameter of interest, such as:

  • GaFrac — The fraction of total Ga that is active

  • Ga, G, and Gd — The species that contain G-alpha units

The example also illustrates how to extract data from the SimData object for analysis.

Loading the Example Model

Load the gprotein.sbproj project, which includes the variable m1, a model object:

sbioloadproject gprotein

The m1 model object appears in the MATLAB® Workspace.

Configuring Simulation Settings

Set the simulation solver to ode15s and set a stop time of 500 by editing the SolverType and StopTime properties of the configset object associated with the m1 model:

csObj = getconfigset(m1);
set(csObj, 'SolverType', 'ode15s', 'StopTime', 500)

Simulating the Model

Simulate the model, saving the results in a SimData object:

simDataObj = sbiosimulate(m1);

Plotting Simulation Results

  1. Plot all the species in the model:


  2. Show only the plot of the GaFrac parameters by expanding Run 1, and then clearing all check boxes other than GaFrac:

    Notice the scale of the y-axis changes as you remove species from the plot.

  3. Show only the plots of the species containing G-alpha units by selecting the G, Gd, and Ga check boxes, and clearing the GaFrac check box:

  4. Alternately, create the previous plots by using the selectbyname method to create SimData objects containing data for only the species of interest, and then plotting these smaller objects:

    GafracObj = selectbyname(simDataObj, 'GaFrac');
    GaAllObj = selectbyname(simDataObj, {'Ga', 'G', 'Gd'});

Extracting Data for Analysis

  1. Use the selectbyname method to extract arrays containing the time points, state data, and state names for a subset of the data, namely the Ga, G, and Gd species that contain G-alpha units:

    [times, data, names] = selectbyname(simDataObj, {'Ga', 'G', 'Gd'});
  2. The previous plot shows that at the start of the simulation, the total G-alpha units (G + Gd + Ga) = 10000. Check the conservation of mass of the G-alpha units by summing their values to see if they equal 10000:

    GaTotal = sum(data, 2);
  3. View the sum of the values for the G-alpha units for the last 10 time points in the simulation:

    ans =
      1.0e+004 *
Was this topic helpful?