Skip to content

siavashmonfared/celadro_three_dimensional

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CELADRO-3D

License: GPL v3 Language Build System Dependencies Visualization

			β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘
			β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
			β–ˆβ–ˆβ•‘β–‘β–‘β•šβ•β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘
			β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ•β•β•β•β•β–‘β•šβ•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘
			β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
			β–‘β•šβ•β•β•β•β•β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•β•β•β•β–‘β•šβ•β•β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘β–‘β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β–‘β•šβ•β•β•β•β•β•β–‘
			------------------------------------------------------------------------------
                 				Celadro: Cells as active droplets
                    			Romain Mueller (2016-2017) & Siavash Monfared (2020-21)

Example Simulation

Three-dimensional phase-field modeling of epithelial cells using finite-difference integrator

CELADRO-3D is a computational framework for simulating active matter and cellular dynamics in three dimensions using phase-field methods. The model treats cells as active droplets and captures complex behaviors including cell division, migration, and tissue morphogenesis.

πŸš€ Quick Start

Prerequisites

  • Modern C++ compiler supporting C++14 standard
  • CMake (version 3.0 or higher)
  • Boost libraries (specifically boost::program_options)
  • VTK library (for visualization)

Building

mkdir build
cd build
cmake ..
make

Running

cd example
../build/celadro simCard.dat [options]

πŸ“‹ Input Files

Simulation Card (simCard.dat)

The simulation card contains all simulation parameters:

# Sample runcard
config = input const       # Configuration type
nsteps = 3000             # Number of simulation steps
ninfo = 5                 # Output frequency
LX = 64                   # System size in X direction
LY = 64                   # System size in Y direction
LZ = 40                   # System size in Z direction
nsubsteps = 10            # Number of substeps per step
bc = 2                    # Boundary conditions (0=periodic, 1=no-flux, 2=periodic in xy, no-flux in z)
margin = 18               # Margin size
relax-time = 0            # Relaxation time
nphases = 4               # Number of phases/cells
gamma = 0.008             # Surface tension parameter
mu = 45.0                 # Chemical potential difference
lambda = 3.0              # Lagrange multiplier for volume constraint
kappa_cc = 0.5            # Bending rigidity
R = 8.0                   # Preferred cell radius
xi = 1.0                  # Friction coefficient
omega_cc = 0.0008         # Activity parameter
wall-thickness = 7.0      # Wall thickness for boundary conditions

Key Parameters:

  • LX, LY, LZ: Define the 3D simulation box dimensions
  • nphases: Number of individual cells/droplets in the system
  • gamma: Controls surface tension between cells and medium
  • mu: Chemical potential driving phase separation
  • R: Sets preferred/equilibrium cell radius
  • omega_cc: Activity parameter determining self-propulsion strength

Input Structure (input_str.dat)

Defines initial cell positions (one line per cell):

x_center y_center z_center

Example:

8 8 11      # Cell 1 at position (8,8,11)
24 8 11     # Cell 2 at position (24,8,11)
24 24 11    # Cell 3 at position (24,24,11)
8 24 11     # Cell 4 at position (8,24,11)

πŸ—οΈ Code Structure

celadro_three_dimensional/
β”œβ”€β”€ src/                    # Source code
β”‚   β”œβ”€β”€ main.cpp           # Main program and algorithm
β”‚   β”œβ”€β”€ header.hpp         # Common includes and definitions
β”‚   β”œβ”€β”€ model.hpp          # Core model definitions
β”‚   β”œβ”€β”€ options.cpp        # Command line option parsing
β”‚   β”œβ”€β”€ init.cpp           # Initialization routines
β”‚   β”œβ”€β”€ run.cpp            # Main simulation loop
β”‚   β”œβ”€β”€ files.cpp          # File I/O operations
β”‚   β”œβ”€β”€ write.cpp          # Output writing functions
β”‚   β”œβ”€β”€ serialization.cpp  # Data serialization
β”‚   β”œβ”€β”€ threads.cpp        # Threading utilities
β”‚   β”œβ”€β”€ random.cpp         # Random number generation
β”‚   β”œβ”€β”€ vec.hpp            # Vector operations
β”‚   β”œβ”€β”€ tools.hpp          # Utility functions
β”‚   β”œβ”€β”€ derivatives.hpp    # Numerical derivatives
β”‚   β”œβ”€β”€ stencil.hpp        # Finite difference stencils
β”‚   └── error_msg.hpp      # Error handling
β”œβ”€β”€ example/               # Example simulations and scripts
β”‚   β”œβ”€β”€ simCard.dat       # Sample simulation parameters
β”‚   β”œβ”€β”€ input_str.dat     # Sample initial configuration
β”‚   β”œβ”€β”€ createInput.cpp   # C++ input generation utility
β”‚   β”œβ”€β”€ createInput.py    # Python input generation utility
β”‚   β”œβ”€β”€ vtk_VolRender.py  # VTK visualization script
β”‚   └── celadro_3D_scripts_final/ # Analysis and plotting tools
β”œβ”€β”€ build/                 # Build directory
β”œβ”€β”€ CMakeLists.txt        # CMake configuration
β”œβ”€β”€ config.gif            # Example output visualization
└── README.md             # This file

Core Components:

  • Phase-field solver: Implements Cahn-Hilliard dynamics with activity
  • Finite difference methods: High-order stencils for spatial derivatives
  • Multi-threading support: Parallel execution for performance
  • Flexible I/O: JSON and VTK output formats
  • Command-line interface: Extensive parameter control

βš™οΈ Command Line Options

Get complete list of options:

../build/celadro -h

Common usage patterns:

# Basic run
../build/celadro simCard.dat

# Specify output directory
../build/celadro simCard.dat --output=results/

# Compressed output
../build/celadro simCard.dat --compress-full

# Override parameters
../build/celadro simCard.dat --nsteps=5000 --gamma=0.01

πŸ“Š Output Files

The simulation generates several output files:

  • config_XXXX.json: Cell configurations at different time steps
  • config_XXXX.vtk: VTK format for visualization
  • log files: Simulation progress and diagnostics

🎨 Visualization

Using ParaView

  1. Load the generated .vtk files
  2. Apply appropriate filters and coloring
  3. Create animations and visualizations

Using Python Scripts

cd example
python vtk_VolRender.py  # Run VTK-based visualization

Analysis Scripts

The example/celadro_3D_scripts_final/ directory contains:

  • plotting utilities: Generate publication-quality figures
  • data analysis: Extract physical quantities
  • animation tools: Create movies from simulation data

πŸ“š Physics Background

CELADRO-3D implements a phase-field model where each cell is represented as a distinct phase with:

  • Surface tension: Controlled by parameter gamma
  • Volume conservation: Each cell maintains approximately constant volume
  • Self-propulsion: Active forces drive cell motility
  • Cell-cell interactions: Repulsive forces prevent overlap
  • Environmental coupling: Cells respond to substrate and boundaries

The governing equations combine:

  • Cahn-Hilliard dynamics for phase evolution
  • Active matter forces for self-propulsion
  • Mechanical constraints for volume conservation

πŸ”¬ Applications

CELADRO-3D has been used to study:

  • Collective cell migration
  • Tissue morphogenesis
  • Cell sorting and pattern formation
  • Effects of confinement on cell behavior
  • Active matter phase transitions

πŸ“– References

Primary Publications:

@article{monfared2023elife,
  title={Active vertex model for epithelial cell dynamics},
  author={Monfared, Siavash and others},
  journal={eLife},
  volume={12},
  pages={e82435},
  year={2023},
  doi={10.7554/eLife.82435}
}

@article{monfared2022arxiv,
  title={Three-dimensional active vertex model for epithelial tissue morphogenesis},
  author={Monfared, Siavash and others},
  journal={arXiv preprint arXiv:2210.08112},
  year={2022},
  doi={10.48550/arXiv.2210.08112}
}

@article{mueller2019prl,
  title={Emergence of Active Nematic Behavior in Monolayers of Isotropic Cells},
  author={Mueller, Romain and others},
  journal={Physical Review Letters},
  volume={122},
  pages={048004},
  year={2019},
  doi={10.1103/PhysRevLett.122.048004}
}

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

πŸ‘₯ Authors

  • Siavash Monfared - Primary developer (2020-2021)
  • Romain Mueller - Original framework (2016-2017)

πŸ“§ Contact

For questions and support, please open an issue on GitHub or contact the authors through their institutional affiliations.


CELADRO-3D: Advancing our understanding of collective cellular behavior through computational modeling

About

phase-field model for active matter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •