The JavaScript THESIS templete

(with dummy model Enzyme)

<SCRIPT language="javascript">
i = 0;
time = 0;
y1 = 0;
y2 = 0;
y3 = 0;
t = 0.0;
dt = 0.0;
S = 0.0;
E = 0.0;
ES = 0.0;
P = 0.0;
k0 = 0.0;
k1 = 0.0;
k2 = 0.0;

function stop()
{
}

function reStart()
{
  i = 0;
  time = 0;
  y1 = 0;
  y2 = 0;
  y3 = 0;

  t = 0.0; // [seconde]
  dt = 0.03; // [seconde]
  S = 1000.0; // [umoles/ml]
  E = 200.0; // [umoles/ml]
  ES = 0.0; // [umoles/ml]
  P = 0.0; // [umoles/ml]
  k0 = 0.5; // [1/sec]
  k1 = 0.0008; // [1/umoles.sec]
  k2 = 0.000125; // [1/sec]

  time = Math.round(0.0);
  y1 = Math.round(S);
  y2 = Math.round(ES);
  y3 = Math.round(P);
}

function run()
{
      document.tellerY1.setValue(Math.round(y1));
      document.tellerY2.setValue(Math.round(y2));
      document.tellerY3.setValue(Math.round(y3));
      document.tellerT.setValue(Math.round(t));

      document.kader1.setGrafiek1YT1(time,y1);
      document.kader1.setGrafiek2YT1(time,y2);
      document.kader2.setGrafiek1YT1(time,y3);

      i = i + 1;
      t = t + dt;

      dPdt = + k0*ES;
      P = P + dPdt*dt;
      dSdt = - k1*E*S + k2*ES;
      S = S + dSdt*dt;
      dEdt = - k1*E*S + k2*ES + k0*ES;
      E = E + dEdt*dt;
      dESdt = + k1*E*S - k2*ES - k0*ES;
      ES = ES + dESdt*dt; 

      time = Math.round(i);
      y1 = Math.round(S);  
      y2 = Math.round(ES);  
      y3 = Math.round(P);  

      document.kader1.setGrafiek1YT2(time,y1);
      document.kader1.setGrafiek2YT2(time,y2);
      document.kader2.setGrafiek1YT2(time,y3);

      if (i<200) {window.setTimeout("run()",50)} else {stop()};
}

</SCRIPT>

<BODY onLoad="reStart()">

<CENTER>
<FORM> 
<H1>Enzymkinetics </H1>
<H3>(an example of a model-driven simulation with animation)</H3>
<B>S</B> + <B>E</B> <==k1/k2==> <B>ES</B> ---k0---> <B>P</B>

<P>
<APPLET
  CODE="Animatie.class"
  NAME='pS'
  width="25"
  height="200">
</APPLET>

<APPLET
    CODE="grafiekYT.class"
    NAME='kader1'
    width=160
    height=200>
   <param name="BackColor"   value="230,230,230">
   <param name="GridColor"   value="0,0,0">
   <param name="Graph1Color"   value="255,0,0">
   <param name="Graph2Color"   value="0,0,255">
   <param name="GridT"       value="3">
   <param name="GridY"       value="10">
   <param name="Y1min"       Value="0">
   <param name="Y1max"       Value="1000">
   <param name="Y1text"      Value="Substrate [S]">
   <param name="Y2min"       Value="0">
   <param name="Y2max"       Value="1000">
   <param name="Y2text"      Value="ES-complex [ES]">
   <param name="Tmin"        Value="0">
   <param name="Tmax"        Value="500"> // 500 punten?
</APPLET>

<APPLET
  CODE="Animatie.class"
  NAME='aES'
  width="25"
  height="200">
</APPLET>

<APPLET
    CODE="grafiekYT.class"
    NAME='kader2'
    width=160
    height=200>
   <param name="BackColor"   value="230,230,230">
   <param name="GridColor"   value="0,0,0">
   <param name="Graph1Color"   value="255,0,0">
   <param name="Graph2Color"   value="0,0,255">
   <param name="GridT"       value="3">
   <param name="GridY"       value="10">
   <param name="Y1min"       Value="0">
   <param name="Y1max"       Value="1000">
   <param name="Y1text"      Value="Product [P]">
   <param name="Y2min"       Value="0">
   <param name="Y2max"       Value="1000">
   <param name="Y2text"      Value="xx">
   <param name="Tmin"        Value="0">
   <param name="Tmax"        Value="500"> //500 punten?
</APPLET>

<APPLET
  CODE="Animatie.class"
  NAME='aP'
  width="25"
  height="200">
</APPLET>

<BR>
Tmin: 0 ---------- 
<INPUT type="button" name="xxxxxx" value="run" onClick="run ()">
<FONT SIZE=-2>time</FONT>

<APPLET 
    CODE="Teller.class" 
    NAME='tellerT' 
    width="50" 
    height="20">
    <param name="FontFamily" value="Courier">
    <param name="FontSize" value="30">
    <param name="BGCol" value="ff0000">
    <param name="StartValue" value="0">
</APPLET>

 --> ---------- Tmax: 15 [Sec] <FONT SIZE=-2>(=500*0.03)</FONT><P><B>S</B> 

<APPLET 
    CODE="Teller.class" 
    NAME='tellerY1' 
    width="50" 
    height="20">
    <param name="FontFamily" value="Courier">
    <param name="FontSize" value="30">
    <param name="BGCol" value="ff0000">
    <param name="StartValue" value="15">
</APPLET>

<FONT SIZE=-2>(Red)</FONT> ---------- <B>ES</B> 

<APPLET 
    CODE="Teller.class" 
    NAME='tellerY2' 
    width="50" 
    height="20">
    <param name="FontFamily" value="Courier">
    <param name="FontSize" value="30">
    <param name="BGCol" value="ff0000">
    <param name="StartValue" value="0">
</APPLET> 

<FONT SIZE=-2>(Blue)</FONT> ---------- <B>P</B>  

<APPLET 
    CODE="Teller.class" 
    NAME='tellerY3' 
    width="50" 
    height="20">
    <param name="FontFamily" value="Courier">
    <param name="FontSize" value="30">
    <param name="BGCol" value="ff0000">
    <param name="StartValue" value="35">
</APPLET> <FONT SIZE=-2>(Red)</FONT> 

</CENTER>
</FORM>

Enschede, Dec, 8, 2003