Skip to main content
v2026.11,986 entries · CC-BY 4.0

CompuCell3D: What It Is and How It Works

CompuCell3D is an open-source virtual-tissue simulator. This guide maps its cellular Potts model to CC3DML, plugins, steppables, Player and Twedit++.

Written and maintained by CASRAI Editorial Board

Published

On this page

CompuCell3D (CC3D) is an open-source modeling and simulation environment for multicellular virtual tissues. Researchers describe cells, their adhesion, growth, motility and chemical fields in a configuration file or Python script, then run the model and watch tissue-level patterns emerge. It runs on Windows, macOS and Linux and is written in C++ with Python bindings.

What CompuCell3D is and what it is for

The project’s own site describes CompuCell3D as an open-source multiscale modeling framework for simulating complex biological systems, and the code repository calls it a multiscale multicellular virtual tissue modeling and simulation environment. The underlying algorithm is the Glazier-Graner-Hogeweg (GGH) model, which the keyword list of the project’s methods chapter also files under the abbreviation CPM (cellular Potts model). A 2009 methods chapter by the CC3D developers (Swat and colleagues, Methods in Molecular Biology) explains the motivation: tissue-level simulations of development and disease had lagged behind other areas of mathematical modeling because they are mathematically complex and lacked easy-to-use tools for building and running in-silico experiments without deep programming knowledge. CC3D was built as a shared framework so that groups do not each rewrite the same lattice code.

The scale it targets sits between two extremes the same chapter describes. Detailed intracellular simulators can handle only single cells or small clusters, while continuum tissue models ignore cells and are poorly suited to situations where cells reorganize or migrate. Multi-cell simulation treats the cell as the natural unit of abstraction and reduces the many interactions of gene products to a handful of behaviors: cells can move, divide, die, differentiate, change shape, exert forces, secrete and absorb chemicals, and change their surface properties.

The chapter lists the kinds of biological questions GGH models have been applied to, including tumor growth, gastrulation, skin pigmentation, angiogenesis, the immune system, yeast colony growth, stem-cell differentiation, wound healing, biofilms and limb-bud development. Its authors also state that, because the method uses a regular cell lattice and regular field lattices, simulations are often faster than equivalent finite-element simulations at the same spatial granularity, allowing tens to hundreds of thousands of cells on lattices of up to 10243 pixels on a single processor.

How the underlying model works

Understanding the vocabulary of the model makes the software much easier to read, because CC3D’s files and menus use it directly.

Generalized cells and fields

A GGH simulation contains objects, a description of their interactions and dynamics, and initial conditions. The objects are generalized cells and fields. A generalized cell is a spatially extended object that occupies many pixels of a single cell lattice, has a unique cell index and a cell type, and carries attributes such as volume and surface area. It may stand for a biological cell, a sub-compartment of a cell, a cluster of cells, or a piece of non-cellular material such as extracellular matrix or fluid. Fields are continuously variable concentrations, each on its own lattice, and can represent diffusing chemicals or non-diffusing matrix.

Effective energy and index-copy attempts

Cell behavior is expressed mainly through an effective energy. It mixes true energies, such as cell-cell adhesion, with terms that mimic energies, such as a cell’s response to a chemotactic gradient. The chapter gives two basic building blocks: a boundary (adhesion) energy that depends on the types of the two cells meeting at a pixel link, and elastic constraint terms of the form λ(value − target value)2, where λ sets how strongly the constraint is enforced. The commonest constraints are a volume constraint and a surface-area constraint. Because the dynamics are stochastic, a cell need not satisfy a constraint exactly at any moment, and conflicting constraints can leave configurations that satisfy some only partially.

The cell lattice evolves through index-copy attempts, in which a generalized cell tries to move its boundary by copying its index into a neighboring pixel, a caricature of cytoskeleton-driven motility. Each attempt changes the effective energy by ΔH and is accepted or rejected with a probability given by an acceptance function. The classical GGH uses Metropolis dynamics with Boltzmann acceptance, and the lattice evolves toward a local minimum of the total effective energy. One Monte Carlo Step (MCS) is defined as one index-copy attempt for each pixel in the cell lattice, which makes the MCS the basic clock of a CC3D run.

Auxiliary equations and field dynamics

On top of the lattice dynamics, auxiliary equations describe absorption and secretion of chemicals, changes of cell state, mitosis and cell death. State changes usually act by changing parameters inside the effective-energy terms, for example a cell’s target volume or type. Fields change by secretion, absorption, diffusion and decay according to partial differential equations; the chapter notes that most simulations need only those four processes, with reactions written as ordinary differential equations running inside individual generalized cells.

How a CompuCell3D simulation is built

The chapter states that changing a simulation does not require recompiling CC3D. Users define simulations in CompuCell3D XML (CC3DML) configuration files, in Python scripts, or in both. CC3D reads the CC3DML file to set the basic simulation structure, starts any Python services the file names, and then executes the simulation algorithm. In the chapter’s grain-growth example a CC3DML file has three sections in sequence: the lattice section inside the Potts tag pair, the plugins section and the steppables section. The lattice section holds global parameters: lattice dimensions, the number of Monte Carlo Steps to run, the effective cell motility (the Temperature tag) and boundary conditions, which default to no-flux. The same chapter notes that the current implementation requires every simulation to define a Medium cell type with TypeId 0, a special type with unconstrained volume and surface area that fills pixels not occupied by other cells.

Plugins and steppables

CC3D is modular. In its terminology, modules tied to index copies are plugins. Some plugins calculate changes in effective energy; others, called lattice monitors, react to accepted index copies, for example by updating cell volumes, surface areas or neighbor lists. Plugins can depend on one another: the Volume plugin, which calculates the volume constraint, depends on VolumeTracker, a lattice monitor, and CC3D loads dependent plugins automatically. Modules called steppables run either repeatedly after a defined number of Monte Carlo Steps or once at the start or end of a simulation, and typically define initial conditions, alter cell states, update fields or write intermediate output.

Python scripting and subcellular models

Python lets users extend CC3DML files or write an entire simulation in code. The chapter says CC3DML is convenient for simple simulations, while more complex ones can use shareable modules written in C/C++ (which run at native speed but require knowledge of the CC3D API) or in Python. A later chapter on tissue modeling (Swat, Thomas, Belmonte and colleagues, Methods in Cell Biology) adds that reaction-kinetics models specified in the SBML format can be solved inside each generalized cell and used to control cell-level behaviors such as adhesion or growth.

The tools in the environment and how to launch them

The README distinguishes three working surfaces: Twedit++ for model development, Player for interactive runs with real-time rendering, and a GUI-less mode for running a model without the graphical interface. The tissue-modeling chapter describes Twedit++-CC3D as a model editor and code generator with a Simulation Wizard that drafts model code from a high-level specification of cell types, behaviors, fields and interactions, and Player as a tool for running, replaying and analyzing simulations. In the methods chapter, the user opens a CC3DML or Python file in Player and presses Play; Player can show several 2D or 3D views of cells, fields and vector plots while the simulation runs and save them automatically for post-processing.

After installing the conda package with conda install -c compucell3d -c conda-forge cc3d, the repository README gives these launch commands.

Goal Command (from the project README)
Open Player, the graphical simulation front end python -m cc3d.player5
Open Twedit++, the model editor python -m cc3d.twedit5
Run a project without a GUI python -m cc3d.run_script -i path/to/model.cc3d

Binary distributions are also offered on the CompuCell3D project page, with build instructions for compiling from source, and the repository states an MIT license. The concept-to-component data table at the end of this page pairs each term of the model with the CC3D part that implements it.

Where it matters for lab and research-office decisions

CC3D is software for computational biology groups, but it touches ordinary research-management questions. The chapter’s argument for the framework is reproducibility and sharing: a common open-source environment makes model reproduction, sharing and validation less cumbersome than bespoke research code. A model defined as a CC3DML file plus optional Python scripts is a small, portable set of text files, which is easier to deposit, version and cite than a compiled one-off program. If your group relies on a CC3D model, record the exact CC3D version in the methods, keep the model files with the dataset, and capture the software setup as described in the guidance on a computational environment. For the wider habits involved, see the entries on computational reproducibility and open-source software, and the Software Citation FAIR working group entry for citing the tools themselves.

Version and training information changes, so the project’s front page announced, with a date of October 10, 2026, version 4.10.0 with a date of October 10, 2026, with the note that GPU solvers now work out of the box when the required GPU drivers are installed, plus improvements to Player and Twedit++, and with binaries hosted on GitHub. The same page announced the 21st annual Multicell Virtual-Tissue Modeling Online Summer School and Hackathon for 2026, held virtually from July 27 to August 9, with a three-day model-building hackathon the weekend after the workshop. The project site also lists manuals, a user forum, tutorials, training videos, a FAQ, web demos that need no installation, a model repository, publications and theses; the GitHub documentation site lists installation, GPU/OpenCL driver and tutorial pages.

The methods chapter frames GGH between two other ways of simulating tissue: detailed single-cell or intracellular simulators, which are computationally expensive and handle at most several cells, and continuum models, which treat tissue as a material with bulk mechanical properties. It names Virtual Cell as an example of the first and Physiome as an example of the second. A generalized cell can be tuned from intracellular detail to continuum-like coarse graining without leaving the framework, for example by grouping cells into clusters or subdividing a cell into subcells. If a question needs molecular-level detail inside each cell, the chapter’s own framing says simulations must be simplified to be useful: the hardest part is deciding which biology to describe and how to describe it quantitatively.

Common misunderstandings

  • It is not a molecular simulator. Cells are treated phenomenologically, with a small set of behaviors, rather than by modeling every gene product. Subcellular reaction networks can be added, but as optional models inside generalized cells.
  • Cells are not always single biological cells. A generalized cell can be a cell, a compartment, a cluster or a patch of matrix or fluid, which is why Medium is itself a cell type.
  • You do not need to recompile to change a model. Models are CC3DML and Python files, and the chapter states that changes do not require recompiling the program.
  • The GUI is optional. Player is the interactive route, but the README documents a GUI-less run from the command line.
  • An MCS is not a count of cells. It is one index-copy attempt per lattice pixel, so it scales with lattice size.
  • Older descriptions can be out of date. The project’s front page and repository are the sources for the current version, license and install route; third-party summaries may lag them.

Sources

Data: CompuCell3D concept map: model terms and the software components that implement them

Original cross-walk compiled from two peer-reviewed methods chapters by the CompuCell3D developers (PMC2739628 and PMC3612985) and the project's GitHub README. Each row pairs a term from the Glazier-Graner-Hogeweg (cellular Potts) model, or a workflow step, with the CompuCell3D component or command that implements it, and states what that component does. Every cell is taken from the listed sources, read on 2026-11-21.

CompuCell3D concept map: model terms and the software components that implement them
Model term or workflow stepCompuCell3D componentWhat it doesSource
Generalized cellCell object (type, index, volume, surface area)Spatially extended object on the cell lattice; may be a cell, a compartment, a cluster or non-cellular materialMethods chapter (PMC2739628)
FieldField lattice (diffusants, matrix)Continuous concentration on its own lattice; evolves by secretion, absorption, diffusion and decayMethods chapter (PMC2739628)
Effective energyEnergy-term plugins (for example Contact, Volume)Plugins calculate changes in effective energy for each index-copy attemptMethods chapter (PMC2739628)
Index-copy attemptCore Monte Carlo updateAttempted boundary move accepted or rejected by Boltzmann acceptance on the energy changeMethods chapter (PMC2739628)
Monte Carlo Step (MCS)Unit of simulation run length (Steps tag in CC3DML Potts section)One index-copy attempt for each pixel of the cell latticeMethods chapter (PMC2739628)
Lattice monitorTracker plugins (for example VolumeTracker)React to accepted index copies, updating volumes, surface areas or neighbor listsMethods chapter (PMC2739628)
Auxiliary dynamics (initial conditions, state changes, field updates, output)SteppablesRun after set intervals of MCS or once at start or end of the simulationMethods chapter (PMC2739628)
Model definitionCC3DML (XML) file and Python scriptsPotts (lattice), plugins and steppables sections; Python extends or replaces the XML; no recompilingMethods chapter (PMC2739628)
Subcellular reaction networkSBML models solved inside generalized cellsCan control cell-level behaviors such as adhesion or growthTissue-modeling chapter (PMC3612985)
Interactive run and visualizationPlayer (python -m cc3d.player5)GUI for running models with real-time renderingRepository README; PMC2739628
Model developmentTwedit++ (python -m cc3d.twedit5)Model editor and recommended IDE; Simulation Wizard drafts model codeRepository README; PMC3612985
Headless runpython -m cc3d.run_script -i file.cc3dRuns a .cc3d project without the GUIRepository README

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about CompuCell3D: What It Is and How It Works

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →