Python API Tutorial

Overview

This tutorial shows how to use MCell4 Python API with BioNetGen language to construct a model of a cell with two organelles that uses volume-volume and volume-surface reactions. You will gradually build, simulate, and visualize the model and after completing all the steps, this will be the result:

../_images/tutorial_result.png

Using the Tutorial

The tutorial is provided as a series of Python files where each file is a runnable model.

These tutorial files serve as guidelines and the recommended usage of the tutorial is to write your own model file by following steps in these individual files and copying code snippets from there int your file.

Each explanation is a multiline comment starting with the section index followed by the index of the comment as shown below:

"""
0010-1)
The main difference ...

To highlight changes in the subsequent sections, the explanations from a previous section are removed and replaced with a reference to the comment index so that it can be found in the preceding files if needed.

#0010-1)
"""
0020-1)
In the previous section ...

In the BioNetGen language, no multiline comments are allowed, so previous comment indices are prefixed with ## and the new ones with just one #.

## 0030-3)
# 0040-3)
# Specify ...