insilicoIDE 0.2.5-0.2.6 Getting Started

Launch insilico IDE that you downloaded, then you will see blank white canvas (Fig. 1).

Load inisilicoML model / cellML model

Go into a directory named "samples" in the archive, and you will find two sample models written in insilico ML format. Drag and drop a file named "Hodgkin_Huxley_1952_model.xml" on the white canvas of insilico IDE. You find a yellow circle entitled "Hodgkin_Huxley_1952_model.xml". It represents a module (Fig. 2). If you again drag and drop another model file ("sinusoidal_current_generator.xml"), then it will add on the canvas, too. There are two ways to load model files from "File" menu. One is "Open New File..." and the other is "Add Another Model". You can treat cellML files in the same way.

By double clicking on the module you can browse modules in sub-layer of the module if the module has (Fig. 3a). Lines between the modules are called Edges. Drag a cursole with left button pressing from a blue port (Output Port) of "sinusoidal_current_generator" module with name "output_current" to an orange port (Input Port) of "Hodgkin_Huxley_1952_model" named "I_stimulus", a new edge between the output port and input port is spanned (Fig. 3b). If you again double click the top module, the substructure will be hidden.

blank onemodule expanded expanded
Fig. 1: Blank canvas Fig. 2: One module Fig. 3a: Substructure of a module Fig. 3b: Connecting a new edge


insilicoIDE can export the model as C++ source code file "main.cpp". Compile it by some means(g++ on cygwin, visual C++, etc), and execute the binary file. You will get a filenamed "result.csv". This file includes a simulation result as time series data. The top row shows the name of variables (e.g., names of parameters and states in the mdoel), and each time series data shows in a corresponding column. For example, the first column is time. This file is a text file, so you can see the data and draw graphs by using Excel, gnuplot and so on easily.

To export C++ source cord, select "Export" in File menu. Then a dialog for the setting of simulation will open. In this dialog (Fig.4), you select the method of numerical integration (Euler / 4th-order Runge-Kutta), simulation time step, total duration of simulation and rate of thinning out of the result time series to dump into the result file. After this setting, insilicoIDE exports the C++ source code file. By compiling this source code file, and executing the binary file, you will get a simulation result. If you check "Generate MPI Parallel Simulation" in the dialog, insilicoIDE exports the C++ source code file with MPI.See next section for the details of parallel simulation.

You can see the simulation result as a graph very easily by using insilicoIDE. At first, select port(s) of variable you want to see the simulation result, and choose the context menu "Show simulated waveforms" which is appeared by right crick on module. You can select several ports by Shift + left click. insilicoIDE operates the process described above (i.e. generation of C++ source code, compilation and execution) automatically in the background, and loads the simulation result corresponding to selected ports. Then, insilicoIDE show the graph of time seriesData(Fig.5).

source graph
Fig. 4: C++ source code generation Fig. 5: Graph drawing

Parallel computing

Large simulations generated by ISIDE can be run faster by compiling and executing them in parallel on a cluster using MPI (Message Passing Interface).
Parallel simulations require an MPI implementation to be installed (e.g. OpenMPI, MPICH, etc) and a compiler (Visual Studio on Windows, g++ on Mac OS X and UNIX).

To generate a parallel simulation, check the "Generate MPI Parallel Simulation" option when generating the simulation source in ISIDE. Put this code in place of "inSilicoSim_parallel.cpp" in the "inSilicoSim" folder in the package. Run "make" on UNIX systems or open the Visual Studio inSilicoSim.sln file on Windows to compile the simulation.

To execute the simulation, use "mpirun -np ### ./simulation", where ### is the number of processors to use. Optional arguments include "-timing" to print a breakdown of simulation time, and "-debug" to print debugging information. The simulation results will appear in multssiple files in the same directory, one for each processor (result_0.dat, result_1.dat, etc).


(Top) 1, 2 (Next)