Commit 6f0ea6c5 authored by Diego Jahn's avatar Diego Jahn
Browse files

Update Multiscale models.

parent a1b5965b
<MorpheusModel version="3">
<Description>
<Title>Example-AutocrineChemotaxis</Title>
<Details></Details>
</Description>
<Global>
<Field symbol="U" value="0" name="chemoattractant">
<Diffusion rate="0.1"/>
</Field>
<System solver="euler" time-step="10.0">
<DiffEqn symbol-ref="U">
<Expression>p - d*U</Expression>
</DiffEqn>
<Constant symbol="d" value="0.01" name="degradation U"/>
</System>
<Constant symbol="cell_density" value="0.003"/>
</Global>
<Space>
<Lattice class="square">
<Size symbol="size" value="200 200 0"/>
<BoundaryConditions>
<Condition boundary="x" type="periodic"/>
<Condition boundary="y" type="periodic"/>
</BoundaryConditions>
<NodeLength value="1.0"/>
<Neighborhood>
<Distance>2.5</Distance>
</Neighborhood>
</Lattice>
<SpaceSymbol symbol="space"/>
</Space>
<Time>
<StartTime value="0"/>
<StopTime value="2.5e4"/>
<SaveInterval value="0"/>
<RandomSeed value="0"/>
<TimeSymbol symbol="time"/>
</Time>
<CellTypes>
<CellType class="biological" name="cells">
<!-- <Disabled>
<Property symbol="cell" value="1.0"/>
</Disabled>
-->
<Property symbol="c" value="100.0" name="chemotactic strength"/>
<Property symbol="p" value="0.01" name="production chemoattractant"/>
<Property symbol="neighbors" value="0" name="number of neighboring cells"/>
<VolumeConstraint target="60" strength="1"/>
<SurfaceConstraint target="0.85" mode="aspherity" strength="1"/>
<Chemotaxis field="U" contact-inhibition="false" strength="c" retraction="true"/>
<NeighborhoodReporter>
<Input scaling="cell" value="cell.type == celltype.cells.id"/>
<Output symbol-ref="neighbors" mapping="sum"/>
</NeighborhoodReporter>
</CellType>
<CellType class="medium" name="medium">
<Constant symbol="neighbors" value="0.0"/>
<Constant symbol="p" value="0.0" name="production"/>
</CellType>
</CellTypes>
<CPM>
<Interaction default="0.0">
<Contact type1="cells" type2="medium" value="-10"/>
<Contact type1="cells" type2="cells" value="-20"/>
</Interaction>
<MonteCarloSampler stepper="edgelist">
<MCSDuration value="1.0"/>
<Neighborhood>
<Order>2</Order>
</Neighborhood>
<MetropolisKinetics temperature="10.0"/>
</MonteCarloSampler>
<ShapeSurface scaling="norm">
<Neighborhood>
<Distance>2.5</Distance>
</Neighborhood>
</ShapeSurface>
</CPM>
<CellPopulations>
<Population size="0" type="cells">
<InitRectangle mode="regular" number-of-cells="cell_density * size.x * size.y">
<Dimensions size="size.x, size.y, 0" origin="0.0, 0.0, 0.0"/>
</InitRectangle>
</Population>
</CellPopulations>
<Analysis>
<Gnuplotter time-step="500" decorate="false">
<Terminal opacity="0.55" persist="true" name="png"/>
<Plot>
<Field symbol-ref="U" isolines="5" min="0.0" surface="true"/>
<Cells>
<ColorMap>
<Color value="2.0" color="gray"/>
<Color value="0" color="gray"/>
</ColorMap>
</Cells>
</Plot>
</Gnuplotter>
<DependencyGraph format="svg" exclude-plugins="Gnuplotter"/>
</Analysis>
</MorpheusModel>
---
title: "Coupling spatial models: Autocrine chemotaxis"
date: "2019-11-07T10:42:00+01:00"
toc: true
menu:
Built-in Examples:
parent: Multiscale models
weight: 10
weight: 170
---
## Introduction
This example models a cellular Potts model for autocrine chemotaxis by coupling a CPM to a diffusive chemoattractant.
![](cpm-pde.png "Cell cluster due to chemotaxis towards self-produced chemoattractant.")
## Model description
It exemplifies the combination of a ```CPM``` with a ```PDE``` through the chemotaxis towards a diffusive chemoattractant produced by cells. The ```CellType``` has a ```Property``` $p$ (production rate) which is positive within biological cells, and is zero in the ```medium``` cell type. The symbol $p$ can than be used in the ```PDE``` as the production term for species or ```Layer``` $U$. In this way, $U$ is produced in each lattice node that is occupied by a cell, and is not produced outside of cells. At the same time, cells perform ```Chemotaxis``` towards the chemoattractant $U$.
The simulation is visualized using some advanced ```Gnuplotter``` feature. Cells are ```superimposed``` on the PDE and appear as transparent domains (see ```opacity```). Moreover, the concentration gradient of the PDE is emphasized by the use of ```isolines``` that draws contours as positions with equal concentration.
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/47176046?loop=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
\ No newline at end of file
In Morpheus GUI: ```Examples``````Multiscale``````AutocrineChemotaxis.xml```.
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="3">
<Description>
<Title>Example-CellCycle</Title>
<Details>ODE model of Xenopus oocyte cell cycle adopted from:
James Ferrell, Tony Yu-Chen Tsai and Qiong Yang (2011) Modeling the Cell Cycle: Why Do Certain Circuits Oscillate?, Cell 144, p874-885. http://dx.doi.org/10.1016/j.cell.2011.03.006</Details>
</Description>
<Global/>
<Space>
<Lattice class="hexagonal">
<Size symbol="size" value="250 250 0"/>
<BoundaryConditions>
<Condition boundary="x" type="periodic"/>
<Condition boundary="y" type="periodic"/>
</BoundaryConditions>
<Neighborhood>
<Order>1</Order>
</Neighborhood>
</Lattice>
<SpaceSymbol symbol="space"/>
</Space>
<Time>
<StartTime value="0"/>
<StopTime value="1"/>
<TimeSymbol symbol="time"/>
<RandomSeed value="3445"/>
</Time>
<CellTypes>
<CellType class="biological" name="cells">
<Property symbol="CDK1" value="0" name="Cyclin-dependent kinase 1"/>
<Property symbol="Plk1" value="0" name="Polo-like kinase 1"/>
<Property symbol="APC" value="0" name="Anaphase-promoting complex"/>
<System solver="runge-kutta" time-scaling="20" time-step="4e-2">
<DiffEqn symbol-ref="CDK1">
<Expression>α1 - β1 * CDK1 * (APC^n / (K^n + APC^n))</Expression>
</DiffEqn>
<DiffEqn symbol-ref="Plk1">
<Expression>α2*(1-Plk1) * ((CDK1^n) / (K^n + CDK1^n)) - β2*Plk1</Expression>
</DiffEqn>
<DiffEqn symbol-ref="APC">
<Expression>α3*(1- APC) * ((Plk1^n) / (K^n + Plk1^n)) - β3*APC</Expression>
</DiffEqn>
<Constant symbol="n" value="8" name="Hill coefficient"/>
<Constant symbol="K" value="0.5" name="Michaelis constant"/>
<Constant symbol="α1" value="0.1"/>
<Constant symbol="α2" value="3.0"/>
<Constant symbol="α3" value="3.0"/>
<Constant symbol="β1" value="3.0"/>
<Constant symbol="β2" value="1.0"/>
<Constant symbol="β3" value="1.0"/>
</System>
<Property symbol="p" value="0" name="portion"/>
<Property symbol="d" value="0" name="divisions"/>
<Property symbol="c" value="0" name="division timeout"/>
<Property symbol="cc" value="1" name="cellcount"/>
<Property symbol="Vt" value="25000" name="Target volume"/>
<VolumeConstraint target="Vt" strength="1"/>
<SurfaceConstraint target="1.0" mode="aspherity" strength="1"/>
<Event>
<Condition>CDK1&lt;0.2</Condition>
<Rule symbol-ref="c">
<Expression>0</Expression>
</Rule>
</Event>
<CellDivision division-plane="minor">
<Condition>if(CDK1 > 0.5 and c == 0, 1, 0)</Condition>
<Triggers>
<Rule symbol-ref="d">
<Expression>d+0.5</Expression>
</Rule>
<Rule symbol-ref="c">
<Expression>1</Expression>
</Rule>
<Rule symbol-ref="Vt">
<Expression>Vt/2</Expression>
</Rule>
</Triggers>
</CellDivision>
</CellType>
</CellTypes>
<CPM>
<Interaction default="0">
<Contact type1="cells" type2="cells" value="-20"/>
</Interaction>
<MonteCarloSampler stepper="edgelist">
<MCSDuration value="5e-5"/>
<Neighborhood>
<Order>1</Order>
</Neighborhood>
<MetropolisKinetics temperature="10" yield="0.1"/>
</MonteCarloSampler>
<ShapeSurface scaling="norm">
<Neighborhood>
<Order>3</Order>
</Neighborhood>
</ShapeSurface>
</CPM>
<CellPopulations>
<Population size="0" type="cells">
<InitCellObjects mode="order">
<Arrangement repetitions="1, 1, 1" displacements="1, 1, 1">
<Sphere radius="40" center="125,100,0"/>
</Arrangement>
</InitCellObjects>
<InitProperty symbol-ref="CDK1">
<Expression>0.25</Expression>
</InitProperty>
</Population>
</CellPopulations>
<Analysis>
<Gnuplotter time-step="0.05" decorate="false">
<Terminal name="png"/>
<Plot>
<Cells value="CDK1">
<ColorMap>
<Color value="0.5" color="red"/>
<Color value="0.2" color="yellow"/>
</ColorMap>
</Cells>
</Plot>
</Gnuplotter>
<Logger time-step="2e-3">
<Input>
<Symbol symbol-ref="APC"/>
<Symbol symbol-ref="CDK1"/>
<Symbol symbol-ref="Plk1"/>
</Input>
<Output>
<TextOutput file-format="csv"/>
</Output>
<Plots>
<Plot time-step="-1">
<Style style="points" line-width="4.0"/>
<Terminal terminal="png"/>
<X-axis>
<Symbol symbol-ref="time"/>
</X-axis>
<Y-axis>
<Symbol symbol-ref="APC"/>
<Symbol symbol-ref="CDK1"/>
<Symbol symbol-ref="Plk1"/>
</Y-axis>
</Plot>
<Plot time-step="-1">
<Style style="points" line-width="4.0"/>
<Terminal terminal="png"/>
<X-axis>
<Symbol symbol-ref="CDK1"/>
</X-axis>
<Y-axis>
<Symbol symbol-ref="APC"/>
</Y-axis>
<Color-bar>
<Symbol symbol-ref="Plk1"/>
</Color-bar>
</Plot>
</Plots>
<Restriction>
<Celltype celltype="cells"/>
</Restriction>
</Logger>
</Analysis>
</MorpheusModel>
---
title: "ODEs in CPM cells: Cell cycle and proliferation"
date: "2019-11-11T11:29:00+01:00"
toc: true
menu:
Built-in Examples:
parent: Multiscale models
weight: 30
weight: 190
---
## Introduction
This multiscale model example shows
1. how to define a coupled system of continuous ODEs in discrete CPM cells,
1. how to specify and change time scales between these model formalisms.
![](cell-cycle.png "Cells divide according to an oscillatory ODE model representing the early cell cycle in *Xenopus*.")
## Model description
This model specifies an oscillatory ODE model representing the cell cycle in Xenopus oocytes using three components ($\text{CDK1}$, $\text{Plk1}$, $\text{APK}$) ([Ferrell *et al.*, 2011][ferrell-2011]) (see ```CellTypes``````CellType``````System```). This ODE model is coupled to 2D shaped CPM cells that perform divide based on the concentration of these components (see ```CellTypes``````CellType``````Proliferation``````Condition```). As in the early *Xenopus* cell cleavage, this leads to exponential growth of the number of cells, without increase of total cell volume.
### Time scales
Time scales are defined in the following fashion:
- The so-called global time scheme is defined in ```Time``` and here runs from $0$ to $1$ arbitrary time units. All models and plugins specify their updating scheme in terms this global time scheme (e.g. ```Analysis``````Gnuplotter``````interval```).
- The CPM time scale for cell motility and behaviours is defined in ```CPM``````MCSDuration```. This specifies the time that a single Monte Carlo step in the CPM lasts, in terms of the 'global time'. Here, the ```MCSDuration``` is $1.0\cdot10^{-4}$ which means the CPM is executed 10.000 times during this simulation.
- For setting time of ODEs, one has to distinguish the (1) how often the ODEs are evaluated from (2) controlling the time scale of the ODE dynamics:
1. The time scale of the ODE dynamics can be changed using ```System``````time-scaling```. When larger or smaller than $1.0$, this speeds up or slows down make the dynamics, without influencing the accuracy of the approximation.
1. The accuracy of the numerical approximation (and is equal to the $\Delta t$ of the numerical solver) is controlled using ```System``````time-step``` (and is automatically rescaled according to the time scale).
## Things to try
- Change the CPM time scale, relative to the ODE dynamics: Change ```CPM``````MCSDuration``` to $1.0\cdot10^{-3}$ or decrease to $1.0\cdot10^{-5}$. This makes cells to have less resp. more motility/relaxation in between cell divisions.
- Change the time scale of the ODE dynamics, relative to the CPM by altering ```System``````time-scaling```.
## Reference
J. E. Ferrell Jr., T. Y. Tsai, Q. Yang. [Modeling the Cell Cycle: Why Do Certain Circuits Oscillate?][ferrell-2011] *Cell*, **144** (6): 874-885, 2011.
[ferrell-2011]: http://dx.doi.org/10.1016/j.cell.2011.03.006
\ No newline at end of file
In Morpheus GUI: ```Examples``````Multiscale``````CellCycle.xml```.
\ No newline at end of file
<MorpheusModel version="3">
<Description>
<Title>Example-CellPolarity</Title>
<Details>Chemotaxis of polarized cell
----------------------------
Show feedback between cell motility, cell polarization and external gradient.
Two simple polarization models can be enabled/disabled:
- Substrate-depletion model: no repolarization
- Wave-pinning model: repolarization
PDE Equation:
- Switch on/off and change gradients </Details>
</Description>
<Global>
<Field symbol="U" value="l.x / lattice.x">
<Diffusion rate="0.0"/>
</Field>
<!-- <Disabled>
<Equation symbol-ref="U">
<Expression>l.x / lattice.x +
0*if( t > 500 and t &lt; 1500, l.x / lattice.x, 0)</Expression>
</Equation>
</Disabled>
-->
<Constant symbol="c" value="0.0"/>
<!-- <Disabled>
<Constant symbol="A" value="0.0"/>
</Disabled>
-->
</Global>
<Space>
<Lattice class="cubic">
<Size symbol="lattice" value="150 75 50"/>
<BoundaryConditions>
<Condition boundary="x" type="noflux"/>
<Condition boundary="y" type="periodic"/>
</BoundaryConditions>
<NodeLength value="1.0"/>
<Neighborhood>
<Distance>2.0</Distance>
</Neighborhood>
</Lattice>
<SpaceSymbol symbol="l"/>
<MembraneLattice>
<Resolution symbol="memsize" value="50"/>
<SpaceSymbol symbol="m"/>
</MembraneLattice>
</Space>
<Time>
<StartTime value="0"/>
<StopTime value="2000"/>
<SaveInterval value="0"/>
<RandomSeed value="0"/>
<TimeSymbol symbol="t"/>
</Time>
<CellTypes>
<CellType class="biological" name="cells">
<Chemotaxis field="U" strength="100*(A)" retraction="true"/>
<VolumeConstraint target="5000" strength="0.1"/>
<SurfaceConstraint target="1" mode="aspherity" strength="0.05"/>
<MembraneProperty symbol="A" value="0.5" name="A">
<Diffusion rate="0.05"/>
</MembraneProperty>
<MembraneProperty symbol="B" value="0.5" name="B">
<Diffusion rate="1"/>
</MembraneProperty>
<MembraneProperty symbol="c" value="0" name="chemotactic strength">
<Diffusion rate="0"/>
</MembraneProperty>
<MembraneProperty symbol="s" value="0" name="signal">
<Diffusion rate="0"/>
</MembraneProperty>
<Property symbol="l_U" value="0"/>
<!-- <Disabled>
<System solver="runge-kutta" time-step="1.0" name="Substrate-Depletion">
<Rule symbol-ref="c">
<Expression>A^2*5e1</Expression>
</Rule>
<DiffEqn symbol-ref="A">
<Expression>(rho*A^2) / B - mu_a * A + rho_a + 0.001*s</Expression>
</DiffEqn>
<DiffEqn symbol-ref="B">
<Expression>(rho*A^2) - mu_i * B</Expression>
</DiffEqn>
<Constant symbol="rho_a" value="0.01"/>
<Constant symbol="mu_i" value="0.03"/>
<Constant symbol="mu_a" value="0.02"/>
<Constant symbol="rho" value="0.001"/>
</System>
</Disabled>
-->
<System solver="runge-kutta" time-step="1.0" name="WavePinning">
<Constant symbol="k_0" value="0.067"/>
<Constant symbol="gamma" value="1"/>
<Constant symbol="delta" value="0.25"/>
<Constant symbol="K" value="1"/>
<Constant symbol="sigma" value="5.0" name="spatial-length-signal"/>
<Constant symbol="n" value="4" name="Hill coefficient"/>
<Intermediate symbol="F" value="B*(k_0+ s + (gamma*A^n) / (K^n + A^n) ) - delta*A"/>
<DiffEqn symbol-ref="A">
<Expression>F</Expression>
</DiffEqn>
<DiffEqn symbol-ref="B">
<Expression>-F</Expression>
</DiffEqn>
<Rule symbol-ref="c">
<Expression>A^2*1000</Expression>
</Rule>
</System>
<Mapper>
<Input value="U"/>
<Output symbol-ref="s" mapping="average"/>
</Mapper>
</CellType>
<CellType class="medium" name="medium">
<Property symbol="l_U" value="0"/>
</CellType>
</CellTypes>
<CPM>
<Interaction default="0.0">
<Contact type1="cells" type2="medium" value="-10"/>
<Contact type1="cells" type2="cells" value="-20"/>
</Interaction>
<MonteCarloSampler stepper="edgelist">
<MCSDuration value="1"/>
<Neighborhood>
<Order>2</Order>
</Neighborhood>
<MetropolisKinetics temperature="1" yield="0.05"/>
</MonteCarloSampler>
<ShapeSurface scaling="norm">
<Neighborhood>
<Order>6</Order>
</Neighborhood>
</ShapeSurface>
</CPM>
<CellPopulations>
<Population size="0" type="cells">
<!-- <Disabled>
<InitRectangle mode="regular" number-of-cells="1">
<Dimensions size="150, 75, 50" origin="0.0, 0.0, 0.0"/>
</InitRectangle>
</Disabled>
-->
<Cell id="1" name="1">
<Nodes>25 37 25</Nodes>
</Cell>
</Population>
</CellPopulations>
<Analysis>
<Gnuplotter time-step="50">
<Terminal name="png"/>
<Plot>
<Field symbol-ref="U"/>
<Cells value="A" slice="25"/>
</Plot>
</Gnuplotter>
<TiffPlotter format="8bit" OME-header="false" time-step="100">
<Channel symbol-ref="cell.id" celltype="cells"/>
<Channel symbol-ref="c" celltype="cells"/>
<Channel symbol-ref="U"/>
</TiffPlotter>
<Logger time-step="50">
<Input>
<Symbol symbol-ref="A"/>
</Input>
<Output>
<TextOutput file-format="matrix"/>
</Output>
<Plots>
<SurfacePlot time-step="50">
<Color-bar>
<Symbol symbol-ref="A"/>
</Color-bar>
<Terminal terminal="png"/>
</SurfacePlot>
</Plots>
<Restriction>
<Celltype celltype="cells"/>
</Restriction>
</Logger>
</Analysis>
</MorpheusModel>
---
title: "MembraneProperties: Cell polarization and chemotaxis"
date: "2019-11-11T16:59:00+01:00"
toc: true
menu:
Built-in Examples:
parent: Multiscale models
weight: 50
weight: 210
---
## Introduction
This model of cell polarity shows the coupling of three model formalisms:
- A cellular Potts model,
- a PDE model, solved on the membrane of the cell and
- an external gradient.
The cell membrane polarizes in response to the external gradient. Chemotactic cell motility depends on the polarity of the cell and the external gradient.
![](cellpolarity0060.png "Cell dynamically repolarizes in response to switching external gradient.")
## Model description
This example implements two models of cell polarity: Meinhardt's substrate-depletion model and Edelstein-Keshet's wave-pinning model. The user can switch polarity model by ```Disabling```/```Enabling``` the relevant ```System```.
The model defines a one-dimensional reaction-diffusion system (```MembraneProperty```) representing membrane-bound molecules, and is mapped to a cellular Potts model defining a discrete shaped cell. An external gradient, specified in a ```PDE```, provides a signal for the polarization of the cell. In turn, the polarity of the cell influences its ```chemotaxic``` behavior.
After a switch in direction of the gradient, the cell re-polarizes in the new direction and starts to move up the gradient, if the wave pinning model has been selected.
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/60636346?loop=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
\ No newline at end of file