In this tutorial we show how Chaste can be used to create, run and visualize Potts-based simulations.
Full details of the mathematical model can be found in Graner, F. and Glazier, J. A. (1992).
In the first test, we run a simple Potts-based simulation, in which we create a monolayer of cells, using a Potts mesh.
Each cell is assigned a stochastic cell-cycle model.
First, we generate a Potts mesh. To create a PottsMesh, we can use the PottsMeshGenerator.
This generates a regular square-shaped mesh, in which all elements are the same size.
Here the first three arguments specify the domain width; the number of elements across; and the width of elements.
The second set of three arguments specify the domain height; the number of elements up; and the height of individual elements.
We have chosen a 2 by 2 block of elements, each consisting of 4 by 4 ( = 16) lattice sites.
Having created a mesh, we now create a vector of CellPtrs. To do this, we the CellsGenerator helper class,
which is templated over the type of cell model required and the dimension.
We create an empty vector of cells and pass this into the method along with the mesh.
The second argument represents the size of that the vector cells should become - one cell for each element.
Third argument makes all cells proliferate.
Now we have a mesh and a set of cells to go with it, we can create a CellPopulation.
In general, this class associates a collection of cells with a mesh. For this test, because we have a PottsMesh,
we use a particular type of cell population called a PottsBasedCellPopulation.
We can set the “Temperature” to be used in the Potts Simulation using the optional command below. The default value is 0.1.
By default the Potts simulation will make 1 sweep over the whole domain per timestep.
To use a different number of sweeps per timestep use the command.
We can set up a VtkScene to do a quick visualization of the population before running the analysis.
We then pass in the cell population into an OffLatticeSimulation, and set the output directory and end time
The default timestep is 0.1, but can be changed using the below command. The timestep is used in conjunction with the “Temperature”
and number of sweeps per timestep to specify the relationship between cell movement and proliferation.
We also set the simulation to only output every 10 steps i.e. once per hour.
We must now create one or more update rules, which determine the Hamiltonian in the Potts simulation.
For this test, we use two update rules based upon a volume constraint (VolumeConstraintPottsUpdateRule)
and adhesion between cells (AdhesionPottsUpdateRule) and pass them to the OnLatticeSimulation.
For a list of possible update rules see subclasses of AbstractPottsUpdateRule.
Set an appropriate target volume in number of lattice sites. Here we use the default value of 16 lattice sites.
You can also vary the deformation energy parameter.
The larger the parameter the more cells will try to maintain target volume. Here we use the default value of 0.2.
Finally we add the update rule to the simulator.
We repeat the process for any other update rules.
Save snapshot images of the population during the simulation
To run the simulation, we call Solve(). We can again do a quick rendering of the population at the end of the simulation
The next two lines are for test purposes only and are not part of this tutorial.
If different simulation input parameters are being explored the lines should be removed.
The next test generates a collection of cells, there are two types of cells, labelled ones and non labelled ones,
there is differential adhesion between the cell types. For the parameters specified, the cells sort into separate types.
First, we generate a Potts mesh. To create a PottsMesh, we can use the PottsMeshGenerator.
This generates a regular square-shaped mesh, in which all elements are the same size.
We have chosen an 8 by 8 block of elements each consisting of 4 by 4 ( = 16) lattice sites.
Having created a mesh, we now create a VectorSharedPtrCells. To do this, we the CellsGenerator helper class,
as before but this time the third argument is set to make all cells non-proliferative.
Before we make a CellPopulation we make a cell label and then assign this label to some randomly chosen cells.
Now we have a mesh and a set of cells to go with it, we can create a CellPopulation.
In order to visualize labelled cells we need to use the following command.
We then pass in the cell population into an OffLatticeSimulation, and set the output directory and end time
We must now create one or more update rules, which determine the Hamiltonian in the Potts simulation.
For this test, we use two update rules based upon a volume constraint (VolumeConstraintPottsUpdateRule) and
differential adhesion between cells (DifferentialAdhesionPottsUpdateRule), set appropriate parameters, and
pass them to the OnLatticeSimulation.
We repeat the process for any other update rules.
To run the simulation, we call Solve().
The next two lines are for test purposes only and are not part of this tutorial.
If different simulation input parameters are being explored the lines should be removed.
The next test extends the previous example to three dimensions.
First, we generate a Potts mesh. To create a PottsMesh, we can use the PottsMeshGenerator.
This generates a regular square-shaped mesh, in which all elements are the same size.
Here the first three arguments specify the domain width; the number of elements across; and the width of elements.
The second set of three arguments specify the domain height; the number of elements up; and the height of individual elements.
The third set of three arguments specify the domain depth; the number of elements deep; and the depth of individual elements.
We have chosen an 4 by 4 by 4 ( = 64) block of elements each consisting of 2 by 2 by 2 ( = 8) lattice sites.
Having created a mesh, we now create a VectorSharedPtrCells. To do this, we the CellsGenerator helper class,
as before but this time the third argument is set to make all cells non-proliferative.
As for the 2D case before we make a CellPopulation we make a pointer to a cell label and then assign this label to some randomly chosen cells.
Now we have a mesh and a set of cells to go with it, we can create a CellPopulation.
In order to visualize labelled cells we need to use the following command.
We then pass in the cell population into an OffLatticeSimulation, and set the output directory and end time
We must now create one or more update rules, which determine the Hamiltonian in the Potts simulation.
Now set the target volume to be appropriate for this 3D simulation.
We use the same differential adhesion parameters as in the 2D case.
To run the simulation, we call Solve().
The next two lines are for test purposes only and are not part of this tutorial.
If different simulation input parameters are being explored the lines should be removed.