35
1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

Embed Size (px)

Citation preview

Page 1: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

1

CompuCell3D: A Morphogenesis

simulation package

Nan Chen and Mark Alber

2/20/2006

Page 2: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

2

Topics

● Introduction to CompuCell3D

● Cellular Potts Model

● Framework of CompuCell3D

● Usage of CompuCell3D

● Future Plans

Page 3: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

3

Introduction to CompuCell3D

Page 4: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

4

● Morphogenesis simulation package based on Cellular Potts Model (CPM)

● Capable of modeling cell clustering as well as growth, division, death, intracellular adhesion, and volume and surface area constraints

● Partial differential equation models for external chemical fields which can model reaction-diffusion

● Cell type automata provides a method for categorizing cells by behavior into types and algorithms for changing cell type

● Chemotaxis and haptotaxis

CompuCell3D overview

Page 5: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

5

CompuCell3D overview

● Framework design allow scientists to focus on

simulation development

– Visualization tool (CompCell Player)

– Standard input (XML) make the package easy to use

– Minimize the amount of coding required

● Flexible simulation framework

– Software design Pattern and Plug in feature

– Easy to extend and add new features

Page 6: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

6

● Cell sorting

● Limb bud growth

● Amoeba migration

● Dictyostelium discoideum

● Somites formation

CompuCell3D Applications

Page 7: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

7

Simple set-up of the Cellular Potts Model (CPM) (a) Initial condition, (b-d) results for

various bond-strength settings between dark cells, light cells and the surrounding

medium.

Cell Sorting

Page 8: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

8

Left. Skeletal Pattern formation: Time-series of

chick limb-bud development. Right. 3D cell

condensation and patterning into skeletal

elements- humerus, ulna+radius, and digits in a

chicken limb.

Limb bud growth

Page 9: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

9

Cellular Potts Model

Page 10: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

10

Cell structure is discretized into a cell map, each number in the above cell map corresponds to one cell.

Cellular Potts Model

Page 11: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

11

•System Hamiltonian consists of adhesion energy, volume energy and chemical energy•Transition probability, W, is determined by the change of free energy due to orientation alteration. G, according to above equation.

Cellular Potts Model

01

0)exp(

G

Gkt

Gw

Page 12: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

12

Cellular Potts Model• Energy minimization formalism

– extended by Graner and Glazier, 1992

• DAH: Contact energy depending on cell types (differentiated cells)

• Extensions:

– J_cell_cell is type dependent

– Other terms: Cell volume, Chemotaxis/Haptotaxis

• Metropolis algorithm: probability of configuration change

01

0)exp(

G

Gkt

Gw

Page 13: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

13

Framework of CompuCell3D

Page 14: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

14

CompuCellPlayer

User

XML input

CompuCell3D Kernal

Information flow chart for CompuCell3D

Page 15: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

15

Visualization tool●Using QT Lib●3D Visualization●2D Cross-section●Zooming, rotating, translating ●Picture Generation●pause a simulation

CompuCellPlayer

Page 16: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

16

CompuCell3D - XML input <Potts> <Dimensions x=“51" y=“51" z="21"/> <Steps>10</Steps> <Temperature>2</Temperature> <Flip2DimRatio>1</Flip2DimRatio> </Potts>

VolumevolumevolumeEnergy(cell)

<Plugin Name="Volume"> <TargetVolume>64</TargetVolume> <LambdaVolume>0.05</LambdaVolume> </Plugin>

SurfaceareasurfaceEnergy(cell)

<Plugin Name="Surface"> <TargetSurface>77</TargetSurface> <LambdaSurface>0.05</LambdaSurface> </Plugin>

ContactcontactEnergy( cell1, cell2)

<Plugin Name="Contact"> <Energy Type1="Medium" Type2="Medium">0</Energy> <Energy Type1="Light" Type2="Medium">0</Energy> <Energy Type1="Dark" Type2="Medium">0.1</Energy> <Energy Type1="Light" Type2="Light">0.5</Energy> <Energy Type1="Dark" Type2="Dark">3.0</Energy> <Energy Type1="Light" Type2="Dark">0.5</Energy> </Plugin>

Potts ModelDefination

Page 17: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

17

CompuCell3D Structure

Steppables are executed once per Monte Carlo step and once before and after the main loop. They are the main hooks for initialization and rendering.

Steppers are executed once per spin flip attempt. They are the main hooks for energy functions.

CellChangeWatchers are executed once per each successful spin flip. They are useful for adjusting values that depend on the number of lattice points in a cell.

Automatons enable cell state to change their state as the simulation evolves.

Plugins are loaded at runtime. They are the main way of adding new features to CompuCell. They can be Steppables, Steppers, CellChangeWatchers, or Automatons.

Initialization()

Steppables.Start()

For each Monte Carlo step:

For flip attempt: if(flip): CellChangeWatcher(cell) Automatons.Update(cell) Steppers.step()

Steppabless.step() Steppables.finish()

CompuCell3D Program Flow

Page 18: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

18

Quickstart Guide of CompuCell3D

Page 19: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

19

Installation

● For testing purpose, you could directly install binary package

– Easy to install

● For development purpose, you could download source code and compile it

– Your computer needs to have automake, autoconfigure, autohead, libtool package

● You could find this package from simtk.org

Page 20: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

20

Mcs 0 Mcs 50

Mcs 100

Your first example-Foam simulation

Page 21: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

21

<CompuCell3D> <Potts> <Dimensions x="101" y="101" z="1"/> <Anneal>0</Anneal> <Steps>100</Steps> <Temperature>5</Temperature> <Flip2DimRatio>1</Flip2DimRatio> <Boundary_y>Periodic</Boundary_y> <Boundary_x>Periodic</Boundary_x> <FlipNeighborMaxDistance>1.75</FlipNeighborMaxDistance> </Potts> <Plugin Name="CellType"> <CellType TypeName="Medium" TypeId="0"/> <CellType TypeName="Foam" TypeId="1"/> </Plugin> <Plugin Name="Contact"> <Energy Type1="Foam" Type2="Foam">20</Energy> <Energy Type1="Medium" Type2="Medium">100</Energy> <Energy Type1="Medium" Type2="Foam">100</Energy> <Depth>1.5</Depth> </Plugin> <Steppable Type="PIFInitializer"> <PIFName>Foam_1.pif</PIFName> </Steppable> </CompuCell3D>

1

2

3

4

Your first example

Page 22: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

22

Setting for Potts Model

<Potts>

<Dimensions x="101" y="101" z="1"/>

<Anneal>0</Anneal>

<Steps>100</Steps>

<Temperature>5</Temperature>

<Flip2DimRatio>1</Flip2DimRatio>

<Boundary_y>Periodic</Boundary_y>

<Boundary_x>Periodic</Boundary_x>

<FlipNeighborMaxDistance>1.75</FlipNeighborMaxDistance>

</Potts>

Page 23: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

23

<Plugin Name="CellType">

<CellType TypeName="Medium" TypeId="0"/>

<CellType TypeName="Foam" TypeId="1"/>

</Plugin>

<Plugin Name="Contact">

<Energy Type1="Foam" Type2="Foam">20</Energy>

<Energy Type1="Medium" Type2="Medium">100</Energy>

<Energy Type1="Medium" Type2="Foam">100</Energy>

<Depth>1.5</Depth>

</Plugin>

Setting for Cell type and Contact energy

Page 24: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

24

1 Foam 1 5 1 5 0 02 Foam 1 5 6 10 0 03 Foam 1 5 11 15 0 04 Foam 1 5 16 20 0 05 Foam 1 5 21 25 0 06 Foam 1 5 26 30 0 07 Foam 1 5 31 35 0 08 Foam 1 5 36 40 0 09 Foam 1 5 41 45 0 0

<Steppable Type="PIFInitializer">

<PIFName>Foam_1.pif</PIFName>

</Steppable>

PIF File

Page 25: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

25

./FoamInit.pl -r5 -i60 -ofoaminit1.pif -z2 -m10Lattice dimension: x_max=301 y_max=301 z_max=1

<Dimensions x="301" y="301" z="1"/>

PIF Generator

Page 26: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

26

<Potts> <Dimensions x="101" y="101" z="1"/> <Anneal>0</Anneal> <Steps>1000</Steps> <Temperature>500</Temperature><Temperature>500</Temperature> <Flip2DimRatio>1</Flip2DimRatio> <Boundary_y>Periodic</Boundary_y>

5 500

Change temperature

Page 27: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

27

<Plugin Name="Contact"> <Energy Type1="Foam" Type2="Foam">200</Energy> <Energy Type1="Medium" Type2="Medium">1</Energy> <Energy Type1="Medium" Type2="Foam">1</Energy> <Depth>1.5</Depth> </Plugin>

Mcs 50 Mcs 100Mcs 0

Change Contact energy

Page 28: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

28

5 4 3 4 5

4 2 1 2 4

3 1 x 1 3

4 2 1 2 4

5 4 3 4 5

<Potts>

<Dimensions x="101" y="101" z="1"/>

<Anneal>0</Anneal>

<Steps>100</Steps>

<Temperature>5</Temperature>

<Flip2DimRatio>1</Flip2DimRatio>

<Boundary_y>Periodic</Boundary_y>

<Boundary_x>Periodic</Boundary_x>

<FlipNeighborMaxDistance>1.75</FlipNeighborMaxDistance>

</Potts>

<Plugin Name="Contact">

<Energy Type1="Foam" Type2="Foam">20</Energy>

<Energy Type1="Medium" Type2="Medium">100</Energy>

<Energy Type1="Medium" Type2="Foam">100</Energy>

<Depth>1.5</Depth>

</Plugin>

Order of Neighbor

Page 29: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

29

<Plugin Name="Contact"> <Energy Type1="Foam" Type2="Foam">20</Energy> <Energy Type1="Medium" Type2="Medium">200</Energy> <Energy Type1="Medium" Type2="Foam">200</Energy> <Depth>1.1</Depth> </Plugin>

1.1 1.5 2.7

Order of Neighbor

Page 30: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

30

<Potts> <Dimensions x="101" y="101" z="1"/> <Anneal>0</Anneal> <Steps>100</Steps> <Temperature>5</Temperature> <Flip2DimRatio>1</Flip2DimRatio> <Boundary_y>Periodic</Boundary_y> <Boundary_x>Periodic</Boundary_x> <FlipNeighborMaxDistance>1.1</FlipNeighborMaxDistance> </Potts>

<Depth>1.1</Depth>

Temperature 20 Temperature 5

Temperature effect on Low Order of Neighbor

Page 31: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

31

Initial

Cell Sorting

Page 32: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

32

<CompuCell3D> <Potts> <Dimensions x="70" y="70" z="1"/> <Anneal>10</Anneal> <Steps>10000</Steps> <Temperature>5</Temperature> <Flip2DimRatio>1</Flip2DimRatio> <FlipNeighborMaxDistance>1.75</FlipNeighborMaxDistance> </Potts><Plugin Name="Volume"> <TargetVolume>9</TargetVolume> <LambdaVolume>3.0</LambdaVolume> </Plugin> <Plugin Name="Surface"> <TargetSurface>16</TargetSurface> <LambdaSurface>0.5</LambdaSurface> </Plugin><Plugin Name="CellType"> <CellType TypeName="Medium" TypeId="0"/> <CellType TypeName="Condensing" TypeId="1"/> <CellType TypeName="NonCondensing" TypeId="2"/> </Plugin> <Plugin Name="Contact"> <Energy Type1="Medium" Type2="Medium">0</Energy> <Energy Type1="NonCondensing" Type2="NonCondensing">14</Energy> <Energy Type1="Condensing" Type2="Condensing">2</Energy> <Energy Type1="NonCondensing" Type2="Condensing">11</Energy> <Energy Type1="NonCondensing" Type2="Medium">16</Energy> <Energy Type1="Condensing" Type2="Medium">16</Energy> <Depth>1.75</Depth> </Plugin> <Plugin Name="CenterOfMass"/> <Steppable Type="OutputData"/> <Steppable Type="BlobInitializer"> <Gap>0</Gap> <Width>2</Width> <CellSortInit>yes</CellSortInit> <Radius>20-</Radius> </Steppable></CompuCell3D>

1

2

3

4

XML file for Cell Sorting

Page 33: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

33

<Plugin Name="Volume">

<TargetVolume>9</TargetVolume>

<LambdaVolume>3.0</LambdaVolume>

</Plugin>

<Plugin Name="Surface">

<TargetSurface>16</TargetSurface>

<LambdaSurface>0.5</LambdaSurface>

</Plugin>

<Plugin Name="CellType">

<CellType TypeName="Medium" TypeId="0"/>

<CellType TypeName="Condensing" TypeId="1"/>

<CellType TypeName="NonCondensing" TypeId="2"/>

</Plugin>

<Plugin Name="Contact">

<Energy Type1="Medium" Type2="Medium">0</Energy>

<Energy Type1="NonCondensing" Type2="NonCondensing">14</Energy>

<Energy Type1="Condensing" Type2="Condensing">2</Energy>

<Energy Type1="NonCondensing" Type2="Condensing">11</Energy>

<Energy Type1="NonCondensing" Type2="Medium">16</Energy>

<Energy Type1="Condensing" Type2="Medium">16</Energy>

<Depth>1.75</Depth>

</Plugin>

Energy setting

Page 34: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

34

<Steppable Type="BlobInitializer">

<Gap>0</Gap>

<Width>2</Width>

<CellSortInit>yes</CellSortInit>

<Radius>20-</Radius>

</Steppable>

Initial structure setting

Page 35: 1 CompuCell3D: A Morphogenesis simulation package Nan Chen and Mark Alber 2/20/2006

35

Future Plans

● We want to hear from you● Shell language interface

– As matlab, FemLab● Parallelizing