Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
- Regex: '^"[^/]+\"'
Priority: 10
- Regex: '^"core/'
Priority: 20
- Regex: '^<'
Priority: 30
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentWidth: 2
Expand Down
9 changes: 8 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ Checks: >
openmp-*
performance-*,
portability-*,
readability-*
readability-*,
-bugprone-easily-swappable-parameters,
-modernize-use-trailing-return-type,
-readability-identifier-length

CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
Expand Down Expand Up @@ -93,8 +96,12 @@ CheckOptions:
value: 'k'
- key: readability-identifier-naming.PrivateMemberPrefix
value: ''
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.ProtectedMemberPrefix
value: ''
- key: readability-identifier-naming.ProtectedMemberSuffix
value: '_'
- key: readability-identifier-naming.PublicMemberCase
value: lower_case
- key: readability-identifier-naming.MethodCase
Expand Down
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,86 @@

# debug information files
*.dwo

build/
output/

**/.DS_Store

#----------------- intellij -----------------
.idea
cx3d-cpp.iml

#----------------- eclipse ------------------
.project
.cproject
.settings/

#----------------- VS Code ------------------
.vscode/*

#----------------- GNU global ------------------
GPATH
GRTAGS
GTAGS

#------------------- C++ --------------------
# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll
*.jnilib

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

#------------------- CMake --------------------
CMakeCache.txt
CMakeFiles
CMakeScripts
Makefile
cmake_install.cmake
install_manifest.txt

#------------------- Doxygen files --------------------
Doxyfile
doc/html
doc/latex

#------------------- Paraview --------------------
*.vtu
*.vti
*.pvtu
*.pvti


#Debugging files
*.csv

# Result files
*.xyz
*.dat

# Draft code for comparing models
draft_code_my_own_analysis/
33 changes: 33 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.19.3)
project(cart_tumor)


# BioDynaMo curretly uses the C++17 standard.
set(CMAKE_CXX_STANDARD 17)

# Use BioDynaMo in this project.
find_package(BioDynaMo REQUIRED)

# See UseBioDynaMo.cmake in your BioDynaMo build folder for details.
# Note that BioDynaMo provides gtest header/libraries in its include/lib dir.
include(${BDM_USE_FILE})

# Consider all files in src/ for BioDynaMo simulation.
include_directories("src")
file(GLOB_RECURSE PROJECT_HEADERS src/*.h)
file(GLOB_RECURSE PROJECT_SOURCES src/*.cc)

bdm_add_executable(${CMAKE_PROJECT_NAME}
HEADERS ${PROJECT_HEADERS}
SOURCES ${PROJECT_SOURCES}
LIBRARIES ${BDM_REQUIRED_LIBRARIES})

# Consider all files in test/ for GoogleTests.
include_directories("test")
file(GLOB_RECURSE TEST_SOURCES test/*.cc)
file(GLOB_RECURSE TEST_HEADERS test/*.h)

bdm_add_test(${CMAKE_PROJECT_NAME}-test
SOURCES ${TEST_SOURCES}
HEADERS ${TEST_HEADERS}
LIBRARIES ${BDM_REQUIRED_LIBRARIES} ${CMAKE_PROJECT_NAME})
131 changes: 130 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,130 @@
# CARTopiaX
# CARTopiaX

This repository provides an **agent-based simulation** of tumour-derived organoids and their interaction with **CAR T-cell therapy**.
Developed as part of Google Summer of Code 2025, the project is released under the **Apache License 2.0**.

The simulation integrates computational modeling and biological insights to explore tumour–immune dynamics and assess treatment outcomes under various scenarios.

---

## Table of Contents

1. [Project Overview](#project-overview)
2. [Dependencies](#dependencies)
3. [Installation](#installation)
4. [Building the Simulation](#building-the-simulation)
5. [Running the Simulation](#running-the-simulation)
6. [Visualizing Results](#results)
7. [Acknowledgments](#acknowledgments)
8. [License](#license)


---

## Project Overview

This project implements an **agent-based model** to simulate the behavior of *tumour-derived organoids* (lab-grown tumour models) and their response to **CAR T-cell therapy**.

With this simulation, researchers can:
- Recreate in vitro conditions for tumour growth.
- Introduce CAR T-cells and analyze their effectiveness in solid tumor microenvironments.
- Explore different treatment strategies and parameter variations.
- Evaluate outcomes such as tumour reduction, elimination, or relapse risk.

By adjusting biological and therapeutic parameters, the model enables **in silico experimentation** to complement laboratory research.

---

## Dependencies

- [BioDynaMo](https://biodynamo.org/) (tested with version 1.05.132)
- CMake ≥ 3.13
- GCC or Clang with C++17 support
- GoogleTest (for unit testing)

**Note:** Ensure BioDynaMo is installed and sourced before running the simulation.

---

## Installation

Clone the repository:
```bash
git clone https://github.com/compiler-research/CARTopiaX.git
cd CARTopiaX

```

---

## Building the Simulation

**Option 1:**
Use BioDynaMo’s build system:
```bash
biodynamo build
```

**Option 2:**
Manual build:
```bash
mkdir build && cd build
cmake ..
make -j <number_of_processes>
```

---

## Running the Simulation

After building, run the simulation using one of the following methods:

**Option 1:**
With BioDynaMo:
```bash
biodynamo run
```

**Option 2:**
Directly from the build directory:
```bash

./build/CARTopiaX
```

---

## Results

Data about tumor growth and diffrent types of cell populations is output in ./output/final_data.csv

To visualize the results in paraview use:
```bash
paraview ./output/CARTopiaX/CARTopiaX.pvsm

```

---

## Acknowledgments

This project builds upon the BioDynaMo simulation framework.

> Lukas Breitwieser, Ahmad Hesam, Jean de Montigny, Vasileios Vavourakis, Alexandros Iosif, Jack Jennings, Marcus Kaiser, Marco Manca, Alberto Di Meglio, Zaid Al-Ars, Fons Rademakers, Onur Mutlu, Roman Bauer.
> *BioDynaMo: a modular platform for high-performance agent-based simulation*.
> Bioinformatics, Volume 38, Issue 2, January 2022, Pages 453–460.
> [https://doi.org/10.1093/bioinformatics/btab649](https://doi.org/10.1093/bioinformatics/btab649)

Some of the mathematical models and solver implementations are based on the research of
Luciana Melina Luque and collaborators, as described in:

> Luque, L.M., Carlevaro, C.M., Rodriguez-Lomba, E. et al.
> *In silico study of heterogeneous tumour-derived organoid response to CAR T-cell therapy*.
> Scientific Reports 14, 12307 (2024).
> [https://doi.org/10.1038/s41598-024-63125-5](https://doi.org/10.1038/s41598-024-63125-5)

---

## License

This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.
14 changes: 14 additions & 0 deletions bdm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[visualization]
export = true
interval = 7200

[[visualize_agent]]
name = "TumorCell"
additional_data_members = [
{name = "diameter_", function = "diameter_"},
{name = "volume_", function = "volume_"},
{name = "cell_type", function = "GetTypeAsInt"}
]

[[visualize_diffusion]]
name = "oxygen"
Loading