Team:BCCS-Bristol/BSim-User-Guide

From 2008.igem.org

(Difference between revisions)
(New page: BSim User Guide 1. Preliminary BSim uses the Java [insert link to page describing what java is] programming language so any computer using BSim must have a Java environment before any sim...)
(Download and Extraction)
 
(70 intermediate revisions not shown)
Line 1: Line 1:
-
BSim User Guide
+
<html><link rel="stylesheet" href="http://homepage.mac.com/tgorochowski/iGEM/bccs-igem.css" type="text/css"></html>
 +
<div class="bccsNavBar">
 +
{|  align="center"
 +
!align="center"|[[Team:BCCS-Bristol|Home]]
 +
!align="center"|[[Team:BCCS-Bristol/Team|The Team]]
 +
!align="center"|[[Team:BCCS-Bristol/Project|The Project]]
 +
!align="center"|[[Team:BCCS-Bristol/Parts|Submitted Parts]]
 +
!align="center"|[[Team:BCCS-Bristol/Modeling|Modelling]]
 +
!align="center"|[[Team:BCCS-Bristol/Notebook|Wet Lab]]
 +
!align="center"|[[Team:BCCS-Bristol/Calendar|Calendar]]
 +
!align="center"|[[Team:BCCS-Bristol/Misc|Miscellaneous]]
 +
|}
 +
<br>
 +
</div>
-
1. Preliminary
+
<div class="bccsMain">
-
BSim uses the Java [insert link to page describing what java is] programming language so any computer using BSim must have a Java environment before any simulations can be run. The following steps explain how to set up a Java environment:
+
-
1.1 Check it’s not already done!
+
-
1.2 Download & Install Java
+
-
1.3 Define environmental variables
+
-
2. Compile package – compileAll
+
== BSim User Guide ==
 +
=== Download and Extraction ===
 +
The BSim source code can be downloaded [http://2008sw.igem.org/bccs_bristol/src/BSim_Source.zip '''here''']. Once the zip file is downloaded the contents should be extracted.
-
3. Parameter files
+
=== BSimApp ===
-
 
+
-
4. BSimApp
+
BSimApp is a graphical interface that enables a user to view simulations. It can be used to help users familiarise themselves with the process of defining simulations, watch small-scale simulations or verify the initial conditions of large-scale simulations.
BSimApp is a graphical interface that enables a user to view simulations. It can be used to help users familiarise themselves with the process of defining simulations, watch small-scale simulations or verify the initial conditions of large-scale simulations.
-
Typing the command
+
Typing
-
Java BSimApp
+
cd fileLocation        (where fileLocation is the location the source code was extracted to, eg. c:\IGEM_2008)
-
Will run BSimApp and open up the graphical interface:
+
java bsim.BSimApp
 +
into the command prompt (Start -> Accessories -> Command Prompt) will run BSimApp and open up the graphical interface:
-
[PICTURE]
+
[[Image:BSimApp-screenshot.PNG|center|thumb|600px]]
-
4.1 Menu bar
+
==== Menu ====
-
4.1.1 Load Parameters…
+
*''Play / Pause'' - Plays or pauses the simulation
-
The large black area is where the initial conditions of a simulation will appear once a parameter file has been loaded. Several example parameter files have (will be!!) been packaged with BSim and can be loaded by pressing the ‘Load Parameters…’ button then selecting one of the files from the ‘Parameter Files’ folder. The simulations defined by these files are summarised below:
+
*''Reset'' - Stops the current simulation and reverts to the initial conditions defined in the parameter file
 +
*''Video Length'' - Length of video to be recorded (frames)
 +
*''Frame Skip'' - Number of time steps to be skipped per frame
 +
*''Record Video'' - Records a video with properties defined in ''Video Length'' and ''Frame Skip''
 +
*''Screenshot'' - captures the current state of the simulation in a .png picture file
 +
*''Load Simulation'' - The large black area is where the initial conditions of a simulation will appear once a parameter file has been loaded. Several example parameter files are supplied below and can be loaded by pressing the ‘Load Parameters’ button. The simulations defined by these files are summarised below:
 +
** [https://static.igem.org/mediawiki/2008/b/b2/BSimExp-Density_300.txt '''Basic Chemotaxis'''] - A simulation of basic chemotaxis from left to right with the 300 bacteria and 3 particles. the top and bottom boundaries of the simulation space are wrapping and the path of the particles are followed by tracers.
 +
** [https://static.igem.org/mediawiki/2008/8/84/BSimExp-Adhesion_6.txt '''Adhesion'''] - 6 chemotactic bacteria are adhered to the particle. There are no boundaries to the simulation space and the bacteria can be viewed by zooming in on the particle. The particle's position is also followed by a tracer.
 +
** [https://static.igem.org/mediawiki/2008/1/14/BSimExp-Recruit_Density_100_10_min.txt '''Recruitment'''] - Shows 100 recruitment bacteria and one particle. The bacteria change colour depending on their state:
 +
*** '''Green''' - ''Random movement'', the bacteria move randomly with no bias.
 +
*** '''Blue''' - ''Contact'', the bacteria release recuitment and local co-ordination signals
 +
*** '''Yellow''' - ''Co-ordinated'', the bacteria have sensed the local co-ordination signal and are moving towards the goal
 +
*** '''Red''' - ''Recruited'', the bacteria have sensed the recruitment signal and are attempting to find its source
 +
The process of using parameter files to define your own simulation is explained [https://2008.igem.org/Team:BCCS-Bristol/Modeling-BSim_Parameter_File here].
-
Eg1
+
=== BSimBatch ===
-
Eg2
+
Due to the high levels of randomness in the run and tumble motion of bacteria it is likely that the user will want to run the same simulation many times and use statistical analysis to investigate emergent behaviour. BSimBatch enables the user to run batches of simulations, saving time series of the mean bacteria position and particle positions for each simulation.
-
Eg3
+
-
The process of defining a parameter file is explained in this section of the wiki.
+
BSimBatch is run using the command:
-
+
-
4.1.2 Play / Pause
+
-
4.1.3 Reset
+
-
4.1.4 Video Length
+
-
4.1.5 Frame Skip
+
-
4.1.6 Record Video
+
-
4.2 Explanation of videos produced from running three examples, tracers, wrapping boundaries, etc.
+
cd c:\IGEM_2008
 +
java bsim.BSimBatch ParameterFileLocation
-
5. BSimBatch
+
Where ParameterFileLocation is the location of the parameter file defining simulation to be run, eg:
-
Due to the high levels of randomness in the run and tumble motion of bacteria it is likely that the user will want to run the same simulation many times and use statistical analysis to investigate emergent behaviour. BSimBatch enables the user to run batches of simulations, saving time series of the mean bacteria position and particle positions for each simulation.
+
-
 
+
-
BSimBatch is run using the command:
+
-
Java BSimBatch ParameterFileLocation
+
java bsim.BSimBatch ./Parameter_Files/Parameter_File_1.txt
-
Where ParameterFileLocation is the full address of the parameter file defining simulation to be run, eg:
+
Time series relating to the positions of the particles and mean position of bacteria will be outputted to the location defined in the parameter file.
-
Java BSimBatch C:/BSim/Parameter_Files/Parameter_File_1.txt
+
=== Problem Solving ===
 +
BSim is written in the [http://en.wikipedia.org/wiki/Java_programming_language Java programming language] so any computer using BSim must have a [http://en.wikipedia.org/wiki/Java_Runtime_Environment Java environment] before any simulations can be run; [http://www.jibble.org/settingupjava.php This page] has a nice guide on setting up a Java environment.
 +
<br>
 +
</div>

Latest revision as of 16:04, 29 October 2008

Contents

BSim User Guide

Download and Extraction

The BSim source code can be downloaded [http://2008sw.igem.org/bccs_bristol/src/BSim_Source.zip here]. Once the zip file is downloaded the contents should be extracted.

BSimApp

BSimApp is a graphical interface that enables a user to view simulations. It can be used to help users familiarise themselves with the process of defining simulations, watch small-scale simulations or verify the initial conditions of large-scale simulations.

Typing

cd fileLocation        (where fileLocation is the location the source code was extracted to, eg. c:\IGEM_2008)
java bsim.BSimApp

into the command prompt (Start -> Accessories -> Command Prompt) will run BSimApp and open up the graphical interface:

BSimApp-screenshot.PNG

Menu

  • Play / Pause - Plays or pauses the simulation
  • Reset - Stops the current simulation and reverts to the initial conditions defined in the parameter file
  • Video Length - Length of video to be recorded (frames)
  • Frame Skip - Number of time steps to be skipped per frame
  • Record Video - Records a video with properties defined in Video Length and Frame Skip
  • Screenshot - captures the current state of the simulation in a .png picture file
  • Load Simulation - The large black area is where the initial conditions of a simulation will appear once a parameter file has been loaded. Several example parameter files are supplied below and can be loaded by pressing the ‘Load Parameters’ button. The simulations defined by these files are summarised below:
    • Basic Chemotaxis - A simulation of basic chemotaxis from left to right with the 300 bacteria and 3 particles. the top and bottom boundaries of the simulation space are wrapping and the path of the particles are followed by tracers.
    • Adhesion - 6 chemotactic bacteria are adhered to the particle. There are no boundaries to the simulation space and the bacteria can be viewed by zooming in on the particle. The particle's position is also followed by a tracer.
    • Recruitment - Shows 100 recruitment bacteria and one particle. The bacteria change colour depending on their state:
      • Green - Random movement, the bacteria move randomly with no bias.
      • Blue - Contact, the bacteria release recuitment and local co-ordination signals
      • Yellow - Co-ordinated, the bacteria have sensed the local co-ordination signal and are moving towards the goal
      • Red - Recruited, the bacteria have sensed the recruitment signal and are attempting to find its source

The process of using parameter files to define your own simulation is explained here.

BSimBatch

Due to the high levels of randomness in the run and tumble motion of bacteria it is likely that the user will want to run the same simulation many times and use statistical analysis to investigate emergent behaviour. BSimBatch enables the user to run batches of simulations, saving time series of the mean bacteria position and particle positions for each simulation.

BSimBatch is run using the command:

cd c:\IGEM_2008
java bsim.BSimBatch ParameterFileLocation

Where ParameterFileLocation is the location of the parameter file defining simulation to be run, eg:

java bsim.BSimBatch ./Parameter_Files/Parameter_File_1.txt

Time series relating to the positions of the particles and mean position of bacteria will be outputted to the location defined in the parameter file.

Problem Solving

BSim is written in the [http://en.wikipedia.org/wiki/Java_programming_language Java programming language] so any computer using BSim must have a [http://en.wikipedia.org/wiki/Java_Runtime_Environment Java environment] before any simulations can be run; [http://www.jibble.org/settingupjava.php This page] has a nice guide on setting up a Java environment.