Project to perform uncertainty quantification of PhysiCell models
Project description
Installation
Install the package using pip:
pip install uq_physicell
Examples
Here are some examples to help you get started with the package:
Example 1: Basic Usage
- Description: Print information about two model structures, physicell_model_1 and physicell_model_2, as defined in the config file examples/SampleModel.ini. This operation does not run a PhysiCell simulation. See example 1.
python examples/ex1_print.py
Example 2: Running PhysiCell Simulations
-
Requirements: A PhysiCell folder is required.
-
Description: Run three PhysiCell simulations associated with the key physicell_model_2 in the config file SampleModel.ini. This corresponds to the
virus_macrophageexample inPhysiCell's sample projects. See example 2.- First simulation: Demonstrates running a simulation with a predefined summary function that summarizes the final population of live and dead cells, storing results in a new folder
output2. - Second simulation: Runs the simulation while preserving the config files and retaining the complete PhysiCell output without summarization.
- Third simulation: Configures the execution to summarize the output and returns a DataFrame with the summary.
Run script:
python examples/ex2_runModel.pyAlternatively, download the lastest PhysiCell version with:
bash examples/PhysiCell.shThis will create a folder named
PhysiCell-masterinsideexamples. Populate and compile the project (Step 1 below) without modifying SampleModel.ini.- Step 1: Compile the
virus-macrophageexample in the PhysiCell folder:make reset && make virus-macrophage-sample && make
- Step 2: Update the
executableandconfigFile_refpaths in the physicell_model_2 model in the examples/SampleModel.ini section of SampleModel.ini.executable = [new path] configFile_ref = [new path]
- Step 3: Execute the script:
python examples/ex2_runModel.py
- First simulation: Demonstrates running a simulation with a predefined summary function that summarizes the final population of live and dead cells, storing results in a new folder
Example 3: Customizable Summary Function
- Requirements: A PhysiCell folder is required.
- Description: Run two simulations of physicell_model_2 using a customizable summary function to generate population time series. See example 3.
- First simulation: Runs the simulation while preserving the config files definitions and using a custom summary function.
- Second simulation: Similar to the first, but adjust the model for 4 OpenMP threads and returns a DataFrame instead of a summary file.
- Run script:
python examples/ex3_runModelCust.py
Example 4: Sensitivity Analysis (Single Task)
- Requirements: A PhysiCell folder and the
SALibPython package. - Description: Perform sensitivity analysis using the Sobol method. See example 4.
- Run script:
python examples/ex4_runSA_singleTask.py
Example 5: Sensitivity Analysis (Parallel Tasks with MPI)
- Requirements: A PhysiCell folder, and the
SALibandmpi4pyPython packages. - Description: Perform sensitivity analysis using the Sobol method with MPI. See example 5.
- Run script:
mpiexec -n 2 python -m mpi4py examples/ex5_runSA_MPI.py
Example 6: Sensitivity Analysis with Constrained Parameters (MPI).
- Requirements: A PhysiCell folder (SampleModel.ini assumes it is located in the examples folder) and the
SALibandmpi4pyPython packages. Compile the asymmetric_division example:make reset && make asymmetric-division-sample && make
- Description: Perform sensitivity analysis (Sobol method) with MPI, handling constrained parameters. This example uses the
asymmetric_divisionmodel fromPhysiCell's sample_projectsand includes analyzingparameters of rules. See example 6. - Run script:
mpiexec -n 2 python -m mpi4py examples/ex6_runSA_AsymDiv.py
Feel free to explore these examples to understand the package's capabilities and how to use it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uq_physicell-1.1.1.tar.gz.
File metadata
- Download URL: uq_physicell-1.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49ea07ae743026bb03b6ba7dab7d6ed167628781574b1afcbc78722ffd386761
|
|
| MD5 |
cf6c0a4a50c164da92b02601133bff86
|
|
| BLAKE2b-256 |
3dd15c59d680358f6c2f4598881beee127e83bcd886402ecba6eeecd2be80118
|
File details
Details for the file uq_physicell-1.1.1-py3-none-any.whl.
File metadata
- Download URL: uq_physicell-1.1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1cb7207679fbade05088ec9401e097e22c8c5d0c063f36d46d06d7f04c6fba
|
|
| MD5 |
d43e7592c5ccb73f215c7ce421c74a0f
|
|
| BLAKE2b-256 |
618f41439e3e28ef71f344a947bb23f74ce282cc4a578dfec9b8b9a6fed4f21a
|