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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Run Unit Tests](https://github.com/heberlr/UQ_PhysiCell/actions/workflows/test-examples.yml/badge.svg)](https://github.com/heberlr/UQ_PhysiCell/actions/workflows/test-examples.yml)
[![Documentation Status](https://readthedocs.org/projects/uq-physicell/badge/?version=latest)](https://uq-physicell.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://badge.fury.io/py/uq-physicell.svg?updated=20241106)](https://badge.fury.io/py/uq-physicell)
[![PyPI](https://badge.fury.io/py/uq-physicell.svg?updated=20251110)](https://badge.fury.io/py/uq-physicell)
[![Python](https://img.shields.io/badge/Python-%3E%3D3.10-blue?logo=python&logoColor=green)](https://python.org)

UQ-PhysiCell is a comprehensive framework for performing uncertainty quantification and parameter calibration of PhysiCell models. It provides sophisticated tools for model analysis, calibration, and model selection.
Expand Down
8 changes: 6 additions & 2 deletions doc/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ configfile_ref = config/PhysiCell_settings.xml
numreplicates = 2
parameters = {
'.//save/SVG/enable': 'false',
'.//save/full_data/interval': '360', ".//cell_definitions/cell_definition[@name='macrophage']/phenotype/cell_interactions/live_phagocytosis_rates/phagocytosis_rate[@name='epithelial_infected']": [None, 'mac_phag_rate_infected'], ".//cell_definitions/cell_definition[@name='macrophage']/phenotype/motility/migration_bias": [None, 'mac_motility_bias']}
'.//save/full_data/interval': '360',
".//cell_definitions/cell_definition[@name='macrophage']/phenotype/cell_interactions/live_phagocytosis_rates/phagocytosis_rate[@name='epithelial_infected']": [None, 'mac_phag_rate_infected'],
".//cell_definitions/cell_definition[@name='macrophage']/phenotype/motility/migration_bias": [None, 'mac_motility_bias']}
rulesfile_ref = config/cell_rules.csv
parameters_rules = {'epithelial,virus,increases,transform to epithelial_infected,saturation': [None, 'epi2infected_sat'], 'epithelial,virus,increases,transform to epithelial_infected,half_max': [None, 'epi2infected_hfm']}
parameters_rules = {
'epithelial,virus,increases,transform to epithelial_infected,saturation': [None, 'epi2infected_sat'],
'epithelial,virus,increases,transform to epithelial_infected,half_max': [None, 'epi2infected_hfm']}
```
You can initialize the model structure, print information, and run a simulation as follows:
```python
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Welcome to the UQ-PhysiCell documentation! This project provides uncertainty quantification tools for PhysiCell models.

**Release:** [v1.2.1](https://github.com/heberlr/UQ_PhysiCell/releases/tag/v1.2.1)
**Release:** [v1.2.2 (GitHub link)](https://github.com/heberlr/UQ_PhysiCell/releases/tag/v1.2.2 (GitHub link))

```{note}
This readthedocs documentation is under active development.
Expand Down
2 changes: 1 addition & 1 deletion doc/rebuild_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ VERSION=$(python -c "try:
except ImportError:
print('unknown')
")
VERSION_STR="v$VERSION"
VERSION_STR="v$VERSION (GitHub link)"
VERSION_REF="https://github.com/heberlr/UQ_PhysiCell/releases/tag/$VERSION_STR"
print_status "Building documentation for UQ-PhysiCell version: $VERSION"

Expand Down
37 changes: 8 additions & 29 deletions examples/ex1_print.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"metadata": {},
"outputs": [],
"source": [
"from uq_physicell import PhysiCell_Model"
"from uq_physicell import PhysiCell_Model, get_physicell"
]
},
{
Expand All @@ -44,6 +44,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"PhysiCell already exists at: PhysiCell-master\n",
"Skipping download. Use force_download=True to override.\n",
"Compiling PhysiCell model: ./PhysiCell-master/virus-sample...\n",
"PhysiCell path: PhysiCell-master\n",
"Model path: PhysiCell-master/sample_projects/virus_macrophage\n",
Expand All @@ -54,34 +56,8 @@
"cp ./user_projects/../sample_projects/virus_macrophage/Makefile .\n",
"cp ./user_projects/../sample_projects/virus_macrophage/config/* ./config/ \n",
"cp ./user_projects/../sample_projects/virus_macrophage/custom_modules/* ./custom_modules/ \n",
"g++-14 -march=native -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -c ./custom_modules/custom.cpp\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"clang: warning: overriding deployment version from '16.0' to '26.0' [-Woverriding-deployment-version]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"g++-14 -march=native -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -o virus-sample BioFVM_vector.o BioFVM_mesh.o BioFVM_microenvironment.o BioFVM_solvers.o BioFVM_matlab.o BioFVM_utilities.o BioFVM_basic_agent.o BioFVM_MultiCellDS.o BioFVM_agent_container.o pugixml.o PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_signal_behavior.o PhysiCell_rules.o PhysiCell_basic_signaling.o PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o custom.o main.cpp \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"clang: warning: overriding deployment version from '16.0' to '26.0' [-Woverriding-deployment-version]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"/opt/homebrew/bin/g++-15 -march=native -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -c ./custom_modules/custom.cpp\n",
"/opt/homebrew/bin/g++-15 -march=native -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -o virus-sample BioFVM_vector.o BioFVM_mesh.o BioFVM_microenvironment.o BioFVM_solvers.o BioFVM_matlab.o BioFVM_utilities.o BioFVM_basic_agent.o BioFVM_MultiCellDS.o BioFVM_agent_container.o pugixml.o PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_signal_behavior.o PhysiCell_rules.o PhysiCell_basic_signaling.o PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o custom.o main.cpp \n",
"make name \n",
"\n",
"Executable name is virus-sample\n",
Expand Down Expand Up @@ -110,6 +86,9 @@
"fileName = \"Model_Struct.ini\" # Configuration file path\n",
"key_model = \"physicell_model\" # Name of model strucure in the config file\n",
"\n",
"# Get PhysiCell, if not exist, it will be downloaded - Alternatively, you can change the paths in the Model_Struct.ini file to a PhysiCell folder on your system.\n",
"get_physicell(target_dir=\".\")\n",
"\n",
"# Generate the model exploration structure physicell_model.\n",
"PhysiCellModel = PhysiCell_Model(fileName, key_model)\n",
"\n",
Expand Down
63 changes: 36 additions & 27 deletions examples/ex2_runModel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"PhysiCell already exists at: PhysiCell-master\n",
"Skipping download. Use force_download=True to override.\n",
"\t> Constructor PhysiCell_Model: physicell_model_2 at Model_Struct.ini...\n",
"\t\t>> Reading config file: Model_Struct.ini ...\n",
"\t\t>> Checking executable format ...\n",
Expand All @@ -38,12 +40,16 @@
}
],
"source": [
"from uq_physicell import PhysiCell_Model\n",
"from uq_physicell import PhysiCell_Model, get_physicell\n",
"from uq_physicell.utils import summ_func_FinalPopLiveDead\n",
"import numpy as np\n",
"\n",
"fileName = \"Model_Struct.ini\"\n",
"key_model = \"physicell_model_2\"\n",
"\n",
"# Get PhysiCell, if not exist, it will be downloaded - Alternatively, you can change the paths in the Model_Struct.ini file to a PhysiCell folder on your system.\n",
"get_physicell(target_dir=\".\")\n",
"\n",
"# Create the structure of model exploration\n",
"PhysiCellModel = PhysiCell_Model(fileName, key_model, verbose=True)"
]
Expand Down Expand Up @@ -74,7 +80,8 @@
"\t\t\t>>> Setting up XML input...\n",
"\t\t\t>>> Generating XML file config2/config_S000000_00.xml ...\n",
"\t\t>> Running model ...\n",
"Registered process 0_0 with PID 77361\n",
"Registered process 0_0 with PID 61436 - running simulation ...\n",
"\t\t>> Simulation completed successfully!\n",
"\t\t>> Removing config files ...\n"
]
}
Expand Down Expand Up @@ -110,9 +117,10 @@
"\t\t\t>>> Setting up XML input...\n",
"\t\t\t>>> Generating XML file config2/config_S000000_00.xml ...\n",
"\t\t>> Running model ...\n",
"Registered process 0_0 with PID 77408\n",
"Registered process 0_0 with PID 61470 - running simulation ...\n",
"\t\t>> Simulation completed successfully!\n",
"\t\t>> Removing config files ...\n",
"\t\t>> Running summary function: <function summ_func_FinalPopLiveDead at 0x11e40b100> ...\n",
"\t\t>> Running summary function: <function summ_func_FinalPopLiveDead at 0x11fac31a0> ...\n",
"\t\t\t>>> Returning summary data ...\n"
]
},
Expand Down Expand Up @@ -155,7 +163,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>20.119688</td>\n",
" <td>20.553828</td>\n",
" <td>0.75</td>\n",
" <td>0.5</td>\n",
" </tr>\n",
Expand All @@ -165,7 +173,7 @@
],
"text/plain": [
" time sampleID replicateID live_cells dead_cells run_time_sec \\\n",
"0 2880.01 0 0 50 0 20.119688 \n",
"0 2880.01 0 0 50 0 20.553828 \n",
"\n",
" viral_replication_rate min_virion_count \n",
"0 0.75 0.5 "
Expand Down Expand Up @@ -206,9 +214,10 @@
"\t\t\t>>> Setting up XML input...\n",
"\t\t\t>>> Generating XML file config2/config_S000001_00.xml ...\n",
"\t\t>> Running model ...\n",
"Registered process 1_0 with PID 78228\n",
"Registered process 1_0 with PID 61500 - running simulation ...\n",
"\t\t>> Simulation completed successfully!\n",
"\t\t>> Removing config files ...\n",
"\t\t>> Running summary function: <function custom_summary_func at 0x14ef62700> ...\n",
"\t\t>> Running summary function: <function custom_summary_func at 0x1557132e0> ...\n",
"\t\t\t>>> Returning summary data ...\n"
]
},
Expand Down Expand Up @@ -251,7 +260,7 @@
" <td>0</td>\n",
" <td>1060</td>\n",
" <td>0</td>\n",
" <td>0.000008</td>\n",
" <td>0.000007</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -260,9 +269,9 @@
" <td>360.0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>50</td>\n",
" <td>72</td>\n",
" <td>0</td>\n",
" <td>5.718475</td>\n",
" <td>5.493968</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -273,7 +282,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>7.785989</td>\n",
" <td>7.771156</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -284,7 +293,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>9.892772</td>\n",
" <td>10.041700</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -295,7 +304,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>12.036282</td>\n",
" <td>12.299380</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -306,7 +315,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>14.214356</td>\n",
" <td>14.533652</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -317,7 +326,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>16.376806</td>\n",
" <td>16.705065</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -328,7 +337,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>18.623699</td>\n",
" <td>18.924461</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -339,7 +348,7 @@
" <td>0</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" <td>20.752024</td>\n",
" <td>21.094291</td>\n",
" <td>0.8</td>\n",
" <td>0.55</td>\n",
" </tr>\n",
Expand All @@ -349,15 +358,15 @@
],
"text/plain": [
" time sampleID replicateID live_cells dead_cells run_time_sec \\\n",
"0 0.0 1 0 1060 0 0.000008 \n",
"1 360.0 1 0 50 0 5.718475 \n",
"2 720.0 1 0 50 0 7.785989 \n",
"3 1080.0 1 0 50 0 9.892772 \n",
"4 1440.0 1 0 50 0 12.036282 \n",
"5 1800.0 1 0 50 0 14.214356 \n",
"6 2160.0 1 0 50 0 16.376806 \n",
"7 2520.0 1 0 50 0 18.623699 \n",
"8 2880.0 1 0 50 0 20.752024 \n",
"0 0.0 1 0 1060 0 0.000007 \n",
"1 360.0 1 0 72 0 5.493968 \n",
"2 720.0 1 0 50 0 7.771156 \n",
"3 1080.0 1 0 50 0 10.041700 \n",
"4 1440.0 1 0 50 0 12.299380 \n",
"5 1800.0 1 0 50 0 14.533652 \n",
"6 2160.0 1 0 50 0 16.705065 \n",
"7 2520.0 1 0 50 0 18.924461 \n",
"8 2880.0 1 0 50 0 21.094291 \n",
"\n",
" viral_replication_rate min_virion_count \n",
"0 0.8 0.55 \n",
Expand Down
Loading