Examples#

The following interactive Jupyter notebook examples demonstrate the capabilities of the jLM Python interface for Lattice Microbes. These examples cover both Chemical Master Equation (CME) and Reaction-Diffusion Master Equation (RDME) simulations, showcasing various biochemical systems and modeling approaches.

Basic Chemical Kinetics#

Bimolecular Reactions

The bimolecular reaction examples demonstrate fundamental chemical kinetics:

  • bimol.html - Basic bimolecular reaction \(A + B \to C\)

  • bimolConc.html - Bimolecular reactions with concentration effects

  • bimol-pp.html - Post-processing analysis of bimolecular systems

Enzymatic Reactions

\[\begin{split}E + S &\rightleftharpoons ES \\ ES &\to E + P\end{split}\]

where \(E\) is enzyme, \(S\) is substrate, \(ES\) is the enzyme-substrate complex, and \(P\) is the product.

Population Dynamics#

Predator-Prey Systems

The Lotka-Volterra system models population oscillations:

\[\begin{split}X &\to 2X \\ X + Y &\to 2Y \\ Y &\to \emptyset\end{split}\]

where \(X\) represents prey and \(Y\) represents predators.

Gene Regulation and Cellular Processes#

Gene Expression Models

Developmental Biology

  • minde.html - MinDE system for bacterial cell division dynamics

The MinDE system demonstrates protein oscillations crucial for proper cell division positioning in bacteria.

Advanced Simulation Techniques#

Model Extension and Customization

Getting Started#

Interactive Documentation

  • notebook.html - General jLM documentation and tutorial notebook

This comprehensive notebook provides an introduction to the jLM interface, covering basic concepts, simulation setup, and result analysis workflows.

Running the Examples#

To run these examples locally, ensure you have jLM installed with Jupyter support:

# Install jLM with notebook dependencies
pip install jLM[notebook]

# Start Jupyter notebook server
jupyter notebook

The HTML files provided here are static exports of interactive Jupyter notebooks. For the full interactive experience with live code execution, download the corresponding .ipynb files from the jLM examples repository.

Each example includes:

  • Model definition using jLM’s Python API

  • Simulation parameter setup including solver selection and runtime options

  • Result visualization with matplotlib and other plotting libraries

  • Analysis workflows demonstrating post-processing techniques

For spatial simulations (RDME), examples also demonstrate:

  • Geometric region construction using jLM’s RegionBuilder tools

  • Species placement and diffusion parameter specification

  • Spatial visualization of concentration profiles and particle trajectories