We implemented the model in C++, making extensive use of the Boost libraries for numerical integration, among other things. In addition,
we wrote gateway routines to allow handling of the model from a MATLAB script. This way, parameters can easily be changed and results can be visualized
using the plotting functionality of MATLAB.
Initially, the arena in which chemotaxis should take place is defined as a polygon. An equally spaced 2-dimensional grid covering the polygon is created to store concentrations of prey bacteria and attractant molecules (fig. x). The area in which prey bacteria grow (a 'colony') is defined as a rectangle and their initial concentration is set.
[scheme of grid]
A desired number of virtual hunter bacteria are created at set spacial coordinates. Initially, these bacteria have a random orientation and their chemotactic pathway is inactive (methylation and phosphorylation levels are zero).
The model is then updated by defined time steps until a desired end time is reached.
At each time step, the number of prey bacteria in the colony is updated according to their logistic growth curve. The concentration of attractant molecules changes
according to the diffusion equation (see above). The Laplacian is discretized on the grid using a standard 5-point stencil (pseudocode??).
In each time step, the bacteria will update their chemotactic pathway (according to the system of differential equations) in response to the attractant concentration at their location (the mean of the nonnegative concentrations at the neighboring 4 grid nodes). Each bacterium will then swim forward (run) or change its orientation (tumble) dependent on the phosphorylation level of CheY.