Skip to content

roman-komac/distributed-bio-computing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed biological computing: from oscillators, logic gates and switches to a multicellular processor

About

This repository provides Python scripts for simulating distributed biological computing structures. The basis of this simulation framework is a reaction-diffusion system. The code featured in this repository is part of the article Distributed biological computing: from oscillators, logic gates and switches to a multicellular processor.

Requirements

Python3 with the following external libraries installed:

  • numpy
  • matplotlib
  • pyqtgraph
  • pylab

Examples

Create a simulation object and run the simulation
from simulation import Simulation
from population import Repressilator
from field import Field

# Create a simulation object
# default parameters in the constructor are:
# size_x=10, size_y=10, 
# step=0.1, start_time=0, end_time=1000, multicore=False
simulation = Simulation()

# Create a field named clk
clk = Field("clk")

# Create a repressilator population named rep
rep = Repressilator("rep")
rep.add_input_field("CLK", clk)
rep.add_output_field("A", clk)

# Add a population to the simulation
simulation.add_population("rep", rep)

# Add a field to the population
simulation.add_field("clk", clk)

# Execute simulation step-by-step
# Call to simulation.step() returns false when finished
while not simulation.step():
    continue
Create a field
from field import Field

# Create a field named clk
field = Field("clk")

# Set diffusion rate
field.field_diff_rate = 0.1

# Set rate of diffusion through bacterial membranes
field.membrane_diff_rate = 0.9

# Set internal degradation rate
field.kSi = 0.55

# Set external degradation rate
field.kSe = 0.02

# Set if border is fixed
field.border_fixed = True

# Neuman boundary conditions
field.periodic_bounds = True
Create a bacterial population
from population import Repressilator

# Create a repressilator population named rep
rep = Repressilator("rep")

# Set parameters specific to the ODE of this population
rep.alpha *= 2
rep.kS = 0.25
...

About

Python scripts for simulating biological structures with partial differential equations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages