Lotka-Volterra in a Torus

_images/lv_in_torus_2.png

Lotka Volterra System Description

This tutorial uses the Lotka-Volterra oscillating system to demonstrate a simple but dynamic CellBlender model. This model can also be used to show the difference between a diffusion-limited reaction and a "physiologic" reaction.

The Lotka-Volterra system is also known as a "predator-prey" system and that's the terminology that we'll be using in this tutorial.

The "prey" represents a species whose population grows exponentially when not constrained. In our CellBlender model we can represent this "reproductive" behavior with the simple reaction:

prey -> prey + prey

The "predator" represents a species whose population grows by consuming prey. In our CellBlender model, we can represent this "predatory" behavior with the simple reaction:

predator + prey -> predator + predator

Finally, with those equations alone there would be no end to the predators, so we can represent a predator "death" behavior with this reaction:

predator -> NULL

The rest of this tutorial will guide you through the process of:

  • Constructing an "arena" for the system
  • Defining the molecules to represent the predators and prey
  • Defining the reactions between the predators and the prey
  • Visualizing the result
  • Plotting the populations over time
  • Experimenting with System Parameters to observe different behaviors

Specifications of the Model

For those familiar with building CellBlender models, here's the short-hand version:

Geometry:
Torus Feature Setting
Name arena
Major Segments 20
Minor Segments 10
Major Radius 0.1
Minor Radius 0.03
Transparency Yes
Alpha 0.3
Molecules:
Species Name Diffusion Constant Initial Release in Arena Glyph Color Size
prey 6e-6 1000 in prey_rel Cube Green 0.2
predator 6e-6 1000 in predator_rel Octahedron Red 0.3
Reactions:
Reactants Products Forward Rate
prey prey + prey 129e3
predator + prey predator + predator 1e8
predator NULL 130e3
Plots:
Count Type Molecule Location
Molecule prey World
Molecule predator World

Step by step instructions for building the model

Note

This tutorial was generated with Blender 2.74 and CellBlender 1.0.

Fonts and colors used below:

Descriptive Text
Menu Items (click these with mouse)
Buttons (click these with mouse)
K eyboard keys and typing (type these characters)

Reset Blender and initialize CellBlender.

  1. File / Load Factory Settings Load Factory Settings

  2. Select All Objects (camera, light, cube) with a a (until everything is highlighted)

  3. Delete All Selected Objects (camera, light, cube) with: x Delete

  4. File / Save Startup File Save Startup File

  5. File / User Preferences... Save User Settings x to close window

  6. File / User Preferences... Add-ons Cell Modeling

  7. Cell Modeling: CellBlender (Check the box to enable CellBlender)

  8. Save User Settings x to close window

  9. Click CellBlender Tab (on left side of window)

  10. Initialize CellBlender (should show CellBlender Panel and Buttons)

  11. Enlarge the CellBlender panel (make it wider and taller so all buttons show)

  12. CellBlender Panel: Preferences (Open the CellBlender “Preferences” Panel)

  13. Set Path to MCell Binary (find MCell binary - depends on where MCell was installed)

    Example: /home/user/mcell/bin/mcell

  14. Click Set MCell Binary to select it (this closes the file navigation window)

  15. File / Save Startup File Save Startup File

  16. File / User Preferences... Save User Settings x to close window

  17. File / Save As... /home/user/mcell/models/lv.blend Save As Blender File

This section constructs a semi-transparent torus named "arena" to contain our model.

  1. Drag the divider below the CellBlender panel to about 1/2 the window height to make room for other tools below it.
  2. Drag the divider on the right side of the 3D view to the left a bit to make room for all of the Property Buttons.
  3. In 3D View menu: Object / Snap / Cursor to Center (ensures that objects are placed at the origin)
  4. In 3D View menu: Add / Mesh / Torus (look for "Add Torus" settings in lower half of left panel).
  5. Use the mouse wheel to zoom in to get a better view of the new Torus object.
  6. In the lower left panel, leave the Location and Rotation settings at all zeros.
  7. Change the "Major Segments" of the Torus to 20 followed by Enter.
  8. Change the "Minor Segments" of the Torus to 10 followed by Enter.
  9. Change the "Major Radius" of the Torus to 0.1 followed by Enter.
  10. Change the "Minor Radius" of the Torus to 0.03 followed by Enter.
  11. Use the mouse wheel to zoom in again until the Torus object fills the 3D View.
  12. Double-Click the word Torus in the Outliner to select it for editing (upper right panel).
  13. Type the new name for the torus to be arena followed by Enter.
  14. Open the Object Properties panel by clicking the small orange cube (upper right).
  15. Check the "Transparency" box to enable the transparency feature for the arena object
  16. Open the Material Properties panel by clicking the small round icon button (to right of triangle mesh).
  17. Click the New button to create a new material for the arena.
  18. Check the "Transparency" box to enable transparency for this material
  19. Click the Alpha button and type 0.3 followed by Enter to make the "arena" semi-transparent.
  20. Drag the divider below the CellBlender panel down toward the bottom to make more room for the CellBlender panels we'll use to define the rest of the model.
  21. File / Save

Blender objects must be "Model Objects" to be seen by MCell. Add the "arena" to MCell's Model Objects.

  1. CellBlender Panel: Model Objects
  2. Be sure the newly created "arena" is selected (should show "arena" near coordinate axis in lower left). Right-click the arena itself or left-click its name in the Outliner as needed.
  3. Click the + button next to "Model Objects".
  4. The "arena" should be in the Model Objects box with a green check mark.
  5. File / Save

This section defines the molecule types (or "species") we'll need for our model.

Species Type of Molecule and Diffusion Constant
prey Volume Molecule with diffusion constant of 6e-6
predator Volume Molecule with diffusion constant of 6e-6
  1. CellBlender Panel: Molecules
  2. Define a new Molecule Species with: +
  3. Change the “Molecule Name” to prey followed by Enter
  4. Change the “Molecule Type” to Volume Molecule if needed (should be the default)
  5. Change the “Diffusion Constant” to 6e-6 followed by Enter
  6. Add a second Molecule Species with: +
  7. Change the “Molecule Name” to predator followed by Enter
  8. Change the “Molecule Type” to Volume Molecule if needed (should be the default)
  9. Change the “Diffusion Constant” to 6e-6 followed by Enter
  10. File / Save

This section creates sites to release actual molecules into the model.

Release Site Number of each Molecule Species to release in Location
prey_rel Releases 1000 "prey" molecules in the "arena" object
predator_rel Releases 1000 "predator" molecules in the "arena" object
  1. CellBlender Panel: Molecule Placement
  2. Define a new Molecule Placement Site with: +
  3. Change the “Site Name” to prey_rel followed by Enter
  4. Select the “prey” molecule with prey
  5. Set the “Release Shape” to Object/Region
  6. In the Object/Region box, type: arena followed by Enter
  7. Set the “Quantity to Release” to 1000 followed by Enter
  8. Define a second Molecule Placement Site with: +
  9. Change the “Site Name” to predator_rel followed by Enter
  10. Select the “predator” molecule with predator
  11. Set the “Release Shape” to Object/Region
  12. In the Object/Region box, type: arena followed by Enter
  13. Set the “Quantity to Release” to 1000 followed by Enter
  14. File / Save

This model may run slow, so we'll only run it for 100 iterations while building our model.

  1. CellBlender Panel: Run Simulation
  2. Set the "Iterations" to 100
  3. Start the simulation: Run
  4. Wait for the simulation to complete running.
  5. CellBlender Panel: Reload Visualization Data
  6. Click in the Timeline and drag right and left to see molecule motion.
  7. Click and hold mouse wheel while dragging in 3D window to change viewing angle.
  8. File / Save

The default molecules are too large for this model. Let's change their size, color, and glyph.

  1. CellBlender Panel: Molecules
  2. Select the "prey" molecules: prey
  3. Open the Display Options panel (within the "Molecules" panel)
  4. Change the Molecule glyph from Cone to Cube
  5. Change the Molecule color (gray box below glyph) to a bright green.
  6. Change the scale to 0.2 followed by Enter.
  7. Select the "predator" molecules: predator
  8. Change the Molecule glyph from Cone to Octahedron
  9. Change the Molecule color (gray box below glyph) to a bright red.
  10. Change the scale to 0.3 followed by Enter.
  11. Again experiment with zooming, changing viewing angle, and moving in time.
  12. File / Save

Define the Reactions for the Lotka-Volterra Predator/Prey model:

Reactants -> Products Description and Forward Reaction Rate
prey -> prey + prey Simulates breeding of prey at rate = 129,000 or 129e3
prey + predator -> predator + predator Simulates predation at rate = 100,000,000 or 1e8
predator -> NULL Simulates natural predator death at rate = 130,000 or 130e3
  1. CellBlender Panel: Reactions
  2. Create the Prey Breeding Reaction with: +
  3. In the Reactants box type: prey followed by Enter
  4. In the Products box type: prey + prey followed by Enter
  5. Set the "Forward Rate" to 129e3 followed by Enter
  6. Create the Predation Reaction with: +
  7. In the Reactants box type: prey + predator followed by Enter
  8. In the Products box type: predator + predator followed by Enter
  9. Set the "Forward Rate" to 1e8 followed by Enter
  10. Create the Predator Death Reaction with: +
  11. In the Reactants box type: predator followed by Enter
  12. In the Products box type: NULL followed by Enter
  13. Set the "Forward Rate" to 130e3 followed by Enter
  14. File / Save

Test the system with another short run:

  1. CellBlender Panel: Run Simulation
  2. Start the simulation: Run
  3. Wait for the simulation to complete running.
  4. CellBlender Panel: Reload Visualization Data
  5. Click in the Timeline and drag right and left to see molecule motion and reactions.
  6. File / Save

Set up the items to be plotted in the final run:

  1. CellBlender Panel: Plot Output Settings
  2. Define two Molecules to track by pressing “+” 2 times: + +
  3. Click on the first “Name error:” and change the Molecule to prey
  4. Click on the second “Name error:” and change the Molecule to predator
  5. File / Save

Make the final run:

  1. CellBlender Panel: Run Simulation
  2. Set the "Iterations" to 1200 followed by Enter
  3. Start the simulation: Run
  4. Wait for the simulation to complete running. This may take some time.
  5. CellBlender Panel: Reload Visualization Data (Timeline should show 0 to 1200).
  6. Use the "VCR" controls to "rewind" and "play" the simulation. Watch for oscillations of predator and prey populations. Stop when done.
  7. File / Save

Plot the Predator/Prey populations over time:

  1. CellBlender Panel: Plot Output Settings
  2. Set the Page/Plot selector to: One Page, One Plot
  3. Check the "Molecule Colors" box to use the molecule colors for the plot.
  4. Click one of the plotter buttons available on your machine.
  5. Expand the plot window to determine which population "leads" the other.
  6. File / Save

Diffusion-Limited / Physiologic Reactions

Try experimenting with the system by changing these values:

System Parameters:
Parameter Name Current Value New Value
Prey Birth Rate (Reactions) 129,000 8.6e6
Predation Rate (Reactions) 1e8 1e12
Predator Death Rate (Reactions) 130,000 5e6
Interaction Radius (Run/Adv) (blank) 0.003
Time Step (Run) 1e-6 1e-8

Predator / Prey Populations over time with different System Parameters

_images/lv_in_torus_graph_1.png _images/lv_in_torus_graph_2.png