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
MichaelisMenten.html - Classic Michaelis-Menten enzyme kinetics
where \(E\) is enzyme, \(S\) is substrate, \(ES\) is the enzyme-substrate complex, and \(P\) is the product.
Population Dynamics#
Predator-Prey Systems
LotkaVolterra.html - Classic Lotka-Volterra predator-prey dynamics
The Lotka-Volterra system models population oscillations:
where \(X\) represents prey and \(Y\) represents predators.
Gene Regulation and Cellular Processes#
Gene Expression Models
rnaprotein.html - RNA transcription and protein translation dynamics
lac2state.html - Two-state lac operon gene regulation model
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
extendcme.html - Extending CME simulations with custom solvers
extendrdme.html - Extending RDME simulations for spatial systems
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