|
After the model has been created or imported, the next step is to simulate the model. Cellware integrates a variety of simulation algorithms belonging to stochastic, deterministic and hybrid categories. This section describes the various simulation options and the means of accessing the output of a simulation. The next chapter goes into the details of the simulation algorithms.
4.4.1 Setup
Simulation options are to be entered through the simulation setup window (Menu -> Simulation -> Set Up…). The simulation options have been organized into three tab pages – Species, Algorithm and Output as shown in Figure 4-7. Details of options on each tab are as follows:
- Species tab: Quite often the species of interest are much smaller than the total number of species in the model. Also due to computational constraints like physical memory or RAM it is not always feasible to monitor a very large number of species. The option of choosing the species to be monitored is given to the user through this tab (Figure 4-7). The interface of the tab is quite intuitive. The list of all species in provided in the left and list of monitored species in the right. The selection buttons between the two lists can be used to move the species from one window to another.

Figure 4-7: Simulation Setup Window - Species Tab
- Algorithm tab: Cellware being an integrated modelling and simulation environments provides the flexibility of using number of simulation algorithms. The algorithms have broadly been classified as deterministic, stochastic and hybrid. More details on the simulation algorithms are provided in Chapter 7.
Figure 4-8 gives the screenshot of the algorithm tab. First the class of algorithm – deterministic, stochastic or hybrid – should be chosen from a drop down list. This will modify the rest of the window for taking other simulation parameters corresponding to the class.
Stochastic algorithms require the following simulation parameters (Figure 4-8):
- Method: The user has an option of choosing from one of the three stochastic simulation algorithms – Gillespie Direct, Gibson-Gillespie and Tau Leap. Note that stochastic simulation can be done on models having only mass action rate law kinetics. As this version of Cellware only supports mass action kinetics no extra precautions need to be taken.
- Tolerance: It species a termination criteria for the algorithm such that if the sum of propensities of all reaction fall below the tolerance the simulation would be terminated. The default value is set to 1e-6. Essentially it detects whether or not there are any feasible reactions during the simulation iterations.
- Number of Experiments: This is the number of times a simulation would be repeated. This is required for stochastic simulation because the time series is different for different runs and to get a statistically relevant result multiple time series should be averaged. By default this parameter is 1. Note that multiple runs can only be done in the batch mode (4.4.2) of Cellware.
- Number of iteration: This is another termination criteria which species the maximum number of iterations of the simulation algorithm. The default value is 1000000.
- Total Time: This is the duration of simulation in seconds.
- Save Period: This is the time interval at which the results would be plotted or saved to file.
Deterministic algorithms require the following simulation parameters (Figure 4-9):
- Integrator: This indicates the ODE integrator scheme – Euler forward, Runga Kutta 4 th Order or Advanced ODE solver (for stiff problems).
- Total Time: This is the duration of simulation in seconds.
- Save Period: This is the time interval at which the results would be plotted or saved to file.
- Tolerance: Tolerance limit for the ODE solvers.
Hybrid algorithm requires the same input parameters as the deterministic solvers.

Figure 4-8: Simulation Setup - Algorithm Tab: Stochastic Options

Figure 4-9: Simulation Setup - Algorithm Tab: Deterministic Options
4.4.2 Running Simulation on Local Computer and Accessing Results
After completing the simulation setup the model can be simulated by choosing the Simulation -> Run on Local menu option or the run icon in the toolbar.
Plot window provides flexible plotting facilities for multiple time series data. Plot window can be invoked online or offline. Simulation results are shown in real time when running on local.
Running a Simulation
Running a new simulation on local creates a new online plot window (See section 4.4). To open an existing file, users can use either File->Open… menu or open button . Supported file formats for plotting are plain text file and PlotML file. Separators in text file can be customized. To put comments in a text file , simply prefix characters “%#!”. The names of variables are taken from the last command line.
Saving Simulation Results
When the plot window is active, select File->Save or click save button to save the plot results. Supported file formats are 1) Plain text file 2) JPEG image file 3) PNG image file 4) postscript file and 5) PlotML file. Plain text file can be adapted to your needs. Select Tool->Options menu and select figure tab, Figure 4-7 appears. To include project details in the output file header, check the ‘Project information’ in the panel. Similarly, check ‘List of variable names’ to add list of variable names in the header. Again, check ‘Limit number of line to:’ to limit number of header line. In addition, ‘Comment character’ is put at the start line of header text.

Figure 4-10: Text format options
Functionalities in Plot
The figure window has two components: species browser and plot panel. The left panel, species browser, contains all the monitor species as configured in simulation setup.
Users can use copy button to copy the plot with white background to system clipboard. It can be pasted into any application that supports clipboard paste operation. Zoom-in and zoom-out buttons are used for scaling plot.
Functions related to plot window can be found in Figure menu. To edit line properties select line properties. Line properties panel is shown in Figure 4-11 (b). From the panel, line style (solid, dot, dash, etc), line thickness, line colour can be easily changed. The option ‘Value of’ is use to change any valid expression for the line. For example, to see the correlation of two species, say X and Y, you can write X/Y in the text field. Select x-axis panel to change x-axis properties. Logarithmic scale is available here.
To get phase plot, users can choose ‘Value of’ combo box and enter any valid expression for x-axis.

Figure 4-11: a) Figure menu b) line properties panel and c) x-axis properties panel
4.4.3 Submitting Simulation to Grid and Accessing Results
A simulation job can be submitted to the Grid within BII, Singapore. The jobs are sent to the computational engine on the Grid by using an internal grid meta-scheduler named GridX. As mentioned earlier, the computer must be online for accessing the Grid.
Steps for submission of jobs and retrieval of results are as follows:
- For submitting a job to the Grid choose Simulation -> Run on Grid menu option. If you are not logged-in, a login dialog box (Figure 4-12 ) would be displayed. An account has been created on our Grid with user name as cw_guest and password as cw_demo.

Figure 4-12: Grid Login Dialog
Successful login will split the drawing workspace horizontally into two and display Grid status in the bottom half (Figure 4-13).

Figure 4-13: Grid Status Window
- After successful login to the grid, the job should again be submitted to the Grid though Simulation -> Run on Grid menu option. On successful submission a Job Id is returned for future monitoring of the job. Once the job is submitted the application may be closed. Using the job id, the job can again be monitored from the Job Manager by starting Cellware and logging in.
- Submitted job can be monitored through the Job Manager (Figure 4-14) invoked from the Tools menu. The job manager tabulates all the jobs of the user logged in. Since all demo copies use the same user id, jobs submitted from different sites would be listed together. Please do not mess with jobs not submitted by you!
- Viewing and Fetching results: Completed job is indicated by a status of done in the Job Manager. Once the job is completed, the results can be accessed by the job id from the Job Id text box in the Job Manager. Clicking Fetch will retrieve a zip file containing the input and output files. The output file is named sim_cellware_out.xml and contains the time series output in the PlotML format, which can be viewed using Tools->Result Plot option of the menu.
The results can also be viewed without manually fetching the zip file by clicking the View button under the Job ID text box.

Figure 4-14: Job Manager
4.4.4 Parameter Estimation
The backend computational engine of Cellware accessible through the Grid implements optimization algorithms for estimating unknown model parameters. In the current version only the reaction rate constants can be estimated that simulates model in a given time series.
Steps for parameter estimation are:
- Open the parameter estimation dialog box (Figure 4-15) from Analysis->Parameter Estimation

Figure 4-15: Parameter Estimation (Algorithm Tab)
- Algorithm Tab specifies the following items:
- Estimation Algorithms. This drop down is to specify the optimization algorithm to be used for parameter estimation. This version supports only one SWARM based algorithm. Future versions will have more other direct search or genetic algorithms.
- Evaluation Algorithms. All optimization algorithms need simulation algorithms for generating time series for a given set of rate constants as they optimise the rate constants themselves. In Cellware, ODE based or Stochastic simulations algorithms may be used. A word of caution: mathematical theory of using stochastic simulation algorithms with optimization algorithms does not guarantee biologically accurate values.
- Formulation. This specifies the form of the objective function that the optimization algorithm uses. The option currently supported is Least Square Errors between supplied and simulated time series.
- No. of Solutions. This is option is set automatically for the optimization algorithm currently used.
- No. of Iterations. This is option is set automatically for the optimization algorithm currently used.
- Input Data. Click this button to open a File Browsing window to specify the input time series. The format of the time series input is shown in Figure 4-16.

Figure 4-16: Input data format for Parameter Estimation
- Parameters Tab. This tab page (Figure 4-17: Parameter Estimation (Parameters Tab)) tabulates all the parameters that may be estimated. Essentially it lists all the rate constants of the model. The parameter is to the estimated is indicated by marking the Selected flag to Y.
Also the lower and upper bounds of the rate constants can be specified for the rate constants to be estimated.

Figure 4-17: Parameter Estimation (Parameters Tab)
- After the setup is completed on the Algorithm and Parameters tab pages, the job can be submit to the Grid by clicking on the Run button on the bottom of the page.
- Viewing Results:
Like simulation, results of a parameter estimation job can also be viewed through the job manager by specifying the job id. After specifying the job id, clicking the View button will present Figure 4-18.

Figure 4-18: Viewing Results of Parameter Estimation
Clicking on View estimation progress will show a graph (Figure 4-19) of the objective function and function evaluations while the optimization proceeds.
Clicking on View estimated parameters, on the other hand, will present a table (Figure 4-20) of the values of the estimated parameters. Clicking on Apply to Current Model will then import the new values to the model.

Figure 4-19: Viewing Results of Parameter Estimation
(Objective Function and Function Evaluation Graph)

Figure 4-20: Viewing Results of Parameter Estimation
(Estimated parameter values)
|