Team:Paris Saclay/Modeling/Simulator

From 2013.igem.org

(Difference between revisions)
(Hsim description)
(Hsim description)
Line 25: Line 25:
== Hsim description ==
== Hsim description ==
-
Conception:
+
===Conception:===
<p>
<p>
*Hsim is created for bio-chemical reaction simulation, it demonstrates bio-chemical systems which the scientists are already known.
*Hsim is created for bio-chemical reaction simulation, it demonstrates bio-chemical systems which the scientists are already known.
Line 35: Line 35:
*reactions are called rules. A probability is associated with every rule. Computer takes a random sample and compare it to the probability of a rule. If the value exceeds the threshold, we consider that the reaction takes place. If not, there is no reaction.[[File:PSschamahsim.jpg|center|500px|thumb|<center>Patrick Amar https://www.lri.fr/~pa/Hsim/</center>]]</p>
*reactions are called rules. A probability is associated with every rule. Computer takes a random sample and compare it to the probability of a rule. If the value exceeds the threshold, we consider that the reaction takes place. If not, there is no reaction.[[File:PSschamahsim.jpg|center|500px|thumb|<center>Patrick Amar https://www.lri.fr/~pa/Hsim/</center>]]</p>
-
Example:
+
===Example:===
-
<div>
+
<blockquote>
title = "FNR simulator";<br>
title = "FNR simulator";<br>
Line 47: Line 47:
//declare the size of molecule<br>
//declare the size of molecule<br>
-
size (fnr_on) = 0.1;<br>
+
size (fnr_on) = 0.1;
-
size (fnr_on_pair) = 0.2;<br>
+
size (fnr_on_pair) = 0.2;
size (fnr_off) = 0.1;<br>
size (fnr_off) = 0.1;<br>
-
speed (fnr_on) = 0.1;<br>
+
speed (fnr_on) = 0.1;
-
speed (fnr_on_pair) = 0.05;<br>
+
speed (fnr_on_pair) = 0.05;
speed (fnr_off) = 0.1;<br>
speed (fnr_off) = 0.1;<br>
-
size (prom_fnr) = 2.0;<br>
+
size (prom_fnr) = 2.0;
-
speed (prom_fnr) = 0.05;<br>
+
speed (prom_fnr) = 0.05;
size (prom_fnr_binded) = 2.0;<br>
size (prom_fnr_binded) = 2.0;<br>
speed (prom_fnr_binded) = 0.05;
speed (prom_fnr_binded) = 0.05;
-
size (protein) = 0.2;<br>
+
size (protein) = 0.2;
speed (protein) = 0.1;<br>
speed (protein) = 0.1;<br>
Line 77: Line 77:
init (3, prom_fnr);<br>
init (3, prom_fnr);<br>
init (2, o2); //oxy<br>
init (2, o2); //oxy<br>
-
</div>
+
</blockquote>
== Wiki-integrated simulator ==
== Wiki-integrated simulator ==

Revision as of 21:22, 4 October 2013

Contents

Simulator

Hsim description

Conception:

  • Hsim is created for bio-chemical reaction simulation, it demonstrates bio-chemical systems which the scientists are already known.
  • Hsim simulate a virtual cell. We can set the size of it
  • The molecules are simulated as spheres (in 3D). Every molecule has a size and movement speed which are all configurable.
  • The metabolite a molecule that are considered as homogeneous in the system.
  • Time unit is 100ms, and we also called it a generation.
  • Molecules diffusion are simulated by movements of spheres, if the distance between two spheres is less than 10 nm, a collision will probably happen. The movement of spheres are discreet, and random in direction randomly but could follow some stochastic rules (like Brownian movement). Speed is translated to probability for moving 10 nm in one generation.
  • reactions are called rules. A probability is associated with every rule. Computer takes a random sample and compare it to the probability of a rule. If the value exceeds the threshold, we consider that the reaction takes place. If not, there is no reaction.

Example:

title = "FNR simulator";
//declare the molecules and metabolite
molecule fnr_on, fnr_off, fnr_on_pair;
molecule prom_fnr, prom_fnr_binded;
molecule protein;
metabolite o2;
//declare the size of molecule
size (fnr_on) = 0.1; size (fnr_on_pair) = 0.2; size (fnr_off) = 0.1;
speed (fnr_on) = 0.1; speed (fnr_on_pair) = 0.05; speed (fnr_off) = 0.1;
size (prom_fnr) = 2.0; speed (prom_fnr) = 0.05; size (prom_fnr_binded) = 2.0;
speed (prom_fnr_binded) = 0.05; size (protein) = 0.2; speed (protein) = 0.1;
//syntax of reaction rules
fnr_on + o2 -> fnr_off + o2 [0.7];// probability for this rule take place is 0.7
fnr_off -> fnr_on [0.001];
fnr_on + fnr_on -> fnr_on_pair [0.5];
fnr_on_pair -> fnr_on + fnr_on [0.001];
prom_fnr + fnr_on_pair -> prom_fnr_binded [0.6];
prom_fnr_binded -> prom_fnr + fnr_on_pair [0.03];
prom_fnr_binded -> prom_fnr_binded + protein [0.01];
//Initial concentrations
init (10000, fnr_on);
init (3, prom_fnr);
init (2, o2); //oxy

Wiki-integrated simulator

A simulation graph is worth a thousand words. But an integrated, user-controllable online simulator is worth a million.

Explanation

In order to make our models easier to understand, we have created an on-line simulator fully integrated in the iGEM wiki system. This simulator uses the aforementioned HSIM rules and implements one of the HSIM algorithms that can be summed up as the following series of steps :

  1. Randomly reorder the reaction list
  2. Compute the number of reactions to execute : R. R is a decimal number proportional to the concentrations, the reaction probability, and a constant factor α.
  3. Execute the reaction integer part of R times
  4. Execute it one more time with the probability decimal part of R

See the reference article for more details.

This self-contained simulator is written in standard HTML5 and is therefore compatible with the iGEM 2013 rules which forbid the embedding of plug-ins and external data.

How to control the simulator

Our wiki-based simulator in action

The simulator is easy to use. The graph represents the live quantities of the different molecules as a function of time. The line color for each molecule is shown just below the graph. The controllable quantities involved in the simulation also appear under the graph. Finally, there are two control buttons : START and RESET.

In order to launch a simulation, you can press START. To pause it, click on this same button again. Another click will resume the simulation. While the simulation is paused, you can modify the controllable quantities. If you want to reset the simulation to its initial state and default molecule quantities, just click on the RESET button.

You can launch the simulator associated with our modeling of the oxygen sensor system.

How to include this simulator in your wiki

Our simulator is designed to be simple to use. You can embed your own by following these steps :

  • First upload a copy of our script available here : HTML5 simulator code
  • Then insert the script one time at the beginning of each page where you want to use the simulator :
<script src="http://YEAR.igem.org/Team:TEAM/simbox.js?action=raw&ctype=text/javascript"></script>
  • For each simulation, create an XML configuration page. The syntax is the following :
<?xml version="1.0" encoding="ISO-8859-1"?>
<sim>
<yscale>1300</yscale>

<volume>0.7</volume> <!-- 0.7 cubic micrometers -->
<timestep>0.0001</timestep> <!-- seconds -->
<alpha>7.4e-7</alpha> <!-- alpha -->

<!-- DECLARATION OF THE MOLECULES -->

<molecule name="A" quantity="1000" curve_show="true" curve_color="#FF0000" adjustable="true"/>
<molecule name="B" quantity="1000" curve_show="true" curve_color="#0000FF"/>
<molecule name="C" curve_show="true" curve_color="#FF00FF"/>

<!-- DECLARATION OF THE REACTIONS -->

<!-- A + B -> C -->
<reaction probability="0.1">
 <in>A</in>
 <in>B</in>
 <out>C</out>
</reaction>

<!-- A -> B + C -->
<reaction probability="0.0001">
 <in>A</in>
 <out>B</out>
 <out>C</out>
</reaction>

</sim>
  • Finally, include the simulator in your page :
<html>
<div class="simbox" data-width="785" data-height="300" data-load="URL_OF_YOUR_XML_PAGE">
Loading simulation...
</div>
</html>


Article written by Zhou and Damir