Skip to content

Commit

Permalink
Merge pull request #201 from MathCancer/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
MathCancer authored Aug 6, 2023
2 parents 9f1d56a + 84d033a commit 8df2856
Show file tree
Hide file tree
Showing 32 changed files with 506 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Run PhysiMeSS project
run: |
./project config/mymodel.xml
./project
./project config/Fibre_Initialisation/mymodel_initialisation.xml
./project config/Cell_Fibre_Mechanics/mymodel_rotating.xml
2 changes: 1 addition & 1 deletion .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Run PhysiMeSS project
run: |
./project config/mymodel.xml
./project
./project config/Fibre_Initialisation/mymodel_initialisation.xml
./project config/Cell_Fibre_Mechanics/mymodel_rotating.xml
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Run PhysiMeSS project
run: |
.\\project config\\mymodel.xml
.\\project
.\\project config\\Fibre_Initialisation\\mymodel_initialisation.xml
.\\project config\\Cell_Fibre_Mechanics\\mymodel_rotating.xml
6 changes: 3 additions & 3 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.13.0) [1].
We implemented and solved the model using PhysiCell (Version 1.13.1) [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.13.0) [1].
Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM
as below:

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

[1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin,
Expand All @@ -23,7 +23,7 @@ with BioFVM [2] to solve the transport equations.
llelized diffusive transport solver for 3-D biological simulations,
Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730

If you use PhysiBOSS, please cite:
If you use PhysiBoSS, please cite:

G. Letort, A. Montagud, G. Stoll, R. Heiland, E. Barillot, P. Macklin,
A. Zinovyev, and L. Calzone. PhysiBoSS: a multi-scale agent based
Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,25 @@ load:
cp ./user_projects/$(PROJ)/config/* ./config/
cp ./user_projects/$(PROJ)/custom_modules/* ./custom_modules/

pack:
@echo " "
@echo "Preparing project $(PROJ) for sharing ... "
@echo " "
cd ./user_projects && zip -r $(PROJ).zip $(PROJ)
@echo " "
@echo "Share ./user_projects/$(PROJ).zip ... "
@echo "Other users can unzip $(PROJ).zip in their ./user_projects, compile, and run."
@echo " "

unpack:
@echo " "
@echo "Preparing shared project $(PROJ).zip for use ... "
@echo " "
cd ./user_projects && unzip $(PROJ).zip
@echo " "
@echo "Load this project via make load PROJ=$(PROJ) ... "
@echo " "

list-user-projects:
@echo "user projects::"
@cd ./user_projects && ls -dt1 * | grep . | sed 's!empty.txt!!'
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

**Release dates:** 29 July 2023 -
* 1.13.0 : 29 July 2023
* 1.13.1 : 6 August 2023

## Overview:
PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments.
Expand Down Expand Up @@ -67,13 +68,13 @@ Visit http://MathCancer.org/blog for the latest tutorials and help.

**Downloads:** http://PhysiCell.sf.net

**Support:** https://sourceforge.net/p/physicell/tickets/
**Support:** https://join.slack.com/t/physicellcomm-sf93727/shared_invite/zt-qj1av6yd-yVeer8VkQaNDjDz7fF00jA

**Quick Start:** Look at QuickStart.md in the documentation folder.

**User Guide:** Look at UserGuide.pdf in the documentation folder.

**Setup and Training:** See last year's workshop and hackathon at https://github.com/PhysiCell-Training/ws2021
**Setup and Training:** See this year's workshop and hackathon at https://github.com/PhysiCell-Training/ws2023

**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/

Expand All @@ -84,6 +85,12 @@ See changes.md for the full change log.
* * *

## Release summary:
Version 1.13.x \introduces PhysiMeSS (MicroEnvironment Structures Simulation) as a PhysiCell add-on created to model rod-shaped microenvironment elements such as the matrix fibres (e.g. collagen) of the ECM. These releases also introduce numerous bug fixes, particularly to handling of Dirichlet boundary conditions, while introducing numerous minor feature enhancements such as packing and unpacking user projects (to facilitate code sharing).

### Version 1.13.1 (6 August 2023):
Version 1.13.1 primarily introduces bug fixes for smoother addon support, as well as new makefile rules to pack a user project for sharing (`make pack PROJ=name`) and to unpack a shared project (`make unpack PROJ=name`). These will create (pack) or expand (unpack) zipped projects in the `./user_projects` folder. To share, send the zipped file and encourage the recipient to store it in their own `./user_projects` folder.

### Version 1.13.0 (29 July 2023):
Version 1.13.0 introduces PhysiMeSS (MicroEnvironment Structures Simulation) as a PhysiCell add-on created by Cicely Macnamara, Vincent Noël and collaborators, which allows the user to specify rod-shaped microenvironment elements such as the matrix fibres (e.g. collagen) of the ECM. This allows the PhysiCell user the ability to investigate fine-grained processes between cellular and fibrous ECM agents. We are providing an sample project together with this addon to demonstrate, via many examples, the possibilities of PhysiMeSS. For more information, consult the PhysiMeSS README available in [./addons/PhysiMeSS/README.md](./addons/PhysiMeSS/README.md). Version 1.13.0 also updates the bundled PhysiBoSS addon, introduces a variety of bug fixes (particularly in handling of Dirichlet boundary conditions), and improves SVG plots.

We are grateful for immense contributions by Cicely Macnamara, Vincent Noël, Randy Heiland, Daniel Bergman, Marco Ruscone, Furkan Kurtoglu, and Elmar Bucher in this release.
Expand All @@ -93,10 +100,21 @@ We are grateful for immense contributions by Cicely Macnamara, Vincent Noël, Ra
**NOTE 2:** Windows users need to follow an updated (from v1.8) MinGW64 installation procedure. This will install an updated version of g++, plus libraries that are needed for some of the intracellular models. See the [Quickstart](documentation/Quickstart.md) for details.

### Major new features and changes in the 1.13.z versions
#### 1.13.1
+ None in this release
#### 1.13.0
+ Introduced PhysiMeSS, a major addon for modeling fibers of the extracellular matrix. Major thanks to Cicely Macnamara, Vincent Noël, and team!

### Minor new features and changes:
#### 1.13.1
+ Continued modernization of sample projects for PhysiCell Studio compatibiltiy. See [PR 198](https://github.com/MathCancer/PhysiCell/pull/198).
+ Updated inhibitor behaviors in PhysiBoSS, and further code cleanup. See [PR 194](https://github.com/MathCancer/PhysiCell/pull/194). Thanks, Marco Ruscone!
+ PhysiBoSS cell line example migrated to newer MultiCellDS output. See [PR 193](https://github.com/MathCancer/PhysiCell/pull/193). Thanks, Vincent Noël!
+ Added a new makefile rule to simplify sharing user projects: `make pack PROJ=name` will zip all of the `name` user project in `./user_projects/name.zip`. Send this zip file for sharing your project, and have your recipient:
1. Place `name.zip` in thier `./user_projects/` folder (preferably PhysiCell version 1.13.1 or later)
2. Have them run the new rule `make unpack PROJ=name` to expand the project.
3. After this, the usual rules apply. `make load PROJ=name` to load the project, and a subsequent `make` to compile it.
+ Added a new makefile rule to simplify use of shared user projects: `make unpack PROJ=name` will unzip the contents of `./user_projects/name.zip` into a new user project called `name`. Type `make load PROJ=name` to load this project, and `make` to compile it.
#### 1.13.0
+ Preparations for a new derived `Cell` class for use in PhysiBoSS, including a new `instantiate_cell` function in `Cell_Functions` to help facilitate this. See [PR 153](https://github.com/MathCancer/PhysiCell/pull/153) (Thanks, Vincent Noël!)
+ Various safety refinements (`const` accessors) in vector operations ([PR 160](https://github.com/MathCancer/PhysiCell/pull/160)). Thanks, Vincent Noël!
Expand All @@ -110,12 +128,17 @@ We are grateful for immense contributions by Cicely Macnamara, Vincent Noël, Ra
+ minor cleanup

### Beta features (not fully supported):

#### 1.13.1
+ The dFBA addon is considered "beta" and unsupported at this time. Compatability work is underway. Thank you, Miguel Ponce de Leon and team!
#### 1.13.0
+ None in this release.

### Bugfixes:

#### 1.13.1
+ Bugfixes to and refinements to the libRoadrunner setup scripts. See [PR 196](https://github.com/MathCancer/PhysiCell/pull/196). Thanks to Randy Heiland and Furkan Kurtoglu.
+ Updated PHysiBoSS cell line example project to remove “default phenotype” function. See [PR 195](https://github.com/MathCancer/PhysiCell/pull/195). Thanks, Vincent Noël!
+ Fixed default cell constructor to improve backwards compatibility by including new SVG plot function pointers. See [PR 200](https://github.com/MathCancer/PhysiCell/pull/200). Thanks to John Metzcar for catching this and for careful detective work to isolate the cause!
+ Numerous bugfixes to PhysiCell zip distribution, including a better release protocol. Major thanks to Furkan Kurtoglu, Elmar Bucher, John Metzcar, and Randy Heiland for help!
#### 1.13.0
+ Fix typographical errors in Makefiles in sample projects.
+ Set correct value (100) of `cell_BM_repulsion_strength` in `PhysiCell_phenotype.cpp` (Thanks, Elmar Bucher!)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.0
1.13.1
2 changes: 1 addition & 1 deletion addons/PhysiBoSS/src/maboss_intracellular.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "maboss_network.h"
#include "utils.h"

static std::string PhysiBoSS_Version = "2.2.1";
static std::string PhysiBoSS_Version = "2.2.2";

class MaBoSSIntracellular : public PhysiCell::Intracellular {
private:
Expand Down
58 changes: 36 additions & 22 deletions addons/PhysiBoSS/src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,34 +81,48 @@ class MaBoSSOutput
double value;
double base_value;
int smoothing;
double smoothed_value;
double probability;
bool initialized = false;

MaBoSSOutput(std::string physicell_name, std::string intracellular_name, std::string action, double value, double base_value, int smoothing) : physicell_name(physicell_name), intracellular_name(intracellular_name), action(action), value(value), base_value(base_value), smoothing(smoothing) {
smoothed_value = base_value;
MaBoSSOutput(std::string physicell_name, std::string intracellular_name,
std::string action, double value, double base_value,
int smoothing)
: physicell_name(physicell_name), intracellular_name(intracellular_name),
action(action), value(value), base_value(base_value),
smoothing(smoothing) {
probability = 0.5;
}

void update_value(bool test) {
smoothed_value = (smoothed_value*smoothing + (test?1.0:0.0)) / (smoothing + 1.0);
double update_probability(bool test) {
if (!initialized) {
probability = test;
initialized = true;
} else
probability =
(probability * smoothing + (test ? 1.0 : 0.0)) / (smoothing + 1.0);

return probability;
}

double update(bool test)
{
double true_value;
if (smoothing == 0) {
true_value = value;
} else {
update_value((action == "activation" && test) || (action == "inhibition" and !test));
true_value = smoothed_value;
}
double update(bool test) {

if (action == "activation" && test) {
double hill = PhysiCell::Hill_response_function( true_value*2 , 1 , 10 );
return (value-base_value)*hill+base_value;
} else if (action == "inhibition" && !test) {
double hill = PhysiCell::Hill_response_function( true_value*2 , 1 , 10 );
return value-(value-base_value)*hill;
}
return base_value;
double hill_input;

if (smoothing == 0) {
hill_input = test ? 1.0 : 0.0;
} else {
hill_input = update_probability(test);
}

if (action == "activation") {
double hill = PhysiCell::Hill_response_function(hill_input * 2, 1, 10);
return (value - base_value) * hill + base_value;
} else if (action == "inhibition") {
double hill = PhysiCell::Hill_response_function(hill_input * 2, 1, 10);
return ((value - base_value) * (1 - hill)) + base_value;
}

return base_value;
}
};
#endif
16 changes: 14 additions & 2 deletions beta/setup_libroadrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,24 @@ def reminder_dynamic_link_path_linux():
print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.")
print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")

if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner")):
os_type = platform.system()

# Old:
# if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner")):

# New: July 2023 - trying to be smarter about deciding whether to (re)download libRR
# NOTE: needs to be tested cross-platform!
if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner","include","rr","C","rrc_api.h")):
print('\nlibroadrunner already installed.\n')

# regardless, let's remind the user about the env var requirement!
if os_type.lower() == 'darwin':
reminder_dynamic_link_path_macos()
elif os_type.lower().startswith("linux"):
reminder_dynamic_link_path_linux()

else:
print('\nThis model requires the libRoadrunner libraries which will now be downloaded.')
os_type = platform.system()
print('(for your ',os_type, ' operating system)')

# Assume Windows
Expand Down
Loading

0 comments on commit 8df2856

Please sign in to comment.