From c9a6cecde282a909f4591a8c72b693a059d075f8 Mon Sep 17 00:00:00 2001 From: Daniel Bergman Date: Wed, 15 Jan 2025 13:41:14 -0500 Subject: [PATCH 1/4] more robust macro to check for windows --- modules/PhysiCell_settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/PhysiCell_settings.cpp b/modules/PhysiCell_settings.cpp index d4a25698e..ad4be5f84 100644 --- a/modules/PhysiCell_settings.cpp +++ b/modules/PhysiCell_settings.cpp @@ -349,7 +349,7 @@ bool create_directories(const std::string &path) bool create_directory(const std::string &path) { -#if defined(__MINGW32__) || defined(__MINGW64__) +#if defined(_WIN32) bool success = mkdir(path.c_str()) == 0; #else bool success = mkdir(path.c_str(), 0755) == 0; From eb5e511381c69424fda571cd93c70e5226a79625 Mon Sep 17 00:00:00 2001 From: Heber Lima da Rocha Date: Fri, 31 Jan 2025 16:04:15 -0500 Subject: [PATCH 2/4] first commit --- Makefile | 323 +----- config/PhysiCell_settings.xml | 2009 +++++++++++++++++++++++++++++++-- config/cell_rules.csv | 0 config/cells.csv | 1 + custom_modules/custom.cpp | 214 ++++ custom_modules/custom.h | 92 ++ main.cpp | 254 +++++ 7 files changed, 2512 insertions(+), 381 deletions(-) create mode 100644 config/cell_rules.csv create mode 100644 config/cells.csv create mode 100644 custom_modules/custom.cpp create mode 100644 custom_modules/custom.h create mode 100644 main.cpp diff --git a/Makefile b/Makefile index 5d256d1c3..7aa7d18d2 100644 --- a/Makefile +++ b/Makefile @@ -11,11 +11,24 @@ ifdef PHYSICELL_CPP CC := $(PHYSICELL_CPP) endif +ifndef STATIC_OPENMP + STATIC_OPENMP = -fopenmp +endif + ARCH := native # best auto-tuning # ARCH := core2 # a reasonably safe default for most CPUs since 2007 # ARCH := corei7 +# ARCH := corei7-avx # earlier i7 # ARCH := core-avx-i # i7 ivy bridge or newer # ARCH := core-avx2 # i7 with Haswell or newer +# ARCH := nehalem +# ARCH := westmere +# ARCH := sandybridge # circa 2011 +# ARCH := ivybridge # circa 2012 +# ARCH := haswell # circa 2013 +# ARCH := broadwell # circa 2014 +# ARCH := skylake # circa 2015 +# ARCH := bonnell # ARCH := silvermont # ARCH := skylake-avx512 # ARCH := nocona #64-bit pentium 4 or later @@ -35,7 +48,9 @@ else endif endif -COMPILE_COMMAND := $(CC) $(CFLAGS) +CFLAGS_LINK := $(shell echo $(CFLAGS) | sed -e "s/-fopenmp//g") +COMPILE_COMMAND := $(CC) $(CFLAGS) $(EXTRA_FLAGS) +LINK_COMMAND := $(CC) $(CFLAGS_LINK) $(EXTRA_FLAGS) BioFVM_OBJECTS := 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 @@ -49,284 +64,27 @@ PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o # put your custom objects here (they should be in the custom_modules directory) -PhysiCell_custom_module_OBJECTS := .o +PhysiCell_custom_module_OBJECTS := custom.o pugixml_OBJECTS := pugixml.o PhysiCell_OBJECTS := $(BioFVM_OBJECTS) $(pugixml_OBJECTS) $(PhysiCell_core_OBJECTS) $(PhysiCell_module_OBJECTS) ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) -EXAMPLES := ./examples/PhysiCell_test_mechanics_1.cpp ./examples/PhysiCell_test_mechanics_2.cpp \ - ./examples/PhysiCell_test_DCIS.cpp ./examples/PhysiCell_test_HDS.cpp \ - ./examples/PhysiCell_test_cell_cycle.cpp ./examples/PhysiCell_test_volume.cpp +# compile the project + +all: main.cpp $(ALL_OBJECTS) + $(COMPILE_COMMAND) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp + make name -all: - make heterogeneity-sample - make +static: main.cpp $(ALL_OBJECTS) $(MaBoSS) + $(LINK_COMMAND) $(INC) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp $(LIB) -static-libgcc -static-libstdc++ $(STATIC_OPENMP) name: @echo "" @echo "Executable name is" $(PROGRAM_NAME) @echo "" -# sample projects -list-projects: - @echo "Sample projects: template biorobots-sample cancer-biorobots-sample cancer-immune-sample" - @echo " celltypes3-sample heterogeneity-sample pred-prey-farmer virus-macrophage-sample" - @echo " worm-sample interaction-sample mechano-sample rules-sample physimess-sample custom-division-sample" - @echo " asymmetric-division-sample immune-function-sample episode-sample" - @echo "" - @echo "Sample intracellular projects: template_BM ode-energy-sample physiboss-cell-lines-sample" - @echo " cancer-metabolism-sample physiboss-tutorial physiboss-tutorial-invasion" - @echo "" - -template: - cp -r ./sample_projects/template/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/template/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/template/Makefile . - cp -r ./sample_projects/template/config/* ./config - -# sample projects - -# ---- non-intracellular projects -biorobots-sample: - cp ./sample_projects/biorobots/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/biorobots/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/biorobots/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/biorobots/config/* ./config/ - -cancer-biorobots-sample: - cp ./sample_projects/cancer_biorobots/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/cancer_biorobots/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/cancer_biorobots/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/cancer_biorobots/config/* ./config/ - -cancer-immune-sample: - cp ./sample_projects/cancer_immune/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/cancer_immune/main-cancer_immune_3D.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/cancer_immune/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/cancer_immune/config/* ./config/ - -celltypes3-sample: - cp ./sample_projects/celltypes3/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/celltypes3/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/celltypes3/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/celltypes3/config/* ./config/ - -heterogeneity-sample: - cp ./sample_projects/heterogeneity/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/heterogeneity/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/heterogeneity/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/heterogeneity/config/* ./config/ - -pred-prey-farmer: - cp ./sample_projects/pred_prey_farmer/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/pred_prey_farmer/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/pred_prey_farmer/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/pred_prey_farmer/config/* ./config/ - -virus-macrophage-sample: - cp ./sample_projects/virus_macrophage/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/virus_macrophage/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/virus_macrophage/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/virus_macrophage/config/* ./config/ - -worm-sample: - cp ./sample_projects/worm/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/worm/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/worm/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/worm/config/* ./config/ - -interaction-sample: - cp ./sample_projects/interactions/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/interactions/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/interactions/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/interactions/config/* ./config/ - -mechano-sample: - cp ./sample_projects/mechano/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/mechano/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/mechano/Makefile . - cp ./sample_projects/mechano/config/* ./config/ - -rules-sample: - cp ./sample_projects/rules_sample/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/rules_sample/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/rules_sample/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects/rules_sample/config/* ./config/ - -physimess-sample: - cp ./sample_projects/physimess/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/physimess/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/physimess/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects/physimess/config/* ./config/ - -custom-division-sample: - cp -r ./sample_projects/custom_division/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/custom_division/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/custom_division/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects/custom_division/config/* ./config/ - -asymmetric-division-sample: - cp -r ./sample_projects/asymmetric_division/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/asymmetric_division/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/asymmetric_division/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects/asymmetric_division/config/* ./config/ - -immune-function-sample: - cp -r ./sample_projects/immune_function/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/immune_function/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/immune_function/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects/immune_function/config/* ./config/ - -episode-sample: - cp -r ./sample_projects/episode/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects/episode/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects/episode/Makefile . - cp -r ./sample_projects/episode/config/* ./config - -# ---- intracellular projects -ode-energy-sample: - cp ./sample_projects_intracellular/ode/ode_energy/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/ode/ode_energy/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/ode/ode_energy/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects_intracellular/ode/ode_energy/config/* ./config/ - -physiboss-cell-lines-sample: - cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/config/* ./config/ - -physiboss-tutorial: - cp ./sample_projects_intracellular/boolean/tutorial/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/boolean/tutorial/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/boolean/tutorial/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects_intracellular/boolean/tutorial/config/* ./config/ - -physiboss-tutorial-invasion: - cp ./sample_projects_intracellular/boolean/cancer_invasion/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/boolean/cancer_invasion/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/boolean/cancer_invasion/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects_intracellular/boolean/cancer_invasion/config/* ./config/ - -ecoli-acetic-switch-sample: - cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/main_ecoli_acetic_switch.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/Makefile ./ - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/config/* ./config/ - -cancer-metabolism-sample: - cp ./sample_projects_intracellular/fba/cancer_metabolism/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/fba/cancer_metabolism/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/fba/cancer_metabolism/Makefile ./ - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp ./sample_projects_intracellular/fba/cancer_metabolism/config/* ./config/ - -template_BM: - cp ./sample_projects_intracellular/boolean/template_BM/custom_modules/* ./custom_modules/ - touch main.cpp && cp main.cpp main-backup.cpp - cp ./sample_projects_intracellular/boolean/template_BM/main.cpp ./main.cpp - cp Makefile Makefile-backup - cp ./sample_projects_intracellular/boolean/template_BM/Makefile . - cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml - cp -r ./sample_projects_intracellular/boolean/template_BM/config/* ./config/ - mkdir ./scripts/ - cp ./sample_projects_intracellular/boolean/template_BM/scripts/* ./scripts/ - -# early examples for convergence testing - -physicell_test_mech1: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_1.cpp - $(COMPILE_COMMAND) -o test_mech1 $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_1.cpp - -physicell_test_mech2: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_2.cpp - $(COMPILE_COMMAND) -o test_mech2 $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_2.cpp - -physicell_test_DCIS: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_DCIS.cpp - $(COMPILE_COMMAND) -o test_DCIS $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_DCIS.cpp - -physicell_test_HDS: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_HDS.cpp - $(COMPILE_COMMAND) -o test_HDS $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_HDS.cpp - -physicell_test_cell_cycle: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_cell_cycle.cpp - $(COMPILE_COMMAND) -o test_cycle $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_cell_cycle.cpp - -PhysiCell_test_volume: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_volume.cpp - $(COMPILE_COMMAND) -o test_volume $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_volume.cpp - -examples: $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_mech1 ./examples/PhysiCell_test_mechanics_1.cpp $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_mech2 ./examples/PhysiCell_test_mechanics_2.cpp $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_DCIS ./examples/PhysiCell_test_DCIS.cpp $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_HDS ./examples/PhysiCell_test_HDS.cpp $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_cycle ./examples/PhysiCell_test_cell_cycle.cpp $(PhysiCell_OBJECTS) - $(COMPILE_COMMAND) -o ./examples/test_volume ./examples/PhysiCell_test_volume.cpp $(PhysiCell_OBJECTS) - # PhysiCell core components PhysiCell_phenotype.o: ./core/PhysiCell_phenotype.cpp @@ -355,7 +113,7 @@ PhysiCell_constants.o: ./core/PhysiCell_constants.cpp PhysiCell_signal_behavior.o: ./core/PhysiCell_signal_behavior.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_signal_behavior.cpp - + PhysiCell_rules.o: ./core/PhysiCell_rules.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_rules.cpp @@ -404,34 +162,37 @@ PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp PhysiCell_various_outputs.o: ./modules/PhysiCell_various_outputs.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_various_outputs.cpp - + PhysiCell_pugixml.o: ./modules/PhysiCell_pugixml.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_pugixml.cpp PhysiCell_settings.o: ./modules/PhysiCell_settings.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_settings.cpp + $(COMPILE_COMMAND) -c ./modules/PhysiCell_settings.cpp PhysiCell_basic_signaling.o: ./core/PhysiCell_basic_signaling.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_basic_signaling.cpp - + $(COMPILE_COMMAND) -c ./core/PhysiCell_basic_signaling.cpp + PhysiCell_geometry.o: ./modules/PhysiCell_geometry.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_geometry.cpp - + # user-defined PhysiCell modules +custom.o: ./custom_modules/custom.cpp + $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp + # cleanup reset: - rm -f *.cpp PhysiCell_cell.o + rm -f *.cpp cp ./sample_projects/Makefile-default Makefile - rm -rf ./custom_modules/* + rm -f ./custom_modules/* touch ./custom_modules/empty.txt touch ALL_CITATIONS.txt touch ./core/PhysiCell_cell.cpp rm ALL_CITATIONS.txt cp ./config/PhysiCell_settings-backup.xml ./config/PhysiCell_settings.xml touch ./config/empty.csv - rm ./config/*.csv + rm -f ./config/*.csv clean: rm -f *.o @@ -441,9 +202,9 @@ data-cleanup: rm -rf ./output mkdir ./output touch ./output/empty.txt - + # archival - + checkpoint: zip -r $$(date +%b_%d_%Y_%H%M).zip Makefile *.cpp *.h config/*.xml custom_modules/* @@ -528,15 +289,15 @@ save: cp main.cpp ./user_projects/$(PROJ) cp Makefile ./user_projects/$(PROJ) cp VERSION.txt ./user_projects/$(PROJ) - cp -r ./config/* ./user_projects/$(PROJ)/config - cp -r ./custom_modules/* ./user_projects/$(PROJ)/custom_modules + cp ./config/* ./user_projects/$(PROJ)/config + cp ./custom_modules/* ./user_projects/$(PROJ)/custom_modules load: echo "Loading project from $(PROJ) ... " cp ./user_projects/$(PROJ)/main.cpp . cp ./user_projects/$(PROJ)/Makefile . - cp -r ./user_projects/$(PROJ)/config/* ./config/ - cp -r ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/ + cp ./user_projects/$(PROJ)/config/* ./config/ + cp ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/ pack: @echo " " diff --git a/config/PhysiCell_settings.xml b/config/PhysiCell_settings.xml index e3cd03b4a..72970bf80 100644 --- a/config/PhysiCell_settings.xml +++ b/config/PhysiCell_settings.xml @@ -14,7 +14,7 @@ - 14400 + 2880 min micron 0.01 @@ -35,6 +35,12 @@ 60 true + + debris + YlOrRd + 0 + 1 + false @@ -44,29 +50,15 @@ false true + false + 0 - + 100000.0 - 0.1 - - 38 - 0 - - 38 - 10 - 10 - 38 - 0 - 0 - - - - - 10 - .1 + 10 0 0 @@ -79,20 +71,132 @@ 0 - + - 10 - 0.1 + 0.0 + 0.0 - 0 - 0 + 0.0 + 0.0 - 0 - 0 - 0 - 0 - 0 - 0 + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + + + + + + 0.0 + 0.0 + + 0.0 + 0.0 + + + + + + + @@ -108,19 +212,31 @@ - + - - - 0.000 - + + + 245.32200 + 555.78600 + 584.89200 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1.0 + 5.31667e-05 - - 516 - + + 0.001938 + 0.05 0 @@ -131,17 +247,17 @@ - 2.80E-03 - - 0 - 86400 - + 0.0 + + 9000000000.0 + 1.15741e-05 + - 1.11667e-2 + 1.11667e-02 8.33333e-4 - 5.33333e-5 - 2.16667e-3 - 0 + 5.33333e-05 + 2.16667e-4 + 7e-05 2.0 @@ -153,119 +269,1812 @@ 0.05 0.0045 0.0055 - 0 - 0 - 2.0 + 0.0 + 0.0 + 2 0.4 10.0 1.25 - 1 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 1.8 15.12 - 4.0 - 10.0 0.01 0.0 0.0 + 12 - 1 - 1 - .5 + 1.0 + 1.0 + 0.0 false true false - oxygen + debris 1 false false - 0.0 - 0.0 - 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - - 0 - 1 - 10 - 0 + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 - + 0.0 - 1 + 1.0 0.0 0.0 - + 0.0 - 1 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 0.0 0.0 - 0 + 0.0 + 0.0 + 0.0 - 0 - 0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 0 - 0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 1 + 1.0 + 0.1 - 0 - 0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 0 - 0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 1.0 + + + Volume + 4 + 2 + 100000 + + + apoptosis + 1e-6 + 1e-2 + + - - - - - ./config - cells.csv - - - - - - - ./config - cell_rules_v2.csv - - - - - + + + + + 0 + 0.00208 + 0.00333 + + + 1.0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.0 + + true + true + + false + debris + 1 + + + false + false + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 1.0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.0 + + true + true + + false + debris + 1 + + + true + true + + 1.0 + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 0 + 1.0 + 0 + 0 + 0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.5 + + true + true + + false + debris + 1 + + + true + false + + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 0 + 0 + 1.0 + 0 + 0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.7 + + true + true + + false + debris + 1 + + + true + false + + 1.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 0 + 0 + 0 + 1.0 + 0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.0 + + false + true + + false + debris + 1 + + + false + false + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 0 + 0 + 0 + 0 + 1.0 + 0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.0 + + true + true + + false + debris + 1 + + + false + false + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + 308.64198 + 480.76923 + 300.30030 + + + 0 + 0 + 0 + 0 + 0 + 0 + 1.0 + 0 + + + + + 5.31667e-05 + + 0.001938 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 9000000000.0 + 1.15741e-05 + + + 1.11667e-02 + 8.33333e-4 + 5.33333e-05 + 2.16667e-4 + 7e-05 + 2.0 + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0.0 + 0.0 + 2 + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 0.01 + 0.0 + 0.0 + 12 + + + 1.0 + 1.0 + 0.0 + + true + true + + false + debris + 1 + + + false + false + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + 0.0 + 1.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 1.0 + 0.1 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + + + + 0.0 + + + + + + + + + ./config + cells.csv + + + + + + + ./config + cell_rules.csv + + + + - 0 - 0 + 12 \ No newline at end of file diff --git a/config/cell_rules.csv b/config/cell_rules.csv new file mode 100644 index 000000000..e69de29bb diff --git a/config/cells.csv b/config/cells.csv new file mode 100644 index 000000000..734bdc767 --- /dev/null +++ b/config/cells.csv @@ -0,0 +1 @@ +0,0,0,0 \ No newline at end of file diff --git a/custom_modules/custom.cpp b/custom_modules/custom.cpp new file mode 100644 index 000000000..59b23bd93 --- /dev/null +++ b/custom_modules/custom.cpp @@ -0,0 +1,214 @@ +/* +############################################################################### +# If you use PhysiCell in your project, please cite PhysiCell and the version # +# number, such as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# See VERSION.txt or call get_PhysiCell_version() to get the current version # +# x.y.z. Call display_citations() to get detailed information on all cite-# +# able software used in your PhysiCell application. # +# # +# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # +# as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # +# with BioFVM [2] to solve the transport equations. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # +# llelized diffusive transport solver for 3-D biological simulations, # +# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # +# # +############################################################################### +# # +# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # +# # +# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # +# All rights reserved. # +# # +# Redistribution and use in source and binary forms, with or without # +# modification, are permitted provided that the following conditions are met: # +# # +# 1. Redistributions of source code must retain the above copyright notice, # +# this list of conditions and the following disclaimer. # +# # +# 2. Redistributions in binary form must reproduce the above copyright # +# notice, this list of conditions and the following disclaimer in the # +# documentation and/or other materials provided with the distribution. # +# # +# 3. Neither the name of the copyright holder nor the names of its # +# contributors may be used to endorse or promote products derived from this # +# software without specific prior written permission. # +# # +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # +# POSSIBILITY OF SUCH DAMAGE. # +# # +############################################################################### +*/ + +#include "./custom.h" + +void create_cell_types( void ) +{ + // set the random seed + if (parameters.ints.find_index("random_seed") != -1) + { + SeedRandom(parameters.ints("random_seed")); + } + + /* + Put any modifications to default cell definition here if you + want to have "inherited" by other cell types. + + This is a good place to set default functions. + */ + + initialize_default_cell_definition(); + cell_defaults.phenotype.secretion.sync_to_microenvironment( µenvironment ); + + cell_defaults.functions.volume_update_function = standard_volume_update_function; + cell_defaults.functions.update_velocity = standard_update_cell_velocity; + + cell_defaults.functions.update_migration_bias = NULL; + cell_defaults.functions.update_phenotype = NULL; // update_cell_and_death_parameters_O2_based; + cell_defaults.functions.custom_cell_rule = NULL; + cell_defaults.functions.contact_function = NULL; + + cell_defaults.functions.add_cell_basement_membrane_interactions = NULL; + cell_defaults.functions.calculate_distance_to_membrane = NULL; + + /* + This parses the cell definitions in the XML config file. + */ + + initialize_cell_definitions_from_pugixml(); + + /* + This builds the map of cell definitions and summarizes the setup. + */ + + build_cell_definitions_maps(); + + /* + This intializes cell signal and response dictionaries + */ + + setup_signal_behavior_dictionaries(); + + /* + Cell rule definitions + */ + + setup_cell_rules(); + + /* + Put any modifications to individual cell definitions here. + + This is a good place to set custom functions. + */ + + cell_defaults.functions.update_phenotype = phenotype_function; + cell_defaults.functions.custom_cell_rule = custom_function; + cell_defaults.functions.contact_function = contact_function; + + /* + This builds the map of cell definitions and summarizes the setup. + */ + + display_cell_definitions( std::cout ); + + return; +} + +void setup_microenvironment( void ) +{ + // set domain parameters + + // put any custom code to set non-homogeneous initial conditions or + // extra Dirichlet nodes here. + + // initialize BioFVM + + initialize_microenvironment(); + + return; +} + +void setup_tissue( void ) +{ + double Xmin = microenvironment.mesh.bounding_box[0]; + double Ymin = microenvironment.mesh.bounding_box[1]; + double Zmin = microenvironment.mesh.bounding_box[2]; + + double Xmax = microenvironment.mesh.bounding_box[3]; + double Ymax = microenvironment.mesh.bounding_box[4]; + double Zmax = microenvironment.mesh.bounding_box[5]; + + if( default_microenvironment_options.simulate_2D == true ) + { + Zmin = 0.0; + Zmax = 0.0; + } + + double Xrange = Xmax - Xmin; + double Yrange = Ymax - Ymin; + double Zrange = Zmax - Zmin; + + // create some of each type of cell + + Cell* pC; + + for( int k=0; k < cell_definitions_by_index.size() ; k++ ) + { + Cell_Definition* pCD = cell_definitions_by_index[k]; + std::cout << "Placing cells of type " << pCD->name << " ... " << std::endl; + for( int n = 0 ; n < parameters.ints("number_of_cells") ; n++ ) + { + std::vector position = {0,0,0}; + position[0] = Xmin + UniformRandom()*Xrange; + position[1] = Ymin + UniformRandom()*Yrange; + position[2] = Zmin + UniformRandom()*Zrange; + + pC = create_cell( *pCD ); + pC->assign_position( position ); + } + } + std::cout << std::endl; + + // load cells from your CSV file (if enabled) + load_cells_from_pugixml(); + set_parameters_from_distributions(); + + return; +} + +std::vector my_coloring_function( Cell* pCell ) +{ return paint_by_number_cell_coloring(pCell); } + +void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ) +{ return; } + +void custom_function( Cell* pCell, Phenotype& phenotype , double dt ) +{ return; } + +void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ) +{ return; } \ No newline at end of file diff --git a/custom_modules/custom.h b/custom_modules/custom.h new file mode 100644 index 000000000..0e6df8d02 --- /dev/null +++ b/custom_modules/custom.h @@ -0,0 +1,92 @@ +/* +############################################################################### +# If you use PhysiCell in your project, please cite PhysiCell and the version # +# number, such as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# See VERSION.txt or call get_PhysiCell_version() to get the current version # +# x.y.z. Call display_citations() to get detailed information on all cite-# +# able software used in your PhysiCell application. # +# # +# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # +# as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # +# with BioFVM [2] to solve the transport equations. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # +# llelized diffusive transport solver for 3-D biological simulations, # +# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # +# # +############################################################################### +# # +# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # +# # +# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # +# All rights reserved. # +# # +# Redistribution and use in source and binary forms, with or without # +# modification, are permitted provided that the following conditions are met: # +# # +# 1. Redistributions of source code must retain the above copyright notice, # +# this list of conditions and the following disclaimer. # +# # +# 2. Redistributions in binary form must reproduce the above copyright # +# notice, this list of conditions and the following disclaimer in the # +# documentation and/or other materials provided with the distribution. # +# # +# 3. Neither the name of the copyright holder nor the names of its # +# contributors may be used to endorse or promote products derived from this # +# software without specific prior written permission. # +# # +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # +# POSSIBILITY OF SUCH DAMAGE. # +# # +############################################################################### +*/ + +#include "../core/PhysiCell.h" +#include "../modules/PhysiCell_standard_modules.h" + +using namespace BioFVM; +using namespace PhysiCell; + +// setup functions to help us along + +void create_cell_types( void ); +void setup_tissue( void ); + +// set up the BioFVM microenvironment +void setup_microenvironment( void ); + +// custom pathology coloring function + +std::vector my_coloring_function( Cell* ); + +// custom functions can go here + +void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ); +void custom_function( Cell* pCell, Phenotype& phenotype , double dt ); + +void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ); + diff --git a/main.cpp b/main.cpp new file mode 100644 index 000000000..bf6e65d15 --- /dev/null +++ b/main.cpp @@ -0,0 +1,254 @@ +/* +############################################################################### +# If you use PhysiCell in your project, please cite PhysiCell and the version # +# number, such as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# See VERSION.txt or call get_PhysiCell_version() to get the current version # +# x.y.z. Call display_citations() to get detailed information on all cite-# +# able software used in your PhysiCell application. # +# # +# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # +# as below: # +# # +# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # +# with BioFVM [2] to solve the transport equations. # +# # +# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # +# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # +# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # +# DOI: 10.1371/journal.pcbi.1005991 # +# # +# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # +# llelized diffusive transport solver for 3-D biological simulations, # +# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # +# # +############################################################################### +# # +# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # +# # +# Copyright (c) 2015-2022, Paul Macklin and the PhysiCell Project # +# All rights reserved. # +# # +# Redistribution and use in source and binary forms, with or without # +# modification, are permitted provided that the following conditions are met: # +# # +# 1. Redistributions of source code must retain the above copyright notice, # +# this list of conditions and the following disclaimer. # +# # +# 2. Redistributions in binary form must reproduce the above copyright # +# notice, this list of conditions and the following disclaimer in the # +# documentation and/or other materials provided with the distribution. # +# # +# 3. Neither the name of the copyright holder nor the names of its # +# contributors may be used to endorse or promote products derived from this # +# software without specific prior written permission. # +# # +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # +# POSSIBILITY OF SUCH DAMAGE. # +# # +############################################################################### +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "./core/PhysiCell.h" +#include "./modules/PhysiCell_standard_modules.h" + +// put custom code modules here! + +#include "./custom_modules/custom.h" + +using namespace BioFVM; +using namespace PhysiCell; + +int main( int argc, char* argv[] ) +{ + // load and parse settings file(s) + + bool XML_status = false; + char copy_command [1024]; + if( argc > 1 ) + { + XML_status = load_PhysiCell_config_file( argv[1] ); + sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() ); + } + else + { + XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" ); + sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() ); + } + if( !XML_status ) + { exit(-1); } + + // copy config file to output directry + system( copy_command ); + + // OpenMP setup + omp_set_num_threads(PhysiCell_settings.omp_num_threads); + + // time setup + std::string time_units = "min"; + + /* Microenvironment setup */ + + setup_microenvironment(); // modify this in the custom code + + /* PhysiCell setup */ + + // set mechanics voxel size, and match the data structure to BioFVM + double mechanics_voxel_size = 30; + Cell_Container* cell_container = create_cell_container_for_microenvironment( microenvironment, mechanics_voxel_size ); + + /* Users typically start modifying here. START USERMODS */ + + create_cell_types(); + + setup_tissue(); + + /* Users typically stop modifying here. END USERMODS */ + + // set MultiCellDS save options + + set_save_biofvm_mesh_as_matlab( true ); + set_save_biofvm_data_as_matlab( true ); + set_save_biofvm_cell_data( true ); + set_save_biofvm_cell_data_as_custom_matlab( true ); + + // save a simulation snapshot + + char filename[1024]; + sprintf( filename , "%s/initial" , PhysiCell_settings.folder.c_str() ); + save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); + + // save a quick SVG cross section through z = 0, after setting its + // length bar to 200 microns + + PhysiCell_SVG_options.length_bar = 200; + + // for simplicity, set a pathology coloring function + + std::vector (*cell_coloring_function)(Cell*) = my_coloring_function; + std::string (*substrate_coloring_function)(double, double, double) = paint_by_density_percentage; + + sprintf( filename , "%s/initial.svg" , PhysiCell_settings.folder.c_str() ); + SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function ); + + sprintf( filename , "%s/legend.svg" , PhysiCell_settings.folder.c_str() ); + create_plot_legend( filename , cell_coloring_function ); + + display_citations(); + + // set the performance timers + + BioFVM::RUNTIME_TIC(); + BioFVM::TIC(); + + std::ofstream report_file; + if( PhysiCell_settings.enable_legacy_saves == true ) + { + sprintf( filename , "%s/simulation_report.txt" , PhysiCell_settings.folder.c_str() ); + + report_file.open(filename); // create the data log file + report_file<<"simulated time\tnum cells\tnum division\tnum death\twall time"< PhysiCell_globals.next_full_save_time - 0.5 * diffusion_dt ) + { + display_simulation_status( std::cout ); + if( PhysiCell_settings.enable_legacy_saves == true ) + { + log_output( PhysiCell_globals.current_time , PhysiCell_globals.full_output_index, microenvironment, report_file); + } + + if( PhysiCell_settings.enable_full_saves == true ) + { + sprintf( filename , "%s/output%08u" , PhysiCell_settings.folder.c_str(), PhysiCell_globals.full_output_index ); + + save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); + } + + PhysiCell_globals.full_output_index++; + PhysiCell_globals.next_full_save_time += PhysiCell_settings.full_save_interval; + } + + // save SVG plot if it's time + if( PhysiCell_globals.current_time > PhysiCell_globals.next_SVG_save_time - 0.5 * diffusion_dt ) + { + if( PhysiCell_settings.enable_SVG_saves == true ) + { + sprintf( filename , "%s/snapshot%08u.svg" , PhysiCell_settings.folder.c_str() , PhysiCell_globals.SVG_output_index ); + SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function); + + PhysiCell_globals.SVG_output_index++; + PhysiCell_globals.next_SVG_save_time += PhysiCell_settings.SVG_save_interval; + } + } + + // update the microenvironment + microenvironment.simulate_diffusion_decay( diffusion_dt ); + + // run PhysiCell + ((Cell_Container *)microenvironment.agent_container)->update_all_cells( PhysiCell_globals.current_time ); + + /* + Custom add-ons could potentially go here. + */ + + PhysiCell_globals.current_time += diffusion_dt; + } + + if( PhysiCell_settings.enable_legacy_saves == true ) + { + log_output(PhysiCell_globals.current_time, PhysiCell_globals.full_output_index, microenvironment, report_file); + report_file.close(); + } + } + catch( const std::exception& e ) + { // reference to the base of a polymorphic object + std::cout << e.what(); // information from length_error printed + } + + // save a final simulation snapshot + + sprintf( filename , "%s/final" , PhysiCell_settings.folder.c_str() ); + save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); + + sprintf( filename , "%s/final.svg" , PhysiCell_settings.folder.c_str() ); + SVG_plot(filename, microenvironment, 0.0, PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function); + + // timer + + std::cout << std::endl << "Total simulation runtime: " << std::endl; + BioFVM::display_stopwatch_value( std::cout , BioFVM::runtime_stopwatch_value() ); + + return 0; +} From 69a23dbe7eaac4f41dc9548ad85072eff7921a03 Mon Sep 17 00:00:00 2001 From: Daniel Bergman Date: Fri, 31 Jan 2025 16:33:08 -0500 Subject: [PATCH 3/4] revert back to 1.14.2 state (but different hash) --- Makefile | 323 +++++- config/PhysiCell_settings.xml | 1979 ++------------------------------- config/cell_rules.csv | 0 config/cells.csv | 1 - custom_modules/custom.cpp | 214 ---- custom_modules/custom.h | 92 -- main.cpp | 254 ----- 7 files changed, 366 insertions(+), 2497 deletions(-) delete mode 100644 config/cell_rules.csv delete mode 100644 config/cells.csv delete mode 100644 custom_modules/custom.cpp delete mode 100644 custom_modules/custom.h delete mode 100644 main.cpp diff --git a/Makefile b/Makefile index 7aa7d18d2..5d256d1c3 100644 --- a/Makefile +++ b/Makefile @@ -11,24 +11,11 @@ ifdef PHYSICELL_CPP CC := $(PHYSICELL_CPP) endif -ifndef STATIC_OPENMP - STATIC_OPENMP = -fopenmp -endif - ARCH := native # best auto-tuning # ARCH := core2 # a reasonably safe default for most CPUs since 2007 # ARCH := corei7 -# ARCH := corei7-avx # earlier i7 # ARCH := core-avx-i # i7 ivy bridge or newer # ARCH := core-avx2 # i7 with Haswell or newer -# ARCH := nehalem -# ARCH := westmere -# ARCH := sandybridge # circa 2011 -# ARCH := ivybridge # circa 2012 -# ARCH := haswell # circa 2013 -# ARCH := broadwell # circa 2014 -# ARCH := skylake # circa 2015 -# ARCH := bonnell # ARCH := silvermont # ARCH := skylake-avx512 # ARCH := nocona #64-bit pentium 4 or later @@ -48,9 +35,7 @@ else endif endif -CFLAGS_LINK := $(shell echo $(CFLAGS) | sed -e "s/-fopenmp//g") -COMPILE_COMMAND := $(CC) $(CFLAGS) $(EXTRA_FLAGS) -LINK_COMMAND := $(CC) $(CFLAGS_LINK) $(EXTRA_FLAGS) +COMPILE_COMMAND := $(CC) $(CFLAGS) BioFVM_OBJECTS := 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 @@ -64,27 +49,284 @@ PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o # put your custom objects here (they should be in the custom_modules directory) -PhysiCell_custom_module_OBJECTS := custom.o +PhysiCell_custom_module_OBJECTS := .o pugixml_OBJECTS := pugixml.o PhysiCell_OBJECTS := $(BioFVM_OBJECTS) $(pugixml_OBJECTS) $(PhysiCell_core_OBJECTS) $(PhysiCell_module_OBJECTS) ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) -# compile the project - -all: main.cpp $(ALL_OBJECTS) - $(COMPILE_COMMAND) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp - make name +EXAMPLES := ./examples/PhysiCell_test_mechanics_1.cpp ./examples/PhysiCell_test_mechanics_2.cpp \ + ./examples/PhysiCell_test_DCIS.cpp ./examples/PhysiCell_test_HDS.cpp \ + ./examples/PhysiCell_test_cell_cycle.cpp ./examples/PhysiCell_test_volume.cpp -static: main.cpp $(ALL_OBJECTS) $(MaBoSS) - $(LINK_COMMAND) $(INC) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp $(LIB) -static-libgcc -static-libstdc++ $(STATIC_OPENMP) +all: + make heterogeneity-sample + make name: @echo "" @echo "Executable name is" $(PROGRAM_NAME) @echo "" +# sample projects +list-projects: + @echo "Sample projects: template biorobots-sample cancer-biorobots-sample cancer-immune-sample" + @echo " celltypes3-sample heterogeneity-sample pred-prey-farmer virus-macrophage-sample" + @echo " worm-sample interaction-sample mechano-sample rules-sample physimess-sample custom-division-sample" + @echo " asymmetric-division-sample immune-function-sample episode-sample" + @echo "" + @echo "Sample intracellular projects: template_BM ode-energy-sample physiboss-cell-lines-sample" + @echo " cancer-metabolism-sample physiboss-tutorial physiboss-tutorial-invasion" + @echo "" + +template: + cp -r ./sample_projects/template/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/template/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/template/Makefile . + cp -r ./sample_projects/template/config/* ./config + +# sample projects + +# ---- non-intracellular projects +biorobots-sample: + cp ./sample_projects/biorobots/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/biorobots/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/biorobots/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/biorobots/config/* ./config/ + +cancer-biorobots-sample: + cp ./sample_projects/cancer_biorobots/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/cancer_biorobots/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/cancer_biorobots/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/cancer_biorobots/config/* ./config/ + +cancer-immune-sample: + cp ./sample_projects/cancer_immune/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/cancer_immune/main-cancer_immune_3D.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/cancer_immune/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/cancer_immune/config/* ./config/ + +celltypes3-sample: + cp ./sample_projects/celltypes3/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/celltypes3/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/celltypes3/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/celltypes3/config/* ./config/ + +heterogeneity-sample: + cp ./sample_projects/heterogeneity/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/heterogeneity/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/heterogeneity/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/heterogeneity/config/* ./config/ + +pred-prey-farmer: + cp ./sample_projects/pred_prey_farmer/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/pred_prey_farmer/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/pred_prey_farmer/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/pred_prey_farmer/config/* ./config/ + +virus-macrophage-sample: + cp ./sample_projects/virus_macrophage/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/virus_macrophage/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/virus_macrophage/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/virus_macrophage/config/* ./config/ + +worm-sample: + cp ./sample_projects/worm/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/worm/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/worm/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/worm/config/* ./config/ + +interaction-sample: + cp ./sample_projects/interactions/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/interactions/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/interactions/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/interactions/config/* ./config/ + +mechano-sample: + cp ./sample_projects/mechano/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/mechano/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/mechano/Makefile . + cp ./sample_projects/mechano/config/* ./config/ + +rules-sample: + cp ./sample_projects/rules_sample/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/rules_sample/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/rules_sample/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects/rules_sample/config/* ./config/ + +physimess-sample: + cp ./sample_projects/physimess/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/physimess/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/physimess/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects/physimess/config/* ./config/ + +custom-division-sample: + cp -r ./sample_projects/custom_division/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/custom_division/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/custom_division/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects/custom_division/config/* ./config/ + +asymmetric-division-sample: + cp -r ./sample_projects/asymmetric_division/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/asymmetric_division/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/asymmetric_division/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects/asymmetric_division/config/* ./config/ + +immune-function-sample: + cp -r ./sample_projects/immune_function/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/immune_function/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/immune_function/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects/immune_function/config/* ./config/ + +episode-sample: + cp -r ./sample_projects/episode/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects/episode/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects/episode/Makefile . + cp -r ./sample_projects/episode/config/* ./config + +# ---- intracellular projects +ode-energy-sample: + cp ./sample_projects_intracellular/ode/ode_energy/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/ode/ode_energy/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/ode/ode_energy/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects_intracellular/ode/ode_energy/config/* ./config/ + +physiboss-cell-lines-sample: + cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects_intracellular/boolean/physiboss_cell_lines/config/* ./config/ + +physiboss-tutorial: + cp ./sample_projects_intracellular/boolean/tutorial/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/boolean/tutorial/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/boolean/tutorial/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects_intracellular/boolean/tutorial/config/* ./config/ + +physiboss-tutorial-invasion: + cp ./sample_projects_intracellular/boolean/cancer_invasion/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/boolean/cancer_invasion/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/boolean/cancer_invasion/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects_intracellular/boolean/cancer_invasion/config/* ./config/ + +ecoli-acetic-switch-sample: + cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/main_ecoli_acetic_switch.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/Makefile ./ + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects_intracellular/fba/ecoli_acetic_switch/config/* ./config/ + +cancer-metabolism-sample: + cp ./sample_projects_intracellular/fba/cancer_metabolism/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/fba/cancer_metabolism/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/fba/cancer_metabolism/Makefile ./ + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp ./sample_projects_intracellular/fba/cancer_metabolism/config/* ./config/ + +template_BM: + cp ./sample_projects_intracellular/boolean/template_BM/custom_modules/* ./custom_modules/ + touch main.cpp && cp main.cpp main-backup.cpp + cp ./sample_projects_intracellular/boolean/template_BM/main.cpp ./main.cpp + cp Makefile Makefile-backup + cp ./sample_projects_intracellular/boolean/template_BM/Makefile . + cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml + cp -r ./sample_projects_intracellular/boolean/template_BM/config/* ./config/ + mkdir ./scripts/ + cp ./sample_projects_intracellular/boolean/template_BM/scripts/* ./scripts/ + +# early examples for convergence testing + +physicell_test_mech1: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_1.cpp + $(COMPILE_COMMAND) -o test_mech1 $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_1.cpp + +physicell_test_mech2: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_2.cpp + $(COMPILE_COMMAND) -o test_mech2 $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_mechanics_2.cpp + +physicell_test_DCIS: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_DCIS.cpp + $(COMPILE_COMMAND) -o test_DCIS $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_DCIS.cpp + +physicell_test_HDS: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_HDS.cpp + $(COMPILE_COMMAND) -o test_HDS $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_HDS.cpp + +physicell_test_cell_cycle: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_cell_cycle.cpp + $(COMPILE_COMMAND) -o test_cycle $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_cell_cycle.cpp + +PhysiCell_test_volume: $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_volume.cpp + $(COMPILE_COMMAND) -o test_volume $(PhysiCell_OBJECTS) ./examples/PhysiCell_test_volume.cpp + +examples: $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_mech1 ./examples/PhysiCell_test_mechanics_1.cpp $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_mech2 ./examples/PhysiCell_test_mechanics_2.cpp $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_DCIS ./examples/PhysiCell_test_DCIS.cpp $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_HDS ./examples/PhysiCell_test_HDS.cpp $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_cycle ./examples/PhysiCell_test_cell_cycle.cpp $(PhysiCell_OBJECTS) + $(COMPILE_COMMAND) -o ./examples/test_volume ./examples/PhysiCell_test_volume.cpp $(PhysiCell_OBJECTS) + # PhysiCell core components PhysiCell_phenotype.o: ./core/PhysiCell_phenotype.cpp @@ -113,7 +355,7 @@ PhysiCell_constants.o: ./core/PhysiCell_constants.cpp PhysiCell_signal_behavior.o: ./core/PhysiCell_signal_behavior.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_signal_behavior.cpp - + PhysiCell_rules.o: ./core/PhysiCell_rules.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_rules.cpp @@ -162,37 +404,34 @@ PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp PhysiCell_various_outputs.o: ./modules/PhysiCell_various_outputs.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_various_outputs.cpp - + PhysiCell_pugixml.o: ./modules/PhysiCell_pugixml.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_pugixml.cpp PhysiCell_settings.o: ./modules/PhysiCell_settings.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_settings.cpp + $(COMPILE_COMMAND) -c ./modules/PhysiCell_settings.cpp PhysiCell_basic_signaling.o: ./core/PhysiCell_basic_signaling.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_basic_signaling.cpp - + $(COMPILE_COMMAND) -c ./core/PhysiCell_basic_signaling.cpp + PhysiCell_geometry.o: ./modules/PhysiCell_geometry.cpp $(COMPILE_COMMAND) -c ./modules/PhysiCell_geometry.cpp - -# user-defined PhysiCell modules -custom.o: ./custom_modules/custom.cpp - $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp +# user-defined PhysiCell modules # cleanup reset: - rm -f *.cpp + rm -f *.cpp PhysiCell_cell.o cp ./sample_projects/Makefile-default Makefile - rm -f ./custom_modules/* + rm -rf ./custom_modules/* touch ./custom_modules/empty.txt touch ALL_CITATIONS.txt touch ./core/PhysiCell_cell.cpp rm ALL_CITATIONS.txt cp ./config/PhysiCell_settings-backup.xml ./config/PhysiCell_settings.xml touch ./config/empty.csv - rm -f ./config/*.csv + rm ./config/*.csv clean: rm -f *.o @@ -202,9 +441,9 @@ data-cleanup: rm -rf ./output mkdir ./output touch ./output/empty.txt - + # archival - + checkpoint: zip -r $$(date +%b_%d_%Y_%H%M).zip Makefile *.cpp *.h config/*.xml custom_modules/* @@ -289,15 +528,15 @@ save: cp main.cpp ./user_projects/$(PROJ) cp Makefile ./user_projects/$(PROJ) cp VERSION.txt ./user_projects/$(PROJ) - cp ./config/* ./user_projects/$(PROJ)/config - cp ./custom_modules/* ./user_projects/$(PROJ)/custom_modules + cp -r ./config/* ./user_projects/$(PROJ)/config + cp -r ./custom_modules/* ./user_projects/$(PROJ)/custom_modules load: echo "Loading project from $(PROJ) ... " cp ./user_projects/$(PROJ)/main.cpp . cp ./user_projects/$(PROJ)/Makefile . - cp ./user_projects/$(PROJ)/config/* ./config/ - cp ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/ + cp -r ./user_projects/$(PROJ)/config/* ./config/ + cp -r ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/ pack: @echo " " diff --git a/config/PhysiCell_settings.xml b/config/PhysiCell_settings.xml index 72970bf80..e3cd03b4a 100644 --- a/config/PhysiCell_settings.xml +++ b/config/PhysiCell_settings.xml @@ -14,7 +14,7 @@ - 2880 + 14400 min micron 0.01 @@ -35,12 +35,6 @@ 60 true - - debris - YlOrRd - 0 - 1 - false @@ -50,15 +44,29 @@ false true - false - 0 - + 100000.0 - 10 + 0.1 + + 38 + 0 + + 38 + 10 + 10 + 38 + 0 + 0 + + + + + 10 + .1 0 0 @@ -71,132 +79,20 @@ 0 - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - + - 0.0 - 0.0 + 10 + 0.1 - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 - - - - - - - - - - - - 0.0 - 0.0 - - 0.0 - 0.0 + 0 + 0 - - - - - - + 0 + 0 + 0 + 0 + 0 + 0 @@ -212,271 +108,19 @@ - - - - - 245.32200 - 555.78600 - 584.89200 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1.0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.0 - - false - true - - false - debris - 1 - - - false - false - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 1.0 - - - - Volume - 4 - 2 - 100000 - - - apoptosis - 1e-6 - 1e-2 - - - - + - + - 0 - 0.00208 - 0.00333 + 0.000 - - 1.0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 5.31667e-05 - - 0.001938 - + + 516 + 0.05 0 @@ -487,17 +131,17 @@ - 0.0 - - 9000000000.0 - 1.15741e-05 - + 2.80E-03 + + 0 + 86400 + - 1.11667e-02 + 1.11667e-2 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 + 5.33333e-5 + 2.16667e-3 + 0 2.0 @@ -509,1556 +153,101 @@ 0.05 0.0045 0.0055 - 0.0 - 0.0 - 2 + 0 + 0 + 2.0 0.4 10.0 1.25 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 + 1 1.8 15.12 + 4.0 + 10.0 0.01 0.0 0.0 - 12 - 1.0 - 1.0 - 0.0 + 1 + 1 + .5 - true + false true false - debris + oxygen 1 false false - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 + 0.0 + 0.0 + 0.0 - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 + + 0 + 1 + 10 + 0 - + 0.0 - 1.0 + 1 0.0 0.0 - + 0.0 - 1.0 + 1 0.0 0.0 - 0.0 - 0.0 - 0.0 + 0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 + 0 + 0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 + 0 + 0 - 1.0 - 0.1 + 1 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 + 0 + 0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 + 0 + 0 - - 0.0 - 0.0 - - 0.0 + 1.0 - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 1.0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.0 - - true - true - - false - debris - 1 - - - true - true - - 1.0 - 1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 0 - 1.0 - 0 - 0 - 0 - 0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.5 - - true - true - - false - debris - 1 - - - true - false - - 1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 0 - 0 - 1.0 - 0 - 0 - 0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.7 - - true - true - - false - debris - 1 - - - true - false - - 1.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 0 - 0 - 0 - 1.0 - 0 - 0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.0 - - false - true - - false - debris - 1 - - - false - false - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 0 - 0 - 0 - 0 - 1.0 - 0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.0 - - true - true - - false - debris - 1 - - - false - false - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - - - - - - 308.64198 - 480.76923 - 300.30030 - - - 0 - 0 - 0 - 0 - 0 - 0 - 1.0 - 0 - - - - - 5.31667e-05 - - 0.001938 - - - 0.05 - 0 - 1.66667e-02 - 5.83333e-03 - 0 - 2.0 - - - - 0.0 - - 9000000000.0 - 1.15741e-05 - - - 1.11667e-02 - 8.33333e-4 - 5.33333e-05 - 2.16667e-4 - 7e-05 - 2.0 - - - - - 2494 - 0.75 - 540 - 0.05 - 0.0045 - 0.0055 - 0.0 - 0.0 - 2 - - - 0.4 - 10.0 - 1.25 - - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - 1.0 - - - 1.8 - 15.12 - - 0.01 - 0.0 - 0.0 - 12 - - - 1.0 - 1.0 - 0.0 - - true - true - - false - debris - 1 - - - false - false - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - 0.0 - 1.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - 0.0 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - 1.0 - 0.1 - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0 - - - - 0.0 - 0.0 - - - - 0.0 - - - - + ./config cells.csv @@ -2066,15 +255,17 @@ - + ./config - cell_rules.csv + cell_rules_v2.csv + - 12 + 0 + 0 \ No newline at end of file diff --git a/config/cell_rules.csv b/config/cell_rules.csv deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/cells.csv b/config/cells.csv deleted file mode 100644 index 734bdc767..000000000 --- a/config/cells.csv +++ /dev/null @@ -1 +0,0 @@ -0,0,0,0 \ No newline at end of file diff --git a/custom_modules/custom.cpp b/custom_modules/custom.cpp deleted file mode 100644 index 59b23bd93..000000000 --- a/custom_modules/custom.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* -############################################################################### -# If you use PhysiCell in your project, please cite PhysiCell and the version # -# number, such as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# See VERSION.txt or call get_PhysiCell_version() to get the current version # -# x.y.z. Call display_citations() to get detailed information on all cite-# -# able software used in your PhysiCell application. # -# # -# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # -# as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # -# with BioFVM [2] to solve the transport equations. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # -# llelized diffusive transport solver for 3-D biological simulations, # -# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # -# # -############################################################################### -# # -# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # -# # -# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # -# All rights reserved. # -# # -# Redistribution and use in source and binary forms, with or without # -# modification, are permitted provided that the following conditions are met: # -# # -# 1. Redistributions of source code must retain the above copyright notice, # -# this list of conditions and the following disclaimer. # -# # -# 2. Redistributions in binary form must reproduce the above copyright # -# notice, this list of conditions and the following disclaimer in the # -# documentation and/or other materials provided with the distribution. # -# # -# 3. Neither the name of the copyright holder nor the names of its # -# contributors may be used to endorse or promote products derived from this # -# software without specific prior written permission. # -# # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # -# POSSIBILITY OF SUCH DAMAGE. # -# # -############################################################################### -*/ - -#include "./custom.h" - -void create_cell_types( void ) -{ - // set the random seed - if (parameters.ints.find_index("random_seed") != -1) - { - SeedRandom(parameters.ints("random_seed")); - } - - /* - Put any modifications to default cell definition here if you - want to have "inherited" by other cell types. - - This is a good place to set default functions. - */ - - initialize_default_cell_definition(); - cell_defaults.phenotype.secretion.sync_to_microenvironment( µenvironment ); - - cell_defaults.functions.volume_update_function = standard_volume_update_function; - cell_defaults.functions.update_velocity = standard_update_cell_velocity; - - cell_defaults.functions.update_migration_bias = NULL; - cell_defaults.functions.update_phenotype = NULL; // update_cell_and_death_parameters_O2_based; - cell_defaults.functions.custom_cell_rule = NULL; - cell_defaults.functions.contact_function = NULL; - - cell_defaults.functions.add_cell_basement_membrane_interactions = NULL; - cell_defaults.functions.calculate_distance_to_membrane = NULL; - - /* - This parses the cell definitions in the XML config file. - */ - - initialize_cell_definitions_from_pugixml(); - - /* - This builds the map of cell definitions and summarizes the setup. - */ - - build_cell_definitions_maps(); - - /* - This intializes cell signal and response dictionaries - */ - - setup_signal_behavior_dictionaries(); - - /* - Cell rule definitions - */ - - setup_cell_rules(); - - /* - Put any modifications to individual cell definitions here. - - This is a good place to set custom functions. - */ - - cell_defaults.functions.update_phenotype = phenotype_function; - cell_defaults.functions.custom_cell_rule = custom_function; - cell_defaults.functions.contact_function = contact_function; - - /* - This builds the map of cell definitions and summarizes the setup. - */ - - display_cell_definitions( std::cout ); - - return; -} - -void setup_microenvironment( void ) -{ - // set domain parameters - - // put any custom code to set non-homogeneous initial conditions or - // extra Dirichlet nodes here. - - // initialize BioFVM - - initialize_microenvironment(); - - return; -} - -void setup_tissue( void ) -{ - double Xmin = microenvironment.mesh.bounding_box[0]; - double Ymin = microenvironment.mesh.bounding_box[1]; - double Zmin = microenvironment.mesh.bounding_box[2]; - - double Xmax = microenvironment.mesh.bounding_box[3]; - double Ymax = microenvironment.mesh.bounding_box[4]; - double Zmax = microenvironment.mesh.bounding_box[5]; - - if( default_microenvironment_options.simulate_2D == true ) - { - Zmin = 0.0; - Zmax = 0.0; - } - - double Xrange = Xmax - Xmin; - double Yrange = Ymax - Ymin; - double Zrange = Zmax - Zmin; - - // create some of each type of cell - - Cell* pC; - - for( int k=0; k < cell_definitions_by_index.size() ; k++ ) - { - Cell_Definition* pCD = cell_definitions_by_index[k]; - std::cout << "Placing cells of type " << pCD->name << " ... " << std::endl; - for( int n = 0 ; n < parameters.ints("number_of_cells") ; n++ ) - { - std::vector position = {0,0,0}; - position[0] = Xmin + UniformRandom()*Xrange; - position[1] = Ymin + UniformRandom()*Yrange; - position[2] = Zmin + UniformRandom()*Zrange; - - pC = create_cell( *pCD ); - pC->assign_position( position ); - } - } - std::cout << std::endl; - - // load cells from your CSV file (if enabled) - load_cells_from_pugixml(); - set_parameters_from_distributions(); - - return; -} - -std::vector my_coloring_function( Cell* pCell ) -{ return paint_by_number_cell_coloring(pCell); } - -void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ) -{ return; } - -void custom_function( Cell* pCell, Phenotype& phenotype , double dt ) -{ return; } - -void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ) -{ return; } \ No newline at end of file diff --git a/custom_modules/custom.h b/custom_modules/custom.h deleted file mode 100644 index 0e6df8d02..000000000 --- a/custom_modules/custom.h +++ /dev/null @@ -1,92 +0,0 @@ -/* -############################################################################### -# If you use PhysiCell in your project, please cite PhysiCell and the version # -# number, such as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# See VERSION.txt or call get_PhysiCell_version() to get the current version # -# x.y.z. Call display_citations() to get detailed information on all cite-# -# able software used in your PhysiCell application. # -# # -# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # -# as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # -# with BioFVM [2] to solve the transport equations. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # -# llelized diffusive transport solver for 3-D biological simulations, # -# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # -# # -############################################################################### -# # -# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # -# # -# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # -# All rights reserved. # -# # -# Redistribution and use in source and binary forms, with or without # -# modification, are permitted provided that the following conditions are met: # -# # -# 1. Redistributions of source code must retain the above copyright notice, # -# this list of conditions and the following disclaimer. # -# # -# 2. Redistributions in binary form must reproduce the above copyright # -# notice, this list of conditions and the following disclaimer in the # -# documentation and/or other materials provided with the distribution. # -# # -# 3. Neither the name of the copyright holder nor the names of its # -# contributors may be used to endorse or promote products derived from this # -# software without specific prior written permission. # -# # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # -# POSSIBILITY OF SUCH DAMAGE. # -# # -############################################################################### -*/ - -#include "../core/PhysiCell.h" -#include "../modules/PhysiCell_standard_modules.h" - -using namespace BioFVM; -using namespace PhysiCell; - -// setup functions to help us along - -void create_cell_types( void ); -void setup_tissue( void ); - -// set up the BioFVM microenvironment -void setup_microenvironment( void ); - -// custom pathology coloring function - -std::vector my_coloring_function( Cell* ); - -// custom functions can go here - -void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ); -void custom_function( Cell* pCell, Phenotype& phenotype , double dt ); - -void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ); - diff --git a/main.cpp b/main.cpp deleted file mode 100644 index bf6e65d15..000000000 --- a/main.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* -############################################################################### -# If you use PhysiCell in your project, please cite PhysiCell and the version # -# number, such as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1]. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# See VERSION.txt or call get_PhysiCell_version() to get the current version # -# x.y.z. Call display_citations() to get detailed information on all cite-# -# able software used in your PhysiCell application. # -# # -# Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM # -# as below: # -# # -# We implemented and solved the model using PhysiCell (Version x.y.z) [1], # -# with BioFVM [2] to solve the transport equations. # -# # -# [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, # -# PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- # -# lar Systems, PLoS Comput. Biol. 14(2): e1005991, 2018 # -# DOI: 10.1371/journal.pcbi.1005991 # -# # -# [2] A Ghaffarizadeh, SH Friedman, and P Macklin, BioFVM: an efficient para- # -# llelized diffusive transport solver for 3-D biological simulations, # -# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 # -# # -############################################################################### -# # -# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # -# # -# Copyright (c) 2015-2022, Paul Macklin and the PhysiCell Project # -# All rights reserved. # -# # -# Redistribution and use in source and binary forms, with or without # -# modification, are permitted provided that the following conditions are met: # -# # -# 1. Redistributions of source code must retain the above copyright notice, # -# this list of conditions and the following disclaimer. # -# # -# 2. Redistributions in binary form must reproduce the above copyright # -# notice, this list of conditions and the following disclaimer in the # -# documentation and/or other materials provided with the distribution. # -# # -# 3. Neither the name of the copyright holder nor the names of its # -# contributors may be used to endorse or promote products derived from this # -# software without specific prior written permission. # -# # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # -# POSSIBILITY OF SUCH DAMAGE. # -# # -############################################################################### -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include "./core/PhysiCell.h" -#include "./modules/PhysiCell_standard_modules.h" - -// put custom code modules here! - -#include "./custom_modules/custom.h" - -using namespace BioFVM; -using namespace PhysiCell; - -int main( int argc, char* argv[] ) -{ - // load and parse settings file(s) - - bool XML_status = false; - char copy_command [1024]; - if( argc > 1 ) - { - XML_status = load_PhysiCell_config_file( argv[1] ); - sprintf( copy_command , "cp %s %s" , argv[1] , PhysiCell_settings.folder.c_str() ); - } - else - { - XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" ); - sprintf( copy_command , "cp ./config/PhysiCell_settings.xml %s" , PhysiCell_settings.folder.c_str() ); - } - if( !XML_status ) - { exit(-1); } - - // copy config file to output directry - system( copy_command ); - - // OpenMP setup - omp_set_num_threads(PhysiCell_settings.omp_num_threads); - - // time setup - std::string time_units = "min"; - - /* Microenvironment setup */ - - setup_microenvironment(); // modify this in the custom code - - /* PhysiCell setup */ - - // set mechanics voxel size, and match the data structure to BioFVM - double mechanics_voxel_size = 30; - Cell_Container* cell_container = create_cell_container_for_microenvironment( microenvironment, mechanics_voxel_size ); - - /* Users typically start modifying here. START USERMODS */ - - create_cell_types(); - - setup_tissue(); - - /* Users typically stop modifying here. END USERMODS */ - - // set MultiCellDS save options - - set_save_biofvm_mesh_as_matlab( true ); - set_save_biofvm_data_as_matlab( true ); - set_save_biofvm_cell_data( true ); - set_save_biofvm_cell_data_as_custom_matlab( true ); - - // save a simulation snapshot - - char filename[1024]; - sprintf( filename , "%s/initial" , PhysiCell_settings.folder.c_str() ); - save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); - - // save a quick SVG cross section through z = 0, after setting its - // length bar to 200 microns - - PhysiCell_SVG_options.length_bar = 200; - - // for simplicity, set a pathology coloring function - - std::vector (*cell_coloring_function)(Cell*) = my_coloring_function; - std::string (*substrate_coloring_function)(double, double, double) = paint_by_density_percentage; - - sprintf( filename , "%s/initial.svg" , PhysiCell_settings.folder.c_str() ); - SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function ); - - sprintf( filename , "%s/legend.svg" , PhysiCell_settings.folder.c_str() ); - create_plot_legend( filename , cell_coloring_function ); - - display_citations(); - - // set the performance timers - - BioFVM::RUNTIME_TIC(); - BioFVM::TIC(); - - std::ofstream report_file; - if( PhysiCell_settings.enable_legacy_saves == true ) - { - sprintf( filename , "%s/simulation_report.txt" , PhysiCell_settings.folder.c_str() ); - - report_file.open(filename); // create the data log file - report_file<<"simulated time\tnum cells\tnum division\tnum death\twall time"< PhysiCell_globals.next_full_save_time - 0.5 * diffusion_dt ) - { - display_simulation_status( std::cout ); - if( PhysiCell_settings.enable_legacy_saves == true ) - { - log_output( PhysiCell_globals.current_time , PhysiCell_globals.full_output_index, microenvironment, report_file); - } - - if( PhysiCell_settings.enable_full_saves == true ) - { - sprintf( filename , "%s/output%08u" , PhysiCell_settings.folder.c_str(), PhysiCell_globals.full_output_index ); - - save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); - } - - PhysiCell_globals.full_output_index++; - PhysiCell_globals.next_full_save_time += PhysiCell_settings.full_save_interval; - } - - // save SVG plot if it's time - if( PhysiCell_globals.current_time > PhysiCell_globals.next_SVG_save_time - 0.5 * diffusion_dt ) - { - if( PhysiCell_settings.enable_SVG_saves == true ) - { - sprintf( filename , "%s/snapshot%08u.svg" , PhysiCell_settings.folder.c_str() , PhysiCell_globals.SVG_output_index ); - SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function); - - PhysiCell_globals.SVG_output_index++; - PhysiCell_globals.next_SVG_save_time += PhysiCell_settings.SVG_save_interval; - } - } - - // update the microenvironment - microenvironment.simulate_diffusion_decay( diffusion_dt ); - - // run PhysiCell - ((Cell_Container *)microenvironment.agent_container)->update_all_cells( PhysiCell_globals.current_time ); - - /* - Custom add-ons could potentially go here. - */ - - PhysiCell_globals.current_time += diffusion_dt; - } - - if( PhysiCell_settings.enable_legacy_saves == true ) - { - log_output(PhysiCell_globals.current_time, PhysiCell_globals.full_output_index, microenvironment, report_file); - report_file.close(); - } - } - catch( const std::exception& e ) - { // reference to the base of a polymorphic object - std::cout << e.what(); // information from length_error printed - } - - // save a final simulation snapshot - - sprintf( filename , "%s/final" , PhysiCell_settings.folder.c_str() ); - save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); - - sprintf( filename , "%s/final.svg" , PhysiCell_settings.folder.c_str() ); - SVG_plot(filename, microenvironment, 0.0, PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function); - - // timer - - std::cout << std::endl << "Total simulation runtime: " << std::endl; - BioFVM::display_stopwatch_value( std::cout , BioFVM::runtime_stopwatch_value() ); - - return 0; -} From 474918842f6f558ff4f2889ffcd0f23bd620aa05 Mon Sep 17 00:00:00 2001 From: bue Date: Fri, 13 Jun 2025 12:28:33 -0400 Subject: [PATCH 4/4] Take warned_rng variable extern to be able to suppress the mislead message 'WARNING: Setting the random seed again.' when models in consecutive episodes are run. --- core/PhysiCell_utilities.cpp | 6 +++--- core/PhysiCell_utilities.h | 5 ++--- sample_projects/episode/main.cpp | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/PhysiCell_utilities.cpp b/core/PhysiCell_utilities.cpp index 91f0cd582..316404856 100644 --- a/core/PhysiCell_utilities.cpp +++ b/core/PhysiCell_utilities.cpp @@ -78,18 +78,18 @@ thread_local bool local_pnrg_setup_done = false; unsigned int physicell_random_seed = 0; std::vector physicell_random_seeds; +bool warned_rng = false; void setup_rng( void ) { static bool setup_done = false; - static bool warned = false; - if (!warned && setup_done) + if (!warned_rng && setup_done) { std::cout << "WARNING: Setting the random seed again." << std::endl << "\tYou probably have set a user parameter called random_seed." << std::endl << "\tHere, we will use the random seed set in user parameters." << std::endl << "\tHOWEVER, as of PhysiCell 1.14.0, you should set the random seed in the element in the config file." << std::endl << "\tFuture versions of PhysiCell may throw an error here. Kindly remove the user parameter and just use the element." << std::endl; - warned = true; + warned_rng = true; } std::cout << "Setting up RNG with seed " << physicell_random_seed << std::endl; diff --git a/core/PhysiCell_utilities.h b/core/PhysiCell_utilities.h index 7e4ec1548..199134ef1 100644 --- a/core/PhysiCell_utilities.h +++ b/core/PhysiCell_utilities.h @@ -80,9 +80,8 @@ namespace PhysiCell{ - - extern std::vector physicell_random_seeds; - +extern std::vector physicell_random_seeds; +extern bool warned_rng; void setup_rng( void ); void SeedRandom( unsigned int input ); void SeedRandom( void ); diff --git a/sample_projects/episode/main.cpp b/sample_projects/episode/main.cpp index 2f32cb696..f6cf70e11 100644 --- a/sample_projects/episode/main.cpp +++ b/sample_projects/episode/main.cpp @@ -160,6 +160,7 @@ int main( int argc, char* argv[] ) { // load xml file std::cout << "load setting xml " << settingxml << " ..." << std::endl; + warned_rng = true; bool XML_status = false; XML_status = read_PhysiCell_config_file( settingxml ); if ( XML_status ) { PhysiCell_settings.read_from_pugixml(); }