Team:BCCS-Bristol/Modelling/BSIM/GUI

From 2010.igem.org

(Difference between revisions)
(Creating Simulations in BSim 2009)
Line 47: Line 47:
#Creating a blank simulation, is uniform across whatever type of simulation a user wishes to run. Once a blank simulation is created, it behaves like a workspace into which additional objects and behaviours can be added.
#Creating a blank simulation, is uniform across whatever type of simulation a user wishes to run. Once a blank simulation is created, it behaves like a workspace into which additional objects and behaviours can be added.
#Setting simulation options allows the user to specify the size and boundary conditions for the simulation.
#Setting simulation options allows the user to specify the size and boundary conditions for the simulation.
-
#Step 4 requires the user to specify in detail the behaviour of any species of bacteria required in the simulation. This would also be the stage at which users would specify other objects, such as chemical fields or LCOs.
+
#Defining bacterial classes involves specifying in detail the behaviour of any species of bacteria required in the simulation. This would also be the stage at which users would specify other objects, such as chemical fields or mesh shapes.
-
#Step 5 requires little further information after step 4, as the types of bacteria have already been defined. All that is required is that the user specifies how many bacteria are in each population, and where their initial positions are.
+
#Once the types of bacteria have been defined, users must specify how many of each type of bacteria they want added to the simulation, and where their initial positions are. BSim can allocate random initial positions if needed.
-
#The ‘ticker’ described in step 6 is a device that performs all the actions required during each time step. In general, the functions that are performed in each time step are defined before this point, and simply called within the ticker. The ticker also serves as the simulation clock, keeping track of how much time has passed.
+
#The ‘ticker’ is a device that performs all the actions required during each time step. In general, the functions that are performed in each time step are defined before this point, and simply called within the ticker. The ticker also serves as the simulation clock, keeping track of how much time has passed.
 +
#The drawer is where the display properties of objects are described. Once the existence of an object is stated (in step 3), the drawer only needs to be told what colour to display that object in.
 +
#The final step requires the user to state how the simulation data should be expressed. This can be in the form of an immediate preview, a recorded movie or image, or as raw data in CSV (Comma Separated Variables) format.
[[Image:GUI_Process_Diagram.JPG|thumbnail|center|upright=4|Process diagram of the steps a user must go through to produce a simulation using the new GUI]]
[[Image:GUI_Process_Diagram.JPG|thumbnail|center|upright=4|Process diagram of the steps a user must go through to produce a simulation using the new GUI]]

Revision as of 08:45, 11 October 2010

Contents

Graphical User Interface (GUI)

This page deals with the features and justification of the new BSim GUI. To download and install your free copy of BSim 2010 and the new BSim GUI, Please see the 'downloads' section. For instructions on how to operate the new GUI, see the 'tutorials' section.

Features

The new GUI supports many of the features of BSim 2009. These include:

  • Brownian Motion
  • Collisions
  • Chemical fields
    • Detection
    • Chemical emission and consumption
  • Colour signalling
  • Ordinary Differential Equations (ODEs)
  • Variable boundary conditions
  • Directed movement (Chemotaxis)

Development

Motivation

The 2009 edition of BSim was written using an object-oriented programming language called JAVA. This was an excellent tool in which to construct BSim, as it made it very easy to produce agent-based models. However, modelling a specific system in BSim required the user to edit JAVA code. We envision a future in which BSim is a widely used and accessible modelling framework. To achieve this we needed to create an interface that allows users unfamiliar with JAVA to create simulations in BSim. This would allow BSim to be utilised by the entire synthetic biology community, rather than just specialist modellers.

Venn Diagram comparing the skills required to operate BSim 2009 and the new GUI

Graphical User Interface (GUI) -What's new?

Past iGEM projects at BCCS-Bristol required knowledge of JAVA, mathematics and biochemistry. The 2009 edition of BSim relied heavily on the user’s knowledge of all three. By removing the need for JAVA knowledge, we have opened up BSim to a much wider category of users. The GUI only requires users to be able to express their biological system mathematically; it can then translate the user’s description of a system into JAVA code.

Who is the GUI aimed at?

The GUI is primarily aimed at users without any knowledge of JAVA. However, it is also of use to more advanced programmers, as it writes JAVA files that can be further modified using a text editor. This means advanced users can use the GUI to set a simple simulation which can be further tailored to their needs using JAVA. This saves a lot of time, as setting up a new simulation in BSim 2009 could take dozens of lines of code.

Simplifying BSim 2009

The main aims in creating the GUI were to reduce the time and background knowledge required to produce a BSim Simulation.

Creating Simulations in BSim 2009

The figure below shows the process of writing a simulation in the 2009 edition of BSim. All the steps of this process require knowledge of JAVA, and therefore are not accessible to the synthetic biological community in general. Additionally, there are too many steps in the process; slimming down the number of steps will make BSim easier to use.

Process diagram of the steps a user must go through to produce a simulation in BSim 2009

The steps in the above process are described in more detail below:

  1. The first step in the process is the ‘imports’ step. This portion of a JAVA file lists all the other files that should be searched when a function is called. This allows a programmer to call functions defined elsewhere, rather than having to define them explicitly within the main JAVA file.
  2. Creating a blank simulation, is uniform across whatever type of simulation a user wishes to run. Once a blank simulation is created, it behaves like a workspace into which additional objects and behaviours can be added.
  3. Setting simulation options allows the user to specify the size and boundary conditions for the simulation.
  4. Defining bacterial classes involves specifying in detail the behaviour of any species of bacteria required in the simulation. This would also be the stage at which users would specify other objects, such as chemical fields or mesh shapes.
  5. Once the types of bacteria have been defined, users must specify how many of each type of bacteria they want added to the simulation, and where their initial positions are. BSim can allocate random initial positions if needed.
  6. The ‘ticker’ is a device that performs all the actions required during each time step. In general, the functions that are performed in each time step are defined before this point, and simply called within the ticker. The ticker also serves as the simulation clock, keeping track of how much time has passed.
  7. The drawer is where the display properties of objects are described. Once the existence of an object is stated (in step 3), the drawer only needs to be told what colour to display that object in.
  8. The final step requires the user to state how the simulation data should be expressed. This can be in the form of an immediate preview, a recorded movie or image, or as raw data in CSV (Comma Separated Variables) format.


Process diagram of the steps a user must go through to produce a simulation using the new GUI