Difference between revisions of "Team:TU Darmstadt/Software"

 
(33 intermediate revisions by 5 users not shown)
Line 5: Line 5:
  
 
<html>
 
<html>
 +
 +
 
<style type="text/css">
 
<style type="text/css">
 +
html {
 +
  scroll-behavior: smooth;
 +
}
 
     .tg  {border-collapse:collapse;border-spacing:0;}
 
     .tg  {border-collapse:collapse;border-spacing:0;}
 
     .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
 
     .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
Line 38: Line 43:
  
 
     .klassendia{
 
     .klassendia{
        margin-left: 20%;
+
            margin-left: 0%;
        width:60%;
+
            width:100%;
        height:auto;
+
            height:auto;
 
     }
 
     }
 
     @media screen and (max-width:1200px) {
 
     @media screen and (max-width:1200px) {
Line 101: Line 106:
  
  
 
+
<a  class="anchor" id="scroll"></a>
  
 
<a  class="anchor" id="Chapter1"></a>
 
<a  class="anchor" id="Chapter1"></a>
Line 107: Line 112:
 
<div class="headlinebar"></div>
 
<div class="headlinebar"></div>
  
We developed a <b>software tool</b>  in collaboration with the Team Hannover(#TODO) iGEM, which enables the user to run a <b>molecular
+
We developed a <b>software tool</b>  in collaboration with the <a href="https://2020.igem.org/Team:Hannover" target="_blank">Team Hannover iGEM</a>, which enables the user to run a <b>molecular
     dynamics simulation</b> of biofilm growth. The program is implemented in Python and documented in detail on <a href="https://2020.igem.org/Team:Hannover/Model">our Wiki</a>
+
     dynamics simulation</b> of biofilm growth. The program is implemented in python and documented in detail on both Wikis
and <a href="https://github.com/StudDavid/Hannover">GitHub repository</a>. The software tool not only provides the numerical model but various functions to visualize the
+
and <a href="https://github.com/StudDavid/Hannover" target="_blank">GitHub repository</a>. The software tool not only provides the numerical model but various functions to visualize the
 
results and access the data. The software is optimized to make use of the full computational power of the local machine.
 
results and access the data. The software is optimized to make use of the full computational power of the local machine.
All of the used parameters and formulas are well documented. In our example notebook, we explain in detail how to adapt the
+
All of the used parameters and formulas are well documented. In our example notebook, we explain in detail how to <b>adapt the
model for its purposes. We implemented a specific class, to enable the user to switch easily between simulation constants and
+
model for its purposes</b>. We implemented a specific class, to enable the user to switch easily between simulation constants and
even different compositions of biofilms. Furthermore, we followed a comprehensive programming approach, to encourage future
+
even different compositions of biofilms. Furthermore, we followed a comprehensive programming approach, to <b>encourage future
iGEM teams to contribute to the project.
+
iGEM teams to contribute to the project</b>.
  
 
<a  class="anchor" id="Chapter2"></a>
 
<a  class="anchor" id="Chapter2"></a>
Line 120: Line 125:
 
<div class="headlinebar"></div>
 
<div class="headlinebar"></div>
  
The iGEM project of our team is to reduce pollutants like Diclofenac out of wastewater.
+
The <a href="https://2020.igem.org/Team:TU_Darmstadt/Description" target="_blank">iGEM project of our team</a> is to <b>reduce pollutants like diclofenac out of wastewater</b>.
As we had limited lab time we wanted a simulation to see if our biofilm can withstands the conditions of a
+
As we had limited lab time we wanted a simulation to <b>see if <a href="https://2020.igem.org/Team:TU_Darmstadt/Project/Biofilm" target="_blank">our biofilm</a> can withstands the conditions of a
sewage plant. As <a href="https://2020.igem.org/Team:Hannover">Team Hannover</a> developed a model that used Molecular Dynamics to model
+
sewage plant</b>. As <a href="https://2020.igem.org/Team:Hannover" target="_blank">Team Hannover</a> developed a model that used molecular dynamics to model
 
the behaviour of a bacteria in a biofilm, we got into contact.
 
the behaviour of a bacteria in a biofilm, we got into contact.
The iGEM project of team Hannover is the development of a "InToSens" (Inflammatory Toxin Sensor) made
+
The <a href="https://2020.igem.org/Team:Hannover/Description" target="_blank">iGEM project of team Hannover</a> is the development of a "InToSens" (Inflammatory Toxin Sensor) made
of biological components, which helps to diagnose the adherence of toxic biofilms to implant surfaces
+
of biological components, which helps to <b>diagnose the adherence of toxic biofilms to implant surfaces</b>. By detecting the attachment of a biofilm at an early stage, they aim to maximise
(https://2020.igem.org/Team:Hannover/Description). By detecting the attachment of a biofilm at an early stage, we aim to maximise
+
the chance for treatment success. Therefore, both teams are greatly interested in the mechanisms and parameters that cause and influence the formation of biofilms.
the chance for treatment success. Therefore, our teams are greatly interested in the mechanisms and parameters that cause and influence the formation of biofilms.
+
 
The developed model takes into account a diverse set of biological and physical parameters and enables the user,
 
The developed model takes into account a diverse set of biological and physical parameters and enables the user,
 
to quantitatively investigate the influence of different parameters on early biofilm formation
 
to quantitatively investigate the influence of different parameters on early biofilm formation
We teamed up with the <a href="https://2020.igem.org/Team:Hannover">iGEM Team Hannover</a>(#TODO) to discuss our model throughout the development.
+
we teamed up with the <a href="https://2020.igem.org/Team:Hannover" target="_blank">iGEM Team Hannover</a> to discuss our model throughout the development.
 
As the both teams are interested in different biofilm compositions and influencing parameters, we made great effort
 
As the both teams are interested in different biofilm compositions and influencing parameters, we made great effort
 
to make the model as flexible as possible.
 
to make the model as flexible as possible.
In the following, we focus on a short overview and a demonstration on how to use the software.
+
In the following, we focus on a <b>short overview and a demonstration on how to use the software</b>.
If you are interested in details on the implementation and methods, check out Teams Hannover'S <a href="https://2020.igem.org/Team:Hannover/Model">model Wiki page</a> or
+
If you are interested in details on the implementation and methods, check out Teams Hannover's <a href="https://2020.igem.org/Team:Hannover/Model" target="_blank">model Wiki page</a> or
the <a href="https://github.com/igemsoftwareadmin/Hannover">GitHub repository</a>.
+
the <a href="https://github.com/igemsoftwareadmin/Hannover" target="_blank">GitHub repository</a>.
  
 
<a  class="anchor" id="Chapter3"></a>
 
<a  class="anchor" id="Chapter3"></a>
Line 141: Line 145:
 
<div class="headlinebar"></div>
 
<div class="headlinebar"></div>
  
The software tool includes the implementation of three class and utility function to store, access and visualize the data generated in the simulation.
+
The software tool includes the <b>implementation of three class</b> and utility function to store, access and visualize the data generated in the simulation (Figure 1).
The main part of the code is the implementation of three classes. The Bacteria Class is our object-orientated representation of the
+
The main part of the code is the implementation of three classes.  
 +
<br><br>
 +
<b>The bacteria class</b> is our <b>object-orientated</b> representation of the
 
bacteria in the biofilm. Instances of the bacteria class have parameters regarding their movement and interaction with other bacteria
 
bacteria in the biofilm. Instances of the bacteria class have parameters regarding their movement and interaction with other bacteria
 
and the surrounding media. Additionally, the parameters are completed with a set of biological inspired parameters. Throughout the simulation,
 
and the surrounding media. Additionally, the parameters are completed with a set of biological inspired parameters. Throughout the simulation,
the parameters of each bacteria are exported in a Dictionary and save in the convenient JSON format.
+
the parameters of each bacteria are exported in a dictionary and save in the convenient <b>JSON format</b>.
In the Biofilm class the simulation takes place. An initial configuration of bacteria can be spawned and are stored in a list as a parameter of the
+
<br><br>
Biofilm instance. A Biofilm class method iterates over this list, updates the parameters of each bacteria and calculates interaction forces using a
+
In <b>the biofilm class the simulation takes place</b>. An initial configuration of bacteria can be spawned and are stored in a list as a parameter of the biofilm instance. A biofilm class method iterates over this list, updates the parameters of each bacteria and <b>calculates interaction forces</b> using a
biophysical potential and drag force. Because the computation gets complex quickly, we use multiprocessing to use all of the CPU cores of the users local machine.
+
biophysical potential and drag force. Because the computation gets complex quickly, we use <b>multiprocessing</b> to use all of the CPU cores of the users local machine.
The Constants class represents the interface, with which the user can specify the simulation constants like duration, step size and output paths. Furthermore,
+
<br><br>
constants like the number of initial bacteria and the bacterial strain, of which the Biofilm consist, can be set with methods of this class. Selecting a bacterial
+
<b>The constants class represents the interface</b>, with which the user can specify the simulation constants like duration, step size and output paths. Furthermore,
strain results in different properties of the Bacteria in the simulated biofilm. We provide the regarding constants of two bacterial strains Escherichia coli and
+
constants like the number of initial bacteria and the bacterial strain, of which the biofilm consist, can be set with methods of this class. Selecting a bacterial
Bacillus subtilis, between which the user can choose. Each strain comes with a Dictionary of constants regarding the biological properties of this strain.
+
strain results in different properties of the bacteria in the simulated biofilm. <b>We provide the regarding constants of two bacterial strains <i>Escherichia&nbsp;coli</i> and
All constants are well researched and documented on our wiki as well as in the code itself. The implementation of additional strains is intuitive, which makes
+
<i>Bacillus&nbsp;subtilis</i></b>, between which the user can choose. Each strain comes with a dictionary of constants regarding the biological properties of this strain.
 +
All constants are well researched and documented on our wiki as well as in the code itself. The <b>implementation of additional strains is intuitive</b>, which makes
 
the software tool easily extendable.
 
the software tool easily extendable.
The user can run a simulation and set the parameters on their one local machine by writing few lines of python code or even less, if he wants to use the default values.
+
The user can run a simulation and set the parameters on their one local machine by writing few lines of python code or even less, if he wants to use the default values.<br><br>
 +
 
 +
Below you can see a class diagram of our software tool:
  
 +
<br>
 
<figure>
 
<figure>
     <img class="klassendia" src="https://static.igem.org/mediawiki/2020/a/ac/T--TU_Darmstadt--klassendiagram_biofilm_growth.png">
+
     <img class="klassendia" src="https://static.igem.org/mediawiki/2020/a/ac/T--TU_Darmstadt--klassendiagram_biofilm_growth.png" target="_blank">
     <figcaption><b>Figure 2:</b> This is a overview of the classes and
+
     <figcaption><b>Figure 1:</b> This is a overview of the classes and
 
         functionalities of the software tool. By creating and modifying an instance of the constants class,
 
         functionalities of the software tool. By creating and modifying an instance of the constants class,
         the user can set constants regarding the simulation and the properties of the bacteria simulated. The methods of the Biofilm
+
         the user can set constants regarding the simulation and the properties of the bacteria simulated. The methods of the biofilm
 
         class take care of the simulation, while increasing the computational speed by using multiprocessing.  Instances of the bacteria class
 
         class take care of the simulation, while increasing the computational speed by using multiprocessing.  Instances of the bacteria class
 
         represent properties of real biological bacteria in a biofilm. Functions for loading the generated data and visualize it are provided in the
 
         represent properties of real biological bacteria in a biofilm. Functions for loading the generated data and visualize it are provided in the
Line 180: Line 190:
 
Then type
 
Then type
 
<pre>
 
<pre>
     git clone https://github.com/igemsoftware2020/Hannover
+
     git clone https://github.com/igemsoftwareadmin/Hannover.git
 
</pre>
 
</pre>
 
As mentioned above, our model uses a number of open-source python packages, which you will need to install. Open up a anaconda console and navigate in the env folder of our repository. By typing
 
As mentioned above, our model uses a number of open-source python packages, which you will need to install. Open up a anaconda console and navigate in the env folder of our repository. By typing
Line 214: Line 224:
 
</pre>
 
</pre>
 
In the jupyter notebook, we explaisn how to use our software tool the intended way. We included explanation of the functions and briefly analyze the results.
 
In the jupyter notebook, we explaisn how to use our software tool the intended way. We included explanation of the functions and briefly analyze the results.
For more detailed explanation of the outputs, check out <a href="https://2020.igem.org/Team:Hannover/Model">Hannover's  Model page.</a>(#TODO)
+
For more detailed explanation of the outputs, check out <a href="https://2020.igem.org/Team:Hannover/Model"target="_blank" >Hannover's  Model page.</a>
  
 
<a  class="anchor" id="Chapter6"></a>
 
<a  class="anchor" id="Chapter6"></a>
Line 249: Line 259:
 
<i><b>
 
<i><b>
 
     set_bacteria_constants()
 
     set_bacteria_constants()
</b></i>
+
</b></i>  
 
method.
 
method.
 
Add an <i><b>elif</b></i>
 
Add an <i><b>elif</b></i>
Line 267: Line 277:
 
and you are done.<br>
 
and you are done.<br>
  
Now you can run the simulation with your Bacterial strain by specifying
+
Now you can run the simulation with your bacterial strain by specifying
 
<pre>
 
<pre>
 
     constants = Constants(bac_type="Your_bacteria_strain_name" ) <!-- Muss nicht <pre> sein IMO-->
 
     constants = Constants(bac_type="Your_bacteria_strain_name" ) <!-- Muss nicht <pre> sein IMO-->
Line 273: Line 283:
 
in your custom script or in the example_usage script.<br>
 
in your custom script or in the example_usage script.<br>
  
A neat feature of the code is, that the Bacteria can easily be extended by additional parameters.
+
A neat feature of the code is, that the bacteria can easily be extended by additional parameters.
 
When adding a new parameter like <i>"self.some_protein_concentration"</i> to the <i>"__init__"</i> function and updating the return
 
When adding a new parameter like <i>"self.some_protein_concentration"</i> to the <i>"__init__"</i> function and updating the return
 
value of the <i>"get_bacteria_dict"</i> function accordingly, the new parameter will be automatically stored in the output data and
 
value of the <i>"get_bacteria_dict"</i> function accordingly, the new parameter will be automatically stored in the output data and
 
can be accessed with our data handling function. This allows to easily extend the bacteria properties in the simulation.
 
can be accessed with our data handling function. This allows to easily extend the bacteria properties in the simulation.
 
Further extensions, e.g. adding new forces are also possible but will require a little bit more effort. For this we suggest that you
 
Further extensions, e.g. adding new forces are also possible but will require a little bit more effort. For this we suggest that you
look at the implementation of the <i>"update_acting_forces"</i> method of the Bacteria class and the formulas in the formulas.py script.<br>
+
look at the implementation of the <i>"update_acting_forces"</i> method of the bacteria class and the formulas in the formulas.py script.<br>
  
 
Another possible contribution can be the implementation of new visualization methods.
 
Another possible contribution can be the implementation of new visualization methods.
Line 284: Line 294:
 
This functions enables you to pass the parameter you are interested in, e.g. the "velocity" and get a pandas array with the respective
 
This functions enables you to pass the parameter you are interested in, e.g. the "velocity" and get a pandas array with the respective
 
data for each bacteria for every time step.<br><br>
 
data for each bacteria for every time step.<br><br>
<b>We are excited, which contributions you will add to the open-source project!</b>
+
<b>We are excited which contributions you will add to the open-source project!</b>
 +
<br>
  
 
<a  class="anchor" id="Chapter7"></a>
 
<a  class="anchor" id="Chapter7"></a>
 
<h2>Parameter List</h2>
 
<h2>Parameter List</h2>
 
<div class="headlinebar"></div>
 
<div class="headlinebar"></div>
 +
 +
The parameter below are the one we store in our <b>dictionaries</b> and used for our <b><i>B.&nbsp;subtilis</i></b> <a h=ref="https://2020.igem.org/Team:TU_Darmstadt/Model/Biofilm_Modeling">simulations</a>. <a target="_blank" href="https://2020.igem.org/Team:TU_Darmstadt/Model/Biofilm_Modeling#Results">Click here to the results of our simulations. </a>
  
 
<table style="margin-left: auto;margin-right: auto;" class="tg">
 
<table style="margin-left: auto;margin-right: auto;" class="tg">
Line 306: Line 319:
 
         <td class="tg-0pky">7 * 1E-9</td>
 
         <td class="tg-0pky">7 * 1E-9</td>
 
         <td class="tg-0pky">0</td>
 
         <td class="tg-0pky">0</td>
         <td class="tg-0pky">[1]</td>
+
         <td class="tg-0pky"><a href="#cite_note-1">[1]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 313: Line 326:
 
         <td class="tg-0pky">6.81 * 1E-9</td>
 
         <td class="tg-0pky">6.81 * 1E-9</td>
 
         <td class="tg-0pky">0</td>
 
         <td class="tg-0pky">0</td>
         <td class="tg-0pky">[1]</td>
+
         <td class="tg-0pky"><a href="#cite_note-1">[1]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 320: Line 333:
 
         <td class="tg-0pky">log(1E5)</td>
 
         <td class="tg-0pky">log(1E5)</td>
 
         <td class="tg-0pky">0</td>
 
         <td class="tg-0pky">0</td>
         <td class="tg-0pky">[2]</td>
+
         <td class="tg-0pky"><a href="#cite_note-2">[2]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 330: Line 343:
 
     </tr>
 
     </tr>
 
     </tbody>
 
     </tbody>
     <caption  style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table1:</b> General</caption>
+
     <caption  style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table 1:</b> General</caption>
 
</table>
 
</table>
  
Line 365: Line 378:
 
         <td class="tg-0pky">5.239 * 1E-4</td>
 
         <td class="tg-0pky">5.239 * 1E-4</td>
 
         <td class="tg-0pky"></td>
 
         <td class="tg-0pky"></td>
         <td class="tg-0pky">[4]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 372: Line 385:
 
         <td class="tg-0pky">4.7</td>
 
         <td class="tg-0pky">4.7</td>
 
         <td class="tg-0pky">0,564</td>
 
         <td class="tg-0pky">0,564</td>
         <td class="tg-0pky">[4]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 379: Line 392:
 
         <td class="tg-0pky">2.5</td>
 
         <td class="tg-0pky">2.5</td>
 
         <td class="tg-0pky">1</td>
 
         <td class="tg-0pky">1</td>
         <td class="tg-0pky">[4]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 386: Line 399:
 
         <td class="tg-0pky">1</td>
 
         <td class="tg-0pky">1</td>
 
         <td class="tg-0pky">0</td>
 
         <td class="tg-0pky">0</td>
         <td class="tg-0pky">[4]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 396: Line 409:
 
     </tr>
 
     </tr>
 
     </tbody>
 
     </tbody>
     <caption style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table2:</b> <i>Bacilius Subtilis</i></caption>
+
     <caption style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table 2:</b> <i>Bacilius&nbsp;subtilis</i></caption>
 
</table>
 
</table>
  
Line 417: Line 430:
 
         <td class="tg-l8qj">1200</td>
 
         <td class="tg-l8qj">1200</td>
 
         <td class="tg-47as"></td>
 
         <td class="tg-47as"></td>
         <td class="tg-47as">[6]</td>
+
         <td class="tg-47as"><a href="#cite_note-5">[5]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 424: Line 437:
 
         <td class="tg-0pky">8.3 * 1E-4</td>
 
         <td class="tg-0pky">8.3 * 1E-4</td>
 
         <td class="tg-0pky"></td>
 
         <td class="tg-0pky"></td>
         <td class="tg-0pky">[6]</td>
+
         <td class="tg-0pky"><a href="#cite_note-5">[5]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 431: Line 444:
 
         <td class="tg-0pky">3.5</td>
 
         <td class="tg-0pky">3.5</td>
 
         <td class="tg-0pky">12,00 %</td>
 
         <td class="tg-0pky">12,00 %</td>
         <td class="tg-0pky">[5]</td>
+
         <td class="tg-0pky"><a href="#cite_note-4">[4]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 438: Line 451:
 
         <td class="tg-0pky">1</td>
 
         <td class="tg-0pky">1</td>
 
         <td class="tg-0pky">0.14</td>
 
         <td class="tg-0pky">0.14</td>
         <td class="tg-0pky">[5]</td>
+
         <td class="tg-0pky"><a href="#cite_note-4">[4]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 445: Line 458:
 
         <td class="tg-0pky">0.5</td>
 
         <td class="tg-0pky">0.5</td>
 
         <td class="tg-0pky"></td>
 
         <td class="tg-0pky"></td>
         <td class="tg-0pky">[4],[5]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3</a>,<a href="#cite_note-4"> 4]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 452: Line 465:
 
         <td class="tg-0pky">8</td>
 
         <td class="tg-0pky">8</td>
 
         <td class="tg-0pky"></td>
 
         <td class="tg-0pky"></td>
         <td class="tg-0pky">[7]</td>
+
         <td class="tg-0pky"><a href="#cite_note-6">[6]</a></td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
Line 459: Line 472:
 
         <td class="tg-0pky">1,00E-12</td>
 
         <td class="tg-0pky">1,00E-12</td>
 
         <td class="tg-0pky"></td>
 
         <td class="tg-0pky"></td>
         <td class="tg-0pky">[4]</td>
+
         <td class="tg-0pky"><a href="#cite_note-3">[3]</a></td>
 
     </tr>
 
     </tr>
 
     </tbody>
 
     </tbody>
     <caption style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table3:</b><i> Escherichia Coli</i></caption>
+
     <caption style="color:black;padding-top: 10px;text-align:center; caption-side: bottom"><b>Table 3:</b><i> Escherichia&nbsp;coli</i></caption>
 
</table>
 
</table>
  
Line 468: Line 481:
  
  
 
<!----------Insert TEXT Here --------->
 
  
  
Line 477: Line 488:
 
<div class="referencestd">
 
<div class="referencestd">
 
  <h4 style="text-align: left"> References</h4>
 
  <h4 style="text-align: left"> References</h4>
 
  
 
  <a class="anchor" id="cite_note-1"></a>
 
  <a class="anchor" id="cite_note-1"></a>
  <a class="referencestd" href="#"
+
  <a class="referencestd" href="https://pennstate.pure.elsevier.com/en/publications/quantification-of-bacterial-adhesion-forces-using-atomic-force-mi"
target="_blank">[1]</a>
+
target="_blank">[1] Fang, Herbert HP; Chan, Kwong-Yu; XU, Li-Chong. Quantification of bacterial adhesion forces using atomic force microscopy (AFM). Journal of microbiological methods, 2000, 40. Jg., Nr. 1, S. 89-97.</a>
 +
 
 +
<a class="anchor" id="cite_note-2"></a>
 +
<a class="referencestd" href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.93.098102"
 +
target="_blank">[2] Shaw, T., et al. Commonality of elastic relaxation times in biofilms. Physical review letters, 2004, 93. Jg., Nr. 9, S. 098102.</a>
 +
 
 +
 
 +
 
 +
 
 +
<a class="anchor" id="cite_note-3"></a>
 +
<a class="referencestd" href="https://pubmed.ncbi.nlm.nih.gov/29170466/"
 +
target="_blank">[3] Van Heerden, Johan H., et al. Statistics and simulation of growth of single bacterial cells: illustrations with <i>B.&nbsp;subtilis</i> and <i>E.&nbsp;coli</i>. Scientific reports, 2017, 7. Jg., Nr. 1, S. 1-11. </a>
 +
 
 +
<a class="anchor" id="cite_note-4"></a>
 +
<a class="referencestd" href="https://pubmed.ncbi.nlm.nih.gov/25186725/"
 +
target="_blank">[4] Kiviet, Daniel J., et al. Stochasticity of metabolism and growth at the single-cell level. Nature, 2014, 514. Jg., Nr. 7522, S. 376-379. </a>
 +
 
 +
<a class="anchor" id="cite_note-5"></a>
 +
<a class="referencestd" href="https://pubmed.ncbi.nlm.nih.gov/24550446/"
 +
target="_blank">[5] Osella Matteo; Nugent, Eileen; Lagomarsino, Marco Cosentino. Concerted control of <i>Escherichia&nbsp;coli</i> cell division. Proceedings of the National Academy of Sciences, 2014, 111. Jg., Nr. 9, S. 3431-3435. </a>
 +
 
 +
<a class="anchor" id="cite_note-6"></a>
 +
<a class="referencestd" href="http://book.bionumbers.org/how-big-is-an-e-coli-cell-and-what-is-its-mass/"
 +
target="_blank">[6] http://book.bionumbers.org/how-big-is-an-e-coli-cell-and-what-is-its-mass/ accessed 25.10.2020</a>
 +
 
 +
 
  
  

Latest revision as of 17:12, 26 October 2020

image/svg+xml - O O



Abstract

We developed a software tool in collaboration with the Team Hannover iGEM, which enables the user to run a molecular dynamics simulation of biofilm growth. The program is implemented in python and documented in detail on both Wikis and GitHub repository. The software tool not only provides the numerical model but various functions to visualize the results and access the data. The software is optimized to make use of the full computational power of the local machine. All of the used parameters and formulas are well documented. In our example notebook, we explain in detail how to adapt the model for its purposes. We implemented a specific class, to enable the user to switch easily between simulation constants and even different compositions of biofilms. Furthermore, we followed a comprehensive programming approach, to encourage future iGEM teams to contribute to the project.

Why did we do this?

The iGEM project of our team is to reduce pollutants like diclofenac out of wastewater. As we had limited lab time we wanted a simulation to see if our biofilm can withstands the conditions of a sewage plant. As Team Hannover developed a model that used molecular dynamics to model the behaviour of a bacteria in a biofilm, we got into contact. The iGEM project of team Hannover is the development of a "InToSens" (Inflammatory Toxin Sensor) made of biological components, which helps to diagnose the adherence of toxic biofilms to implant surfaces. By detecting the attachment of a biofilm at an early stage, they aim to maximise the chance for treatment success. Therefore, both teams are greatly interested in the mechanisms and parameters that cause and influence the formation of biofilms. The developed model takes into account a diverse set of biological and physical parameters and enables the user, to quantitatively investigate the influence of different parameters on early biofilm formation we teamed up with the iGEM Team Hannover to discuss our model throughout the development. As the both teams are interested in different biofilm compositions and influencing parameters, we made great effort to make the model as flexible as possible. In the following, we focus on a short overview and a demonstration on how to use the software. If you are interested in details on the implementation and methods, check out Teams Hannover's model Wiki page or the GitHub repository.

What do we provide?

The software tool includes the implementation of three class and utility function to store, access and visualize the data generated in the simulation (Figure 1). The main part of the code is the implementation of three classes.

The bacteria class is our object-orientated representation of the bacteria in the biofilm. Instances of the bacteria class have parameters regarding their movement and interaction with other bacteria and the surrounding media. Additionally, the parameters are completed with a set of biological inspired parameters. Throughout the simulation, the parameters of each bacteria are exported in a dictionary and save in the convenient JSON format.

In the biofilm class the simulation takes place. An initial configuration of bacteria can be spawned and are stored in a list as a parameter of the biofilm instance. A biofilm class method iterates over this list, updates the parameters of each bacteria and calculates interaction forces using a biophysical potential and drag force. Because the computation gets complex quickly, we use multiprocessing to use all of the CPU cores of the users local machine.

The constants class represents the interface, with which the user can specify the simulation constants like duration, step size and output paths. Furthermore, constants like the number of initial bacteria and the bacterial strain, of which the biofilm consist, can be set with methods of this class. Selecting a bacterial strain results in different properties of the bacteria in the simulated biofilm. We provide the regarding constants of two bacterial strains Escherichia coli and Bacillus subtilis, between which the user can choose. Each strain comes with a dictionary of constants regarding the biological properties of this strain. All constants are well researched and documented on our wiki as well as in the code itself. The implementation of additional strains is intuitive, which makes the software tool easily extendable. The user can run a simulation and set the parameters on their one local machine by writing few lines of python code or even less, if he wants to use the default values.

Below you can see a class diagram of our software tool:
Figure 1: This is a overview of the classes and functionalities of the software tool. By creating and modifying an instance of the constants class, the user can set constants regarding the simulation and the properties of the bacteria simulated. The methods of the biofilm class take care of the simulation, while increasing the computational speed by using multiprocessing. Instances of the bacteria class represent properties of real biological bacteria in a biofilm. Functions for loading the generated data and visualize it are provided in the software tool.

Application

Prerequisites

Because the software tool is implemented in the python language, there are a few requisites before we can dive into the code. First of all the user will need an installation of python on its machine. We recommend the installation of the open-source distribution "anaconda". With this, the user can make use of all the features included in our tool. The installation of anaconda includes python itself, the development enviroment (IDE) Spyder and Jupyter, a web based tool for interactive programming. Once you installed anaconda, our software tool has to be copied to the local machine. Open up a console and navigate in the the folder, in which you want to clone the repository Then type
    git clone https://github.com/igemsoftwareadmin/Hannover.git
As mentioned above, our model uses a number of open-source python packages, which you will need to install. Open up a anaconda console and navigate in the env folder of our repository. By typing
    conda env create -f biofilm_model_env.yml
you will get all of the needed packages. This file stores the settings of our so called “python enviroment”, which includes all the tools needed for running our software. Activate the above environment by typing
    conda activate biofilm_model_env
and install the BiofilmSimulation software tool via pip:
    pip install BiofilmSimulation
Now you got everything you need, to start our BiofilmSimulation tool on your computer. We note that the terminal commands can slightly differ depending on the operating system installed on your local machine. If you are having trouble installing the module, open an issue at our GitHub page.

How to run it

To directly start with the simulation type
    jupyter-notebook
This will open up a webbrowser running with Jupyter. Navigate to the folder, in which you just cloned the repository and jump into the example by clicking on the example.ipynb file. If the browser does not show up automatically, open it manually and connect to
    http://localhost:8888/
In the jupyter notebook, we explaisn how to use our software tool the intended way. We included explanation of the functions and briefly analyze the results. For more detailed explanation of the outputs, check out Hannover's Model page.

How to modify the source code

Our code is easily extendable. Here we present some approaches to modify the source code. The BiofilmSimulation module provides constants of two bacterial strains. If you want to add more strains, you can do so by researching the needed constants and storing them in a python dictionary. The dictionary has to be in the following format
    ecoli_dic = {
    "LENGTH": np.abs(np.random.normal(loc=1, scale=0.14)),
    # [um]
    "WIDTH": 0.5 ,  # [um]
    "MASS": 10 ** (-12),  # [kg]
    "MORTALITY_RATE": 0.01,  # [% / 100]
    "CRITICAL_LENGTH": 3.5,  # [um]
    "FREE_MEAN_SPEED": 50,  # [um / s]
    "DOUBLING_TIME": 1200,  # [s]
    "GROWTH_RATE": 1 / 1200,  # [um / s]
    "MOTION_ACTIVATION_PROBABILITY": 0.005,  # [% / 100]
    "MOTION_DEACTIVATION_PROBABILITY": 0.01  # [% / 100]
}
Open up the source code in constants.py in a editior of your choice. If you installed anaconda you can use the Spyder IDE, which comes with the anaconda installation. By copying the
    get_ecoli_constants(key: str = None)
function and replacing the dictionary choosing a unique function name you already did half of the work. Now, you will have to add your function to the set_bacteria_constants() method. Add an elif statement at the end of the function in the following way:
    def set_bacteria_constants(self, default=True):
    """ set constants according to selected bacteria strain """
    if self.bac_type == "B.Sub." and default:
    self.bac_constants = Constants.get_bsub_constants()
    elif self.bac_type == "E.Coli." and default:
    self.bac_constants = Constants.get_ecoli_constants()
    elif self.bac_type == "Your_bacteria_strain_name" and default:
    self.bac_constants = Constants.your_unique_function_name()
and you are done.
Now you can run the simulation with your bacterial strain by specifying
    constants = Constants(bac_type="Your_bacteria_strain_name" ) 
in your custom script or in the example_usage script.
A neat feature of the code is, that the bacteria can easily be extended by additional parameters. When adding a new parameter like "self.some_protein_concentration" to the "__init__" function and updating the return value of the "get_bacteria_dict" function accordingly, the new parameter will be automatically stored in the output data and can be accessed with our data handling function. This allows to easily extend the bacteria properties in the simulation. Further extensions, e.g. adding new forces are also possible but will require a little bit more effort. For this we suggest that you look at the implementation of the "update_acting_forces" method of the bacteria class and the formulas in the formulas.py script.
Another possible contribution can be the implementation of new visualization methods. Almost all of our visualization functions make use of the "get_data_to_parameter" function in the data_handling.py script. This functions enables you to pass the parameter you are interested in, e.g. the "velocity" and get a pandas array with the respective data for each bacteria for every time step.

We are excited which contributions you will add to the open-source project!

Parameter List

The parameter below are the one we store in our dictionaries and used for our B. subtilis simulations. Click here to the results of our simulations.
Parameter Unit expected value Varianz reference
Maximum bacteria substrate adhesion force N 7 * 1E-9 0 [1]
Maximum bacteria- bacteria adhesion force N 6.81 * 1E-9 0 [1]
Effective viscosity of EPS Pa * s log(1E5) 0 [2]
Effective viscosity of water Pa * s 0.7805 * 1E-3 0
Table 1: General


Parameter Unit expected value Varianz reference
Doubling time s 4200
Growth rate um / s 5.239 * 1E-4 [3]
Division length um 4.7 0,564 [3]
Birth length um 2.5 1 [3]
Width um 1 0 [3]
Mass kg 1,00E-12 0
Table 2: Bacilius subtilis
Parameter Unit expected value Varianz reference
Doubling time s 1200 [5]
Growth rate um / s 8.3 * 1E-4 [5]
Division length um 3.5 12,00 % [4]
Birth length um 1 0.14 [4]
Width um 0.5 [3, 4]
Free mean speed um/s 8 [6]
Mass kg 1,00E-12 [3]
Table 3: Escherichia coli