Skip to content

Commit

Permalink
Merge pull request #148 from MathCancer/development
Browse files Browse the repository at this point in the history
Release Version 1.11.0
  • Loading branch information
MathCancer authored Mar 20, 2023
2 parents bc3b32f + 3bd780a commit 1a56003
Show file tree
Hide file tree
Showing 113 changed files with 17,397 additions and 4,326 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel flex bison gcc make diffutils mingw-w64-x86_64-toolchain
install: base-devel flex bison gcc make diffutils mingw-w64-x86_64-toolchain mingw-w64-x86_64-ca-certificates

- name: Build Virus Macrophage project
run: |
make virus-macrophage-sample
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ sample_projects/cancer_biorobots/.DS_Store
sample_projects/cancer_immune/.DS_Store
sample_projects/celltypes3/.DS_Store
sample_projects/heterogeneity/.DS_Store
sample_projects/template/.DS_Store
sample_projects/template/.DS_Store
pmb_debug.log
heterogeneity
**/.DS_Store
**/._.DS_Store
cancer_immune_3D
biorobots
project
initial.svg
initial.svg
interaction_demo
44 changes: 44 additions & 0 deletions BioFVM/BioFVM_MultiCellDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1387,4 +1387,48 @@ void read_microenvironment_from_MultiCellDS_xml( Microenvironment& M_destination
return;
}

bool read_microenvironment_from_matlab( std::string mat_filename )
{
std::cout << std::endl << "Attempting to load the microenvironment from " << mat_filename << " ... " << std::endl;

std::vector< std::vector<double> > mat = read_matlab( mat_filename );

// row 0 : x
// row 1 : y
// row 2 : z
// row 3 : vol
// row 4-n : substrate
int num_rows = mat.size();
int num_cols = mat[0].size();

int number_of_mat_voxels = num_cols;
int number_of_mat_substrates = num_rows - 3 -1;

if( number_of_mat_substrates != microenvironment.number_of_densities() )
{
std::cout << "Error reading microenvironment from " << mat_filename << "! ";
std::cout << "Expected " << microenvironment.number_of_densities() << " substrates but only detected "
<< number_of_mat_substrates << std::endl;
return false;
}

if( number_of_mat_voxels != microenvironment.number_of_voxels() )
{
std::cout << "Error reading microenvironment from " << mat_filename << "! ";
std::cout << "Expected " << microenvironment.number_of_voxels() << " voxels but only detected "
<< number_of_mat_voxels << std::endl;
return false;
}

for( int n=0 ; n < number_of_mat_voxels ; n++ )
{
// std::cout << microenvironment.mesh.voxels[n].center << " vs " << mat[0][n] << " " << mat[1][n] << " " << mat[2][n] << std::endl;
for( int k=4; k < num_rows ; k++ )
{ microenvironment(n)[k-4] = mat[k][n]; }
}

std::cout << "done!" << std::endl << std::endl;
return true;
}

};
4 changes: 4 additions & 0 deletions BioFVM/BioFVM_MultiCellDS.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ void add_BioFVM_to_open_xml_pugi( pugi::xml_document& xml_dom , std::string file

void save_BioFVM_to_MultiCellDS_xml_pugi( std::string filename_base , Microenvironment& M , double current_simulation_time);

/* beta in PhysiCell 1.11.0 */

bool read_microenvironment_from_matlab( std::string mat_filename );

/* future / not yet supported */

void read_BioFVM_from_open_xml_pugi( pugi::xml_document& xml_dom , std::string filename_base, double& current_simulation_time , Microenvironment& M );
Expand Down
4 changes: 2 additions & 2 deletions CITATION.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 1.10.4) [1].
We implemented and solved the model using PhysiCell (Version 1.11.0) [1].

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu-
Expand All @@ -11,7 +11,7 @@ We implemented and solved the model using PhysiCell (Version 1.10.4) [1].
Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM
as below:

We implemented and solved the model using PhysiCell (Version 1.10.4) [1],
We implemented and solved the model using PhysiCell (Version 1.11.0) [1],
with BioFVM [2] to solve the transport equations.

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
Expand Down
37 changes: 33 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ name:
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"
@echo " worm-sample interaction-sample mechano-sample"
@echo ""
@echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample"
@echo ""
Expand All @@ -93,7 +93,7 @@ template:
biorobots-sample:
cp ./sample_projects/biorobots/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects/biorobots/main-biorobots.cpp ./main.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
Expand All @@ -102,7 +102,7 @@ biorobots-sample:
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-cancer_biorobots.cpp ./main.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
Expand All @@ -129,7 +129,7 @@ celltypes3-sample:
heterogeneity-sample:
cp ./sample_projects/heterogeneity/custom_modules/* ./custom_modules/
touch main.cpp && cp main.cpp main-backup.cpp
cp ./sample_projects/heterogeneity/main-heterogeneity.cpp ./main.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
Expand Down Expand Up @@ -208,6 +208,13 @@ cancer-metabolism-sample:
cp ./config/PhysiCell_settings.xml ./config/PhysiCell_settings-backup.xml
cp ./sample_projects_intracellular/fba/cancer_metabolism/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/

# early examples for convergence testing

Expand Down Expand Up @@ -422,3 +429,25 @@ 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

save:
echo "Saving project as $(PROJ) ... "
mkdir -p ./user_projects
mkdir -p ./user_projects/$(PROJ)
mkdir -p ./user_projects/$(PROJ)/custom_modules
mkdir -p ./user_projects/$(PROJ)/config
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

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/
Loading

0 comments on commit 1a56003

Please sign in to comment.