Skip to content

Commit 414d1d5

Browse files
salva24vgvassilev
authored andcommitted
Implement tumor replicated including forces and diffusion modules (#6)
All work I have done untill the midterm in reproducing the nature paper.
1 parent b763444 commit 414d1d5

21 files changed

+3359
-8
lines changed

.clang-format

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ DisableFormat: false
4949
ExperimentalAutoDetectBinPacking: false
5050
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
5151
IncludeCategories:
52-
- Regex: '^<.*\.h>'
53-
Priority: 1
54-
- Regex: '^<.*'
55-
Priority: 2
56-
- Regex: '.*'
57-
Priority: 3
52+
- Regex: '^"[^/]+\"'
53+
Priority: 10
54+
- Regex: '^"core/'
55+
Priority: 20
56+
- Regex: '^<'
57+
Priority: 30
5858
IncludeIsMainRegex: '([-_](test|unittest))?$'
5959
IndentCaseLabels: true
6060
IndentWidth: 2

.clang-tidy

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Checks: >
1111
openmp-*
1212
performance-*,
1313
portability-*,
14-
readability-*
14+
readability-*,
15+
-bugprone-easily-swappable-parameters,
16+
-modernize-use-trailing-return-type,
17+
-readability-identifier-length
1518
1619
CheckOptions:
1720
- key: google-readability-braces-around-statements.ShortStatementLines
@@ -93,8 +96,12 @@ CheckOptions:
9396
value: 'k'
9497
- key: readability-identifier-naming.PrivateMemberPrefix
9598
value: ''
99+
- key: readability-identifier-naming.PrivateMemberSuffix
100+
value: '_'
96101
- key: readability-identifier-naming.ProtectedMemberPrefix
97102
value: ''
103+
- key: readability-identifier-naming.ProtectedMemberSuffix
104+
value: '_'
98105
- key: readability-identifier-naming.PublicMemberCase
99106
value: lower_case
100107
- key: readability-identifier-naming.MethodCase

.gitignore

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,86 @@
3939

4040
# debug information files
4141
*.dwo
42+
43+
build/
44+
output/
45+
46+
**/.DS_Store
47+
48+
#----------------- intellij -----------------
49+
.idea
50+
cx3d-cpp.iml
51+
52+
#----------------- eclipse ------------------
53+
.project
54+
.cproject
55+
.settings/
56+
57+
#----------------- VS Code ------------------
58+
.vscode/*
59+
60+
#----------------- GNU global ------------------
61+
GPATH
62+
GRTAGS
63+
GTAGS
64+
65+
#------------------- C++ --------------------
66+
# Compiled Object files
67+
*.slo
68+
*.lo
69+
*.o
70+
*.obj
71+
72+
# Precompiled Headers
73+
*.gch
74+
*.pch
75+
76+
# Compiled Dynamic libraries
77+
*.so
78+
*.dylib
79+
*.dll
80+
*.jnilib
81+
82+
# Fortran module files
83+
*.mod
84+
85+
# Compiled Static libraries
86+
*.lai
87+
*.la
88+
*.a
89+
*.lib
90+
91+
# Executables
92+
*.exe
93+
*.out
94+
*.app
95+
96+
#------------------- CMake --------------------
97+
CMakeCache.txt
98+
CMakeFiles
99+
CMakeScripts
100+
Makefile
101+
cmake_install.cmake
102+
install_manifest.txt
103+
104+
#------------------- Doxygen files --------------------
105+
Doxyfile
106+
doc/html
107+
doc/latex
108+
109+
#------------------- Paraview --------------------
110+
*.vtu
111+
*.vti
112+
*.pvtu
113+
*.pvti
114+
115+
116+
#Debugging files
117+
*.csv
118+
119+
# Result files
120+
*.xyz
121+
*.dat
122+
123+
# Draft code for comparing models
124+
draft_code_my_own_analysis/

CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
cmake_minimum_required(VERSION 3.19.3)
2+
project(cart_tumor)
3+
4+
5+
# BioDynaMo curretly uses the C++17 standard.
6+
set(CMAKE_CXX_STANDARD 17)
7+
8+
# Use BioDynaMo in this project.
9+
find_package(BioDynaMo REQUIRED)
10+
11+
# See UseBioDynaMo.cmake in your BioDynaMo build folder for details.
12+
# Note that BioDynaMo provides gtest header/libraries in its include/lib dir.
13+
include(${BDM_USE_FILE})
14+
15+
# Consider all files in src/ for BioDynaMo simulation.
16+
include_directories("src")
17+
file(GLOB_RECURSE PROJECT_HEADERS src/*.h)
18+
file(GLOB_RECURSE PROJECT_SOURCES src/*.cc)
19+
20+
bdm_add_executable(${CMAKE_PROJECT_NAME}
21+
HEADERS ${PROJECT_HEADERS}
22+
SOURCES ${PROJECT_SOURCES}
23+
LIBRARIES ${BDM_REQUIRED_LIBRARIES})
24+
25+
# Consider all files in test/ for GoogleTests.
26+
include_directories("test")
27+
file(GLOB_RECURSE TEST_SOURCES test/*.cc)
28+
file(GLOB_RECURSE TEST_HEADERS test/*.h)
29+
30+
bdm_add_test(${CMAKE_PROJECT_NAME}-test
31+
SOURCES ${TEST_SOURCES}
32+
HEADERS ${TEST_HEADERS}
33+
LIBRARIES ${BDM_REQUIRED_LIBRARIES} ${CMAKE_PROJECT_NAME})

README.md

Lines changed: 130 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,130 @@
1-
# CARTopiaX
1+
# CARTopiaX
2+
3+
This repository provides an **agent-based simulation** of tumour-derived organoids and their interaction with **CAR T-cell therapy**.
4+
Developed as part of Google Summer of Code 2025, the project is released under the **Apache License 2.0**.
5+
6+
The simulation integrates computational modeling and biological insights to explore tumour–immune dynamics and assess treatment outcomes under various scenarios.
7+
8+
---
9+
10+
## Table of Contents
11+
12+
1. [Project Overview](#project-overview)
13+
2. [Dependencies](#dependencies)
14+
3. [Installation](#installation)
15+
4. [Building the Simulation](#building-the-simulation)
16+
5. [Running the Simulation](#running-the-simulation)
17+
6. [Visualizing Results](#results)
18+
7. [Acknowledgments](#acknowledgments)
19+
8. [License](#license)
20+
21+
22+
---
23+
24+
## Project Overview
25+
26+
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**.
27+
28+
With this simulation, researchers can:
29+
- Recreate in vitro conditions for tumour growth.
30+
- Introduce CAR T-cells and analyze their effectiveness in solid tumor microenvironments.
31+
- Explore different treatment strategies and parameter variations.
32+
- Evaluate outcomes such as tumour reduction, elimination, or relapse risk.
33+
34+
By adjusting biological and therapeutic parameters, the model enables **in silico experimentation** to complement laboratory research.
35+
36+
---
37+
38+
## Dependencies
39+
40+
- [BioDynaMo](https://biodynamo.org/) (tested with version 1.05.132)
41+
- CMake ≥ 3.13
42+
- GCC or Clang with C++17 support
43+
- GoogleTest (for unit testing)
44+
45+
**Note:** Ensure BioDynaMo is installed and sourced before running the simulation.
46+
47+
---
48+
49+
## Installation
50+
51+
Clone the repository:
52+
```bash
53+
git clone https://github.com/compiler-research/CARTopiaX.git
54+
cd CARTopiaX
55+
56+
```
57+
58+
---
59+
60+
## Building the Simulation
61+
62+
**Option 1:**
63+
Use BioDynaMo’s build system:
64+
```bash
65+
biodynamo build
66+
```
67+
68+
**Option 2:**
69+
Manual build:
70+
```bash
71+
mkdir build && cd build
72+
cmake ..
73+
make -j <number_of_processes>
74+
```
75+
76+
---
77+
78+
## Running the Simulation
79+
80+
After building, run the simulation using one of the following methods:
81+
82+
**Option 1:**
83+
With BioDynaMo:
84+
```bash
85+
biodynamo run
86+
```
87+
88+
**Option 2:**
89+
Directly from the build directory:
90+
```bash
91+
92+
./build/CARTopiaX
93+
```
94+
95+
---
96+
97+
## Results
98+
99+
Data about tumor growth and diffrent types of cell populations is output in ./output/final_data.csv
100+
101+
To visualize the results in paraview use:
102+
```bash
103+
paraview ./output/CARTopiaX/CARTopiaX.pvsm
104+
105+
```
106+
107+
---
108+
109+
## Acknowledgments
110+
111+
This project builds upon the BioDynaMo simulation framework.
112+
113+
> 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.
114+
> *BioDynaMo: a modular platform for high-performance agent-based simulation*.
115+
> Bioinformatics, Volume 38, Issue 2, January 2022, Pages 453–460.
116+
> [https://doi.org/10.1093/bioinformatics/btab649](https://doi.org/10.1093/bioinformatics/btab649)
117+
118+
Some of the mathematical models and solver implementations are based on the research of
119+
Luciana Melina Luque and collaborators, as described in:
120+
121+
> Luque, L.M., Carlevaro, C.M., Rodriguez-Lomba, E. et al.
122+
> *In silico study of heterogeneous tumour-derived organoid response to CAR T-cell therapy*.
123+
> Scientific Reports 14, 12307 (2024).
124+
> [https://doi.org/10.1038/s41598-024-63125-5](https://doi.org/10.1038/s41598-024-63125-5)
125+
126+
---
127+
128+
## License
129+
130+
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.

bdm.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[visualization]
2+
export = true
3+
interval = 7200
4+
5+
[[visualize_agent]]
6+
name = "TumorCell"
7+
additional_data_members = [
8+
{name = "diameter_", function = "diameter_"},
9+
{name = "volume_", function = "volume_"},
10+
{name = "cell_type", function = "GetTypeAsInt"}
11+
]
12+
13+
[[visualize_diffusion]]
14+
name = "oxygen"

0 commit comments

Comments
 (0)