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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 49 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION := $(shell grep . VERSION.txt | cut -f1 -d:)
PROGRAM_NAME := project
PROGRAM_NAME := prostate

CC := g++
# CC := g++-mp-7 # typical macports compiler name
Expand All @@ -11,16 +11,19 @@ ifdef PHYSICELL_CPP
CC := $(PHYSICELL_CPP)
endif

# prostate model has more than 64 nodes, so we have
# to set up this var to the number of nodes
MABOSS_MAX_NODES = 256

### MaBoSS configuration
# MaBoSS max nodes
ifndef MABOSS_MAX_NODES
MABOSS_MAX_NODES = 256
MABOSS_MAX_NODES = 64
endif

# MaBoSS directory
MABOSS_DIR = addons/PhysiBoSS/MaBoSS/engine
CUR_DIR = $(shell pwd)
CUSTOM_DIR = sample_projects/Arnau_model/custom_modules

ifneq ($(OS), Windows_NT)
LDL_FLAG = -ldl
Expand Down Expand Up @@ -58,7 +61,9 @@ ARCH := native # best auto-tuning
# ARCH := nocona #64-bit pentium 4 or later

# CFLAGS := -march=$(ARCH) -Ofast -s -fomit-frame-pointer -mfpmath=both -fopenmp -m64 -std=c++11
CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -mfpmath=both -fopenmp -m64 -std=c++11
CFLAGS := -g -march=$(ARCH) -O3 -fomit-frame-pointer -mfpmath=both -fopenmp -m64 -std=c++11
# debug:
# CFLAGS := -march=$(ARCH) -O0 -ggdb -fomit-frame-pointer -mfpmath=both -fopenmp -m64 -std=c++11

ifeq ($(OS),Windows_NT)
else
Expand Down Expand Up @@ -91,18 +96,21 @@ MaBoSS := ./addons/PhysiBoSS/MaBoSS/engine/src/BooleanNetwork.h

PhysiBoSS_OBJECTS := maboss_network.o maboss_intracellular.o

PhysiCell_custom_module_OBJECTS := custom.o
PhysiCell_custom_module_OBJECTS := custom.o drug_sensitivity.o boolean_model_interface.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) $(PhysiBoSS_OBJECTS)
ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) $(PhysiBoSS_OBJECTS)
#$(PhysiBoSS_module_OBJECTS)

# compile the project

all: main.cpp $(ALL_OBJECTS) $(MaBoSS)
$(COMPILE_COMMAND) $(INC) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp $(LIB)
make name
@echo ""
@echo "check for $(PROGRAM_NAME)"
make name

static: main.cpp $(ALL_OBJECTS) $(MaBoSS)
$(LINK_COMMAND) $(INC) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp $(LIB) -static-libgcc -static-libstdc++ $(STATIC_OPENMP)
Expand Down Expand Up @@ -134,16 +142,16 @@ PhysiCell_utilities.o: ./core/PhysiCell_utilities.cpp

PhysiCell_custom.o: ./core/PhysiCell_custom.cpp
$(COMPILE_COMMAND) -c ./core/PhysiCell_custom.cpp

PhysiCell_constants.o: ./core/PhysiCell_constants.cpp
$(COMPILE_COMMAND) -c ./core/PhysiCell_constants.cpp
$(COMPILE_COMMAND) -c ./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

# BioFVM core components (needed by PhysiCell)

BioFVM_vector.o: ./BioFVM/BioFVM_vector.cpp
Expand Down Expand Up @@ -189,19 +197,19 @@ PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp $(MaBoSS)

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

Compile_MaBoSS: ./addons/PhysiBoSS/MaBoSS/engine/src/BooleanNetwork.h
Expand All @@ -214,14 +222,24 @@ else
python3 addons/PhysiBoSS/setup_libmaboss.py
endif

maboss_intracellular.o: ./addons/PhysiBoSS/src/maboss_intracellular.cpp $(MaBoSS)
$(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSS/src/maboss_intracellular.cpp

maboss_network.o: ./addons/PhysiBoSS/src/maboss_network.cpp $(MaBoSS)
$(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSS/src/maboss_network.cpp

maboss_intracellular.o: ./addons/PhysiBoSS/src/maboss_intracellular.cpp $(MaBoSS)
$(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSS/src/maboss_intracellular.cpp
utils.o: ./addons/PhysiBoSS/src/utils.cpp #$(MaBoSS)
$(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSS/src/utils.cpp

custom.o: ./custom_modules/custom.cpp $(MaBoSS)
$(COMPILE_COMMAND) $(INC) -c ./custom_modules/custom.cpp
$(COMPILE_COMMAND) $(INC) -c ./custom_modules/custom.cpp

drug_sensitivity.o: ./custom_modules/drug_sensitivity.cpp
$(COMPILE_COMMAND) $(INC) -c ./custom_modules/drug_sensitivity.cpp

boolean_model_interface.o: ./custom_modules/boolean_model_interface.cpp
$(COMPILE_COMMAND) $(INC) -c ./custom_modules/boolean_model_interface.cpp


# cleanup

Expand All @@ -231,29 +249,31 @@ reset:
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
rm -fr ./config/cells.csv ./config/cell_rules.csv
rm -rf ./config/boolean_network/
rm -rf ./scripts

MaBoSS-clean:
rm -fr addons/PhysiBoSS/MaBoSS

clean:
clean:
rm -f *.o
rm -f $(PROGRAM_NAME)*

data-cleanup:
rm -f *.mat
rm -f *.xml
rm -f *.svg
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/*

zip:
zip -r latest.zip Makefile* *.cpp *.h BioFVM/* config/* core/* custom_modules/* matlab/* modules/* sample_projects/*
cp latest.zip $$(date +%b_%d_%Y_%H%M).zip
Expand All @@ -273,26 +293,10 @@ unzip:
untar:
cp ./archives/latest.tar .
tar -xzf latest.tar

# easier animation

FRAMERATE := 24
OUTPUT := output

jpeg:
@magick identify -format "%h" $(OUTPUT)/initial.svg > __H.txt
@magick identify -format "%w" $(OUTPUT)/initial.svg > __W.txt
@expr 2 \* \( $$(grep . __H.txt) / 2 \) > __H1.txt
@expr 2 \* \( $$(grep . __W.txt) / 2 \) > __W1.txt
@echo "$$(grep . __W1.txt)!x$$(grep . __H1.txt)!" > __resize.txt
@magick mogrify -format jpg -resize $$(grep . __resize.txt) $(OUTPUT)/s*.svg
rm -f __H*.txt __W*.txt __resize.txt

gif:
magick convert $(OUTPUT)/s*.svg $(OUTPUT)/out.gif

movie:
ffmpeg -r $(FRAMERATE) -f image2 -i $(OUTPUT)/snapshot%08d.jpg -vcodec libx264 -pix_fmt yuv420p -strict -2 -tune animation -crf 15 -acodec none $(OUTPUT)/out.mp4
ffmpeg -r 25 -i output/snapshot%08d.svg -pix_fmt yuv420p output.mp4
vlc output.mp4

# upgrade rules

Expand Down Expand Up @@ -322,7 +326,7 @@ upgrade: $(SOURCE)
mv -f PhysiCell/documentation/User_Guide.pdf documentation
rm -f -r PhysiCell
rm -f $(SOURCE)

# use: make save PROJ=your_project_name
PROJ := my_project

Expand Down Expand Up @@ -367,3 +371,4 @@ unpack:
list-user-projects:
@echo "user projects::"
@cd ./user_projects && ls -dt1 * | grep . | sed 's!empty.txt!!'

23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# About

This repository is a template for PhysiBoSS models, that can be used to submit a new model to the database.
This repository is an update of the prostate model to version 2.2.3 of PhysiBoSS. The project does not rely on the cell rules to perform the inhibition, but on an ad-hoc cell sensitivity that depends on the cell line.

A prior version of this model was used to simulate the drug response in prostate cell lines in Figures 6, 7 and 8 of [the PhysiBoSS 2.0 paper](https://www.nature.com/articles/s41540-023-00314-4).

# Getting started

- Fork this repository.
- Make a new branch from main for your PhysiBoSS model.
- Update the new branch with your model
- Update model.yml metadata file, as well as the readme for a quick description of the model
- Open a pull request. Building of your model will be tested on Windows, Mac and Linux.
- When your pull request is accepted by the editors a new repository will be created in the github PhysiBoSS-Models organization, and build/upload of your model will automatically be triggered. Once complete, the model is available on PhysiBoSS-Models.
The XML in the `config` folder are:
- PhysiCell_settings_LNCaP.xml: LNCaP cell line simulation
- PhysiCell_settings_LNCaP_Luminespib_2.xml: LNCaP cell line simulation adding Luminespib drug (anti_HSPs).
- PhysiCell_settings_LNCaP_Pictilisib_2.xml: LNCaP cell line simulation adding Pictilisib drug (anti_PI3K).
- PhysiCell_settings_LNCaP_Luminespib_Pictilisib_2.xml: LNCaP cell line simulation adding Luminespib and Pictilisib drugs.

Files in the `scripts` folder have post processing scripts.

# Authors:

Arnau Montagud, Annika Meert, Gerard Pradas and Miguel Ponce de Leon, BSC-CNS

Contact: arnau.montagud at csic.es
Loading