Welcome to the biolgca Documentation!

biolgca is a Python package for simulating lattice-gas cellular automata (LGCA) in biological contexts.

LGCA

LGCA are cellular automata with an extended channel state space. Particles or cells occupy velocity channels, so the lattice state records both the number of cells at each node and their movement directions. The package supports classical, identity-based, volume-exclusion-free and multi-species LGCA models.

For a broader modelling introduction, see the BIO-LGCA Wikipedia article and the BIO-LGCA method paper: Deutsch et al. 2021.

Supported models

The lgca.get_lgca() factory selects a simulator class from these axes:

  • classical LGCA with volume exclusion

  • identity-based LGCA with volume exclusion

  • classical LGCA without volume exclusion

  • identity-based LGCA without volume exclusion

  • classical multi-species LGCA with or without volume exclusion

Supported geometries are 1D linear, 2D square, 2D hexagonal, 3D cubic and 3D Moore lattices. Multi-species identity-based LGCA are not implemented yet.

Current analysis helpers include density, flux, flow, state-space, scalar-field, vector-field, property and family-population plots. Plotting features require the optional plotting dependencies.

Quick example

from lgca import get_lgca

lgca = get_lgca(geometry="hex", interaction="alignment", bc="refl", seed=1)
lgca.timeevo(timesteps=132, record=True)
lgca.plot_flux()
_images/alignment_small.png

Alignment interaction on a hexagonal lattice.

More examples

_images/excitable_medium_small.png

Excitable medium

_images/go_and_grow_density_small.png

Go-or-grow density

_images/go_and_grow_rb_small.png

Go-or-grow birth rate

Questions and contributions

Issues are tracked on the GitHub issue tracker. For contribution notes, see the repository AGENTS.md and GitHub wiki.

Contact:

License

BSD 3-clause license. See LICENSE.txt in the repository.

Copyright (C) 2018-2026 Technische Universität Dresden.