Skip to content

Commit b9d29f8

Browse files
committed
Merge branch 'development' of https://github.com/MathCancer/PhysiCell into development
2 parents 5582fe7 + e1f6e6f commit b9d29f8

File tree

18 files changed

+398
-215
lines changed

18 files changed

+398
-215
lines changed

BioFVM/BioFVM_basic_agent.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ class Basic_Agent
7373
std::vector<double> cell_source_sink_solver_temp_export1;
7474
std::vector<double> cell_source_sink_solver_temp_export2;
7575
std::vector<double> previous_velocity;
76-
bool is_active;
76+
// bool is_active;
7777

7878
std::vector<double> total_extracellular_substrate_change;
7979

8080
public:
81+
bool is_active;
82+
8183
std::vector<double> * secretion_rates;
8284
std::vector<double> * saturation_densities;
8385
std::vector<double> * uptake_rates;

README.md

Lines changed: 28 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems.
22

3-
**Version:** 1.7.0
3+
**Version:** 1.7.1
44

5-
**Release date:** 12 May 2020
5+
**Release date:** 2 June 2020
66

77
## Overview:
88
PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments.
@@ -32,7 +32,7 @@ Visit http://MathCancer.org/blog for the latest tutorials and help.
3232
heterogeneity-sample
3333
cancer-immune-sample
3434
virus-macrophage-sample
35-
temlate
35+
template
3636

3737
**make list-projects** : list all available sample projects
3838

@@ -62,158 +62,72 @@ See changes.md for the full change log.
6262
* * *
6363
## Release summary:
6464

65-
This release (1) adds "net export" as a new form of more generalized substrate secretion, (2) adds helper funtions for cell size and volume for esier configuration, (3) adds a new, standardized chemotaxis function, (4) adds 1D diffusion, and (5) introduces XML-based cell definitions as a beta feature. It also incorporates a variety of bugfixes.
65+
This release introduces bug fixes (particularly the placement of daughter cells after division), introduces new functions for uniformly random sampling of the unit circle and unit sphere, and refines the beta implementation of XML-based cell definitions.
6666

6767
**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation.
6868

6969
### Major new features and changes:
7070

71-
+ Added "net_export_rates" to "secretion" part of Phenotype, and to the Basic_Agent class in BioFVM. This is in response to SourceForge ticket 19.
72-
73-
+ Added new helper functions to help users to more easily set the *target* cell size:
74-
+ void Cell::set_target_volume( double new_volume ) sets the target total cell volume, while preserving the desired nuclear:cytoplasmic ratio and desired fluid fraction. In the default cell volume model, the cell will now approach this value by shrinking or growing.
75-
+ void Cell::set_target_radius( double new_radius ) behaves similarly, but using a radius instead.
76-
77-
+ Added Cell::set_radius( double new_radius ) to set the cell's current radius to the new value, preserving the nuclear:cytoplasmic ratio and fluid fraction. Note that this does not change the target values, so the cell will shrink or grow back towards its current target size.
78-
79-
+ Added 1-D diffusion solvers to BioFVM (useful for some coarse-grained problems). It solves for diffusion in the x-direction only. Use it by setting:
80-
81-
microenvironment.diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_LOD_1D
82-
83-
Use this right after setup_microenvironment() in your main.cpp file. Future versions will include an XML option to use 1D. Most users will never need this.
84-
85-
+ Added a standardized chemotaxis function to the standard models:
86-
87-
void chemotaxis_direction( Cell* pCell , Phenotype& phenotype , double dt );
88-
89-
This sets:
90-
91-
phenotype.motility.motility_bias_direction = direction * grad( index ), where
92-
93-
direction = phenotype.motility.chemotaxis_direction
94-
(1 to go up gradient, -1 to go down gradient)
95-
index = phenotype.motility.chemotaxis_index
96-
(the index of one of hte diffusing substrates)
97-
98-
+ Added Cell_Definitions in XML (beta feature) in response to SourceForge ticket 5. Users will be able to set the cell defaults definition by XML, as well as additional cell definitions that "inherit" phenotype parameters from cell defaults. This vastly reduces teh amount of necessary C++ to define a model. The new "template" sample project unifies 2D and 3D model specification using the new XML-based cell definitions. The next few releases will refine documentation and roll teh new XML-based cell definitions out to all the other sample projects.
71+
+ No major changes. See 1.7.0 for most recent major changes.
9972

10073
### Minor new features and changes:
10174

102-
+ Created get_cell_definition(std::string) to return by reference the matching cell definition (search by name). Returns cell_defaults if nothing found.
103-
104-
+ Created get_cell_definition(int) to return by reference the matching cell definition (search by type). Returns cell_defaults if nothing found.
105-
106-
+ added int chemotaxis_index and chemotaxis_direction to the Motility class to assist with a new standard chemotaxis function.
107-
108-
+ scale_all_secretion_by_factor also scales net_export_rates.
109-
110-
+ sync_to_current_microenvironment and sync_to_microenvironment set up net_export_rates
111-
112-
+ Secretion::advance now updates net_export processes
113-
114-
+ Secretion::set_all_secretion_to_zero and Secretion::scale_all_secretion_by_factor act on net_export_rates as well.
115-
116-
+ Cell::turn_off_reactions acts on net_export_rates as well.
117-
118-
+ BioFVM::Basic_Agent::simulate_secretion_and_uptake now updates net_export processes, including impact on internal tracked substrate totals. (And all appropriate initializatoin functions have been updated.
119-
120-
+ Updated documentation to reflect the new net export rates.
121-
122-
+ Updated the documentation to fully state the biotransport PDEs (for better clarity), including notes on the dimensions of the parameters.
123-
124-
+ Deprecated the following (unimplemented) function from the Volume class definition, as promised:
125-
```
126-
void update( Cell* pCell, Phenotype& phenotype, double dt )
127-
```
75+
+ Created new function std::vector<double> UniformOnUnitSphere( void ) that returns a (uniformly) random vector (x,y,z) on the unit sphere.
12876

129-
+ Added a new registry (unsorted map) of all cell definitions called cell_definitions_by_name and a vector of cell definitions called cell_definitions_by_index.
77+
+ Created new function std::vector<double> UniformOnUnitCircle( void ) that returns a (uniformly) random vector (x,y,0) on the unit circle (in the z = 0 plane).
13078

131-
+ The Cell_Definition default constructor and copy constructor automatically register all new cell definitions in cell_definitions_by_index;
79+
+ Created std::vector<double> LegacyRandomOnUnitSphere() that reproduces old behaviors of creating a random vector on the unit sphere. Never use this except if trying to replicate old results. Always use UniformOnUnitSphere() instead.
13280

133-
+ Created a display_cell_definitions(std::ostream&) function to quickly list all cell definitions and key information.
81+
+ Changed default placement of daughter cells to use UniformOnUnitCircle(), in response to longstanding "future plan" to "introduce improvements to placement of daughter cells after division."
13482

135-
+ Created build_cell_definitions_maps() to create cell_definitions_by_name and cell_definitions_by_type. This should go at the end of create_cell_types().
83+
+ All sample projects now check for <options> in their XML config files.
13684

137-
+ Created find_cell_definition(std::string) to return a pointer to the matching cell definition (search by name). Returns NULL if nothing found.
85+
+ Template projects calculate gradients and perform internal substrate tracking by default.
13886

139-
+ Created find_cell_definition(int) to return a pointer to the matching cell definition (search by type). Returns NULL if nothing found.
87+
+ Moved the bool is_active from "protected" to "public" in the Basic_Agent class in BioFVM_basic_agent.h, so that cells be be moved back into the domain and reactivated as needed.
14088

141-
+ Deprecated oxygen_index, glucose_index, TUMOR_TYPE, and VESSEL_TYPE from PhysiCell_Constants as promised.
142-
143-
+ Minor source code cleanup in PhysiCell_settings.cpp.
144-
145-
+ All sample projects now automatically build (and display) the registries of cell definitions via build_cell_definitions_maps() and display_cell_definitions().
146-
147-
+ added the following std::vector<bool> to Microenvironment_Options to facilitate setting Dirichlet conditions on specific boundaries for specific substates: Dirichlet_all, Dirichlet_xmin, Dirichlet_xmax, Dirichlet_ymin, Dirichlet_ymax, Dirichlet_zmin, Dirichlet_zmax, Dirichlet_interior.
148-
149-
+ Minor cleanup in BioFVM_microenvironment.cpp
150-
151-
+ Microenvironment::update_dirichlet_node(voxel_index,substrate_index,value) now sets dirichlet_activation_vectors[voxel_index][substrate_index] = true;
152-
153-
+ Microenvironment::set_substrate_dirichlet_activation( int substrate_index , bool new_value ) now sets dirichlet_activation_vectors[voxel_index][substrate_index] for ALL Dirichlet nodes.
154-
155-
+ Microenvironment::apply_dirichlet_conditions() now checks the Dirichlet activation vector of the individual voxel.
156-
157-
+ Microenvironment::resize_voxels() and the various Microenvironment::resize_space() functions now resize dirichlet_activation_vectors, using the default dirichlet_activation_vector as the initial uniform activation vector.
158-
159-
+ Microenvironment::resize_densities() and the various Microenvironment::add_density() functions now resize dirichlet_activation_vector and use it to intialize dirichlet_activation_vectors at every voxel.
160-
161-
+ The various Microenvironment::add_density() functions now
162-
163-
+ Added function Microenvironment::set_substrate_dirichlet_activation( int index, std::vector<bool>& new_value ) to set the entire vector of activation at a specific voxel.
89+
+ Changed beta implementation of XML cell definitions:
90+
+ In cycle, transition_rates renamed to phase_transition_rates. PhysiCell will give a deprecatoin warning for transition_rates until the official release of XML cell definitions.
91+
+ In death, rates renamed to death_rates. PhysiCell will give a deprecatoin warning for transition_rates until the official release of XML cell definitions.
92+
+ In cycle and death, "phase_durations" can now be used in place of phase_transition rates. This may be more intuitive for some modelers.
16493

94+
+ See 1.7.0 for other recent minor changes.
16595

16696
### Beta features (not fully supported):
16797

168-
+ Cell definitions can now be defined by XML files. See the note above. This functionality may be additionally refined in the next few releases while still in beta.
169-
98+
+ Cell definitions can now be defined by XML files. See the note above. This functionality may be additionally refined or modified in the next few releases while still in beta.
17099

171100
### Bugfixes:
172101

173-
+ In response to SourceForge ticket 25, added cell_defaults.phenotype.molecular.sync_to_microenvironment( &microenvironment ); to the create_cell_types() functions in the 2D and 3D template projects.
174-
175-
+ In response to SourceForge ticket 18, update_cell_and_death_parameters_O2_based() now checks for deterministic necrosis.
176-
177-
+ In response to GitHub issue 33, fixed issue where data-cleanup makefile rule gets a list of too many files. Rolled the new rule through to all the sample Makefiles as well.
178-
179-
```
180-
data-cleanup:
181-
rm -f *.mat
182-
rm -f *.xml
183-
rm -f *.svg
184-
rm -rf ./output
185-
mkdir ./output
186-
touch ./output/empty.txt
187-
```
188-
+ Updated Cell::Cell(), create_cell(), create_cell(Cell_Defintion), and convert_to_cell_definition() to call set_total_volume( phenotype.volume.total ). This makes sure that BioFVM knows the correct volume at the time of creation (or major update) so that it can save the correct values to outputs. This is in response to GitHub issue 22.
189-
190-
+ Removed the false statement from the user manual that stated that the cytoplasmic:nuclear ratio is between 0 and 1.
102+
+ In response to SourceForge ticket 26, fixed placement of parent cell in Cell::divide()
191103

192-
+ Removed the false statement from the user manual that stated that relative cell rupture volume is between 0 and 1.
104+
+ Removed errant Cell_Definition in the new template sample project.
193105

194-
+ Updated the list of PhysiCell_Constants in response to SourceForge ticket 11.
106+
+ Added an extra check for bad chemotaxis definitions in response ot SourceForge ticket 28.
195107

196-
+ The various Microenvironment::add_density() functions now only set dirichlet_activation_vector = true for the newly added substrate, rather than *all* of them. This new vector is then used to initialize the activation vectors at every voxel.
197-
198-
+ Microenvironment::get_substrate_dirichlet_activation() mistakenly returned a double. Now it returns bool.
108+
+ Fixed bugs in processing of the "death" section of XML cell definitions.
199109

200110
### Notices for intended changes that may affect backwards compatibility:
201111

202112
+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future.
203113

204114
+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters<T>.
205115

206-
+ We will introduce improvements to placement of daughter cells after division.
207-
208116
+ Some search functions (e.g., to find a substrate or a custom variable) will start to return -1 if no matches are found, rather than 0.
209117

210118
+ We will change the timing of when entry_functions are executed within cycle models. Right now, they are evaluated immediately after the exit from the preceding phase (and prior to any cell division events), which means that only the parent cell executes it, rather htan both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to exucte the entry function at the next cycle call. This should make daughter cells independently execute the entry function.
211119

212120
+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this.
213121

214122
### Planned future improvements:
123+
124+
+ Methods or scripts to make "upgrading" PhysiCell easier for existing projects (to avoid overwriting the config file, Makefile, or custom files.
215125

126+
+ Current "template" project will be rolled into a new "predator-prey" sample project, and "template" will be tidied up.
127+
216128
+ Further XML-based simulation setup.
129+
130+
+ current sample projects will be refactored to use XML cdell definitions.
217131

218132
+ read saved simulation states (as MultiCellDS digital snapshots)
219133

changes.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
**Version:** 1.7.1
44

5-
**Release date:** ?? May 2020
5+
**Release date:** 2 June 2020
66

77
## Release summary:
88

9-
This release ...
9+
This release introduces bug fixes (particularly the placement of daughter cells after division), introduces new functions for uniformly random sampling of the unit circle and unit sphere, and refines the beta implementation of XML-based cell definitions.
1010

1111
**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation.
1212

@@ -22,35 +22,56 @@ This release ...
2222

2323
+ Created std::vector<double> LegacyRandomOnUnitSphere() that reproduces old behaviors of creating a random vector on the unit sphere. Never use this except if trying to replicate old results. Always use UniformOnUnitSphere() instead.
2424

25+
+ Changed default placement of daughter cells to use UniformOnUnitCircle(), in response to longstanding "future plan" to "introduce improvements to placement of daughter cells after division."
26+
27+
+ All sample projects now check for <options> in their XML config files.
28+
29+
+ Template projects calculate gradients and perform internal substrate tracking by default.
30+
31+
+ Moved the bool is_active from "protected" to "public" in the Basic_Agent class in BioFVM_basic_agent.h, so that cells be be moved back into the domain and reactivated as needed.
32+
33+
+ Changed beta implementation of XML cell definitions:
34+
+ In cycle, transition_rates renamed to phase_transition_rates. PhysiCell will give a deprecatoin warning for transition_rates until the official release of XML cell definitions.
35+
+ In death, rates renamed to death_rates. PhysiCell will give a deprecatoin warning for transition_rates until the official release of XML cell definitions.
36+
+ In cycle and death, "phase_durations" can now be used in place of phase_transition rates. This may be more intuitive for some modelers.
37+
2538
+ See 1.7.0 for other recent minor changes.
2639

2740
### Beta features (not fully supported):
2841

29-
+ Cell definitions can now be defined by XML files. See the note above. This functionality may be additionally refined in the next few releases while still in beta.
42+
+ Cell definitions can now be defined by XML files. See the note above. This functionality may be additionally refined or modified in the next few releases while still in beta.
3043

3144
### Bugfixes:
3245

3346
+ In response to SourceForge ticket 26, fixed placement of parent cell in Cell::divide()
3447

3548
+ Removed errant Cell_Definition in the new template sample project.
3649

50+
+ Added an extra check for bad chemotaxis definitions in response ot SourceForge ticket 28.
51+
52+
+ Fixed bugs in processing of the "death" section of XML cell definitions.
53+
3754
### Notices for intended changes that may affect backwards compatibility:
3855

3956
+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future.
4057

4158
+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters<T>.
4259

43-
+ We will introduce improvements to placement of daughter cells after division.
44-
4560
+ Some search functions (e.g., to find a substrate or a custom variable) will start to return -1 if no matches are found, rather than 0.
4661

4762
+ We will change the timing of when entry_functions are executed within cycle models. Right now, they are evaluated immediately after the exit from the preceding phase (and prior to any cell division events), which means that only the parent cell executes it, rather htan both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to exucte the entry function at the next cycle call. This should make daughter cells independently execute the entry function.
4863

4964
+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this.
5065

5166
### Planned future improvements:
67+
68+
+ Methods or scripts to make "upgrading" PhysiCell easier for existing projects (to avoid overwriting the config file, Makefile, or custom files.
5269

70+
+ Current "template" project will be rolled into a new "predator-prey" sample project, and "template" will be tidied up.
71+
5372
+ Further XML-based simulation setup.
73+
74+
+ current sample projects will be refactored to use XML cdell definitions.
5475

5576
+ read saved simulation states (as MultiCellDS digital snapshots)
5677

0 commit comments

Comments
 (0)