Cellsim [Kargacin, G., and F.S. Fay. 1991. "Ca2+ movement in smooth muscle cells studied with one- and two-dimensional diffusion model" Biophys. J. 60:1088-1100. and Zou, H.L., M. Lifshitz, R.A. Tuft, K.E. Fogarty, and J.J. Singer. 1999. "Imaging Ca2+ entering the cytoplasm through a single opening of a plasma membrane cation channel". J. Gen. Physiol. 114:575-588. ] is a program for 3-D reaction and diffusion simulation. Cellsim uses a Forward Time Centered Space fully explicit differencing scheme to solve the associated PDEs. Cellsim can run in parallel using MPI. Cellsim models multiple species of diffusible molecules and their reactions (e.g. ions and their binding targets). The simulation is saved as a series of images at specified time intervals. Images explicitly describing flow (since there can be large flow yet no net change in concentration) can also be saved. cellsim : cylindrical and 2D cartesian reaction diffusion with MPI
Cellsim is software which simulates reaction and diffusion in either a 3D "cell" with cylindrical symmetry or without it. It is approximately 5,000 lines of C code. Cellsim uses a Forward Time Centered Space fully explicit differencing scheme to solve the associated PDEs. To maintain stability in the solution of these equations the simulated time step, dt, is chosen such that 2D*dt/(dx^2) < = 1. Thus a larger D (diffusion coefficient) or higher spatial accuracy (ie, smaller grid spacing, dx) requires shorter time steps. To help alleviate this increase in computation cellsim can analyze a cell in a 2D (rather than 3D) cylindrical model - thus decreasing simulation time. In addition, cellsim can run in parallel using MPI. In this mode the cell volume is divided into overlapping sub-volumes; simulation in each sub-volume is handled by a different processor. The more the sub-volumes overlap, the larger the number of iterations that can be simulated prior to synchronization between the various sub-processes. The spatial subdivisions (a rectangular grid) can vary in size at different locations in the volume, thus regions of interest (e.g., near a channel) can be simulated at high spatial resolution while other regions (e.g., those far from any structure of interest) can be simulated at a lower resolution. While the time step is determined by the finest resolution required, time is saved by having fewer nodes involved in the simulation than if the entire cell was modeled at the higher spatial resolution. Cellsim does not model internal cellular structures. It only models ions and other species and their reactions with each other and their diffusion through the spatial volume (which in the cylindrical case can have a varying radius along the axis). Ions entering the cell through a single restricted space (e.g., a dendritic spine) can be modeled with a cylindrical cell whose which narrows to a tiny radius near one end, before then enlarging to a slightly larger space. The ions would enter the cell into this space. All parameters describing the cellsim simulation (e.g., number of ions and other species, their reaction and and off rates and diffusion coefficients, and the cell geometry and initial conditions) can be specified on a command line or in a file. Simple current sources (e.g., to mimic ions entering through a channel or being released from an internal store) are modeled as ions appearing de novo in various nodes. Ion pumps and leaks are handled in a similar manner. Simulation output is saved as images, each at a specified time interval. Images explicitly describing flow (since there can be large flow yet no net change in concenration) can also be saved.