model = """# Generated by PySCeS 0.7.0 (2010-10-07 19:43)
 
# Keywords
Description: Auto-regulatory network
Modelname: AutoRegulatoryNetwork
Output_In_Conc: True
Species_In_Conc: False
 
# GlobalUnitDefinitions
UnitVolume: litre, 1.0, 0, 1
UnitLength: metre, 1.0, 0, 1
UnitSubstance: item, 1.0, 0, 1
UnitArea: metre, 1.0, 0, 2
UnitTime: second, 1.0, 0, 1
 
# Compartments
Compartment: Cell, 1.0, 3 
 
# Reactions
RepressionBinding@Cell:
    P2 + Gene > P2Gene
    RepressionBinding_k1*Gene*P2

ProteinDegradation@Cell:
    P > $pool
    ProteinDegradation_k6*P

Dimerisation@Cell:
    {2.0}P > P2
    Dimerisation_k4*0.5*P*(P-1)

Dissociation@Cell:
    P2 > {2.0}P
    Dissociation_k4r*P2

Transcription@Cell:
    $pool > Rna
    Transcription_k2*Gene

RnaDegradation@Cell:
    Rna > $pool
    RnaDegradation_k5*Rna

Translation@Cell:
    $pool > P
    Translation_k3*Rna

ReverseRepressionBinding@Cell:
    P2Gene > P2 + Gene
    ReverseRepressionBinding_k1r*P2Gene
 
# Fixed species
 
# Variable species
P2@Cell = 0.0
P@Cell = 0.0
Rna@Cell = 0.0
Gene@Cell = 10.0
P2Gene@Cell = 0.0
 
# Parameters
RepressionBinding_k1 = 1.0
ProteinDegradation_k6 = 0.01
Dimerisation_k4 = 1.0
Dissociation_k4r = 1.0
Transcription_k2 = 0.01
RnaDegradation_k5 = 0.1
Translation_k3 = 10.0
ReverseRepressionBinding_k1r = 10.0 
"""

xml_model = """<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1">
  <model id="AutoRegulatoryNetwork" name="Auto-regulatory network">
    <listOfUnitDefinitions>
      <unitDefinition id="substance">
        <listOfUnits>
          <unit kind="item" multiplier="1" offset="0"/>
        </listOfUnits>
      </unitDefinition>
    </listOfUnitDefinitions>
    <listOfCompartments>
      <compartment id="Cell"/>
    </listOfCompartments>
    <listOfSpecies>
      <species id="Gene" compartment="Cell" initialAmount="10" hasOnlySubstanceUnits="true"/>
      <species id="P2Gene" name="P2.Gene" compartment="Cell" initialAmount="0" hasOnlySubstanceUnits="true"/>
      <species id="Rna" compartment="Cell" initialAmount="0" hasOnlySubstanceUnits="true"/>
      <species id="P" compartment="Cell" initialAmount="0" hasOnlySubstanceUnits="true"/>
      <species id="P2" compartment="Cell" initialAmount="0" hasOnlySubstanceUnits="true"/>
    </listOfSpecies>
    <listOfReactions>
      <reaction id="RepressionBinding" name="Repression binding" reversible="false">
        <listOfReactants>
          <speciesReference species="Gene"/>
          <speciesReference species="P2"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="P2Gene"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k1 </ci>
              <ci> Gene </ci>
              <ci> P2 </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k1" value="1"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="ReverseRepressionBinding" name="Reverse repression binding" reversible="false">
        <listOfReactants>
          <speciesReference species="P2Gene"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="Gene"/>
          <speciesReference species="P2"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k1r </ci>
              <ci> P2Gene </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k1r" value="10"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="Transcription" reversible="false">
        <listOfReactants>
          <speciesReference species="Gene"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="Gene"/>
          <speciesReference species="Rna"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k2 </ci>
              <ci> Gene </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k2" value="0.01"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="Translation" reversible="false">
        <listOfReactants>
          <speciesReference species="Rna"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="Rna"/>
          <speciesReference species="P"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k3 </ci>
              <ci> Rna </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k3" value="10"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="Dimerisation" reversible="false">
        <listOfReactants>
          <speciesReference species="P" stoichiometry="2"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="P2"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k4 </ci>
              <cn> 0.5 </cn>
              <ci> P </ci>
              <apply>
                <minus/>
                <ci> P </ci>
                <cn type="integer"> 1 </cn>
              </apply>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k4" value="1"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="Dissociation" reversible="false">
        <listOfReactants>
          <speciesReference species="P2"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="P" stoichiometry="2"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k4r </ci>
              <ci> P2 </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k4r" value="1"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="RnaDegradation" name="RNA Degradation" reversible="false">
        <listOfReactants>
          <speciesReference species="Rna"/>
        </listOfReactants>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k5 </ci>
              <ci> Rna </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k5" value="0.1"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
      <reaction id="ProteinDegradation" name="Protein degradation" reversible="false">
        <listOfReactants>
          <speciesReference species="P"/>
        </listOfReactants>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
              <times/>
              <ci> k6 </ci>
              <ci> P </ci>
            </apply>
          </math>
          <listOfParameters>
            <parameter id="k6" value="0.01"/>
          </listOfParameters>
        </kineticLaw>
      </reaction>
    </listOfReactions>
  </model>
</sbml>
"""

