diff --git a/.github/workflows/test-macosx.yml b/.github/workflows/test-macosx.yml index 6fe6128a1..ed9830771 100644 --- a/.github/workflows/test-macosx.yml +++ b/.github/workflows/test-macosx.yml @@ -43,4 +43,27 @@ jobs: - name: Run PhysiBoSS cell lines project run: | - ./PhysiBoSS_Cell_Lines \ No newline at end of file + ./PhysiBoSS_Cell_Lines + + build_physimess: + + runs-on: macos-11 + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run : brew install gcc@11 + + - name: Build PhysiMeSS project + run: | + make physimess-sample + make clean + make PHYSICELL_CPP=g++-11 + + - name: Run PhysiMeSS project + run: | + ./project config/mymodel.xml + ./project config/Fibre_Initialisation/mymodel_initialisation.xml + ./project config/Cell_Fibre_Mechanics/mymodel_rotating.xml + \ No newline at end of file diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test-ubuntu.yml index 2e5ad7340..fdb2a11f3 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test-ubuntu.yml @@ -33,4 +33,18 @@ jobs: - name: Run PhysiBoSS cell lines project run: | - ./PhysiBoSS_Cell_Lines \ No newline at end of file + ./PhysiBoSS_Cell_Lines + + - name: Build PhysiMeSS project + run: | + make reset + make physimess-sample + make clean + make + + - name: Run PhysiMeSS project + run: | + ./project config/mymodel.xml + ./project config/Fibre_Initialisation/mymodel_initialisation.xml + ./project config/Cell_Fibre_Mechanics/mymodel_rotating.xml + \ No newline at end of file diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 60c113345..e345e2098 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -39,4 +39,18 @@ jobs: - name: Run PhysiBoSS cell lines project run: | - .\\PhysiBoSS_Cell_Lines.exe \ No newline at end of file + .\\PhysiBoSS_Cell_Lines.exe + + - name: Build PhysiMeSS project + run: | + make reset + make physimess-sample + make clean + make + + - name: Run PhysiMeSS project + run: | + .\\project config\\mymodel.xml + .\\project config\\Fibre_Initialisation\\mymodel_initialisation.xml + .\\project config\\Cell_Fibre_Mechanics\\mymodel_rotating.xml + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3a96ffe47..0e6c23e7c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,9 @@ project initial.svg initial.svg interaction_demo +addons/libRoadrunner/roadrunner/ +addons/libRoadrunner/roadrunner-win64-vs14-cp35m.zip +addons/PhysiBoSS/MaBoSS-env-2.0/ +addons/PhysiBoSS/libMaBoSS-*.tar.gz +user_projects/* +!user_projects/empty.txt \ No newline at end of file diff --git a/BioFVM/BioFVM_basic_agent.cpp b/BioFVM/BioFVM_basic_agent.cpp index cd29f7486..b3ef1e370 100644 --- a/BioFVM/BioFVM_basic_agent.cpp +++ b/BioFVM/BioFVM_basic_agent.cpp @@ -300,6 +300,10 @@ double Basic_Agent::get_total_volume() return volume; } +const std::vector& Basic_Agent::get_previous_velocity( void ) { + return previous_velocity; +} + void Basic_Agent::simulate_secretion_and_uptake( Microenvironment* pS, double dt ) { if(!is_active) diff --git a/BioFVM/BioFVM_basic_agent.h b/BioFVM/BioFVM_basic_agent.h index 43bafeba6..4e34391c7 100644 --- a/BioFVM/BioFVM_basic_agent.h +++ b/BioFVM/BioFVM_basic_agent.h @@ -111,7 +111,7 @@ class Basic_Agent void update_position( double dt ); Basic_Agent(); - + virtual ~Basic_Agent(){}; // simulate secretion and uptake at the nearest voxel at the indicated microenvironment. // if no microenvironment indicated, use the currently selected microenvironment. void simulate_secretion_and_uptake( Microenvironment* M, double dt ); @@ -125,6 +125,8 @@ class Basic_Agent std::vector& nearest_gradient( int substrate_index ); // directly access a vector of gradients, one gradient per substrate std::vector& nearest_gradient_vector( void ); + + const std::vector& get_previous_velocity( void ); }; extern std::vector all_basic_agents; diff --git a/BioFVM/BioFVM_microenvironment.cpp b/BioFVM/BioFVM_microenvironment.cpp index a93eb50aa..1c330870f 100644 --- a/BioFVM/BioFVM_microenvironment.cpp +++ b/BioFVM/BioFVM_microenvironment.cpp @@ -152,7 +152,7 @@ Microenvironment::Microenvironment() one_third /= 3.0; dirichlet_value_vectors.assign( mesh.voxels.size(), one ); - dirichlet_activation_vector.assign( 1 , true ); + dirichlet_activation_vector.assign( 1 , false ); dirichlet_activation_vectors.assign( 1 , dirichlet_activation_vector ); @@ -212,7 +212,7 @@ void Microenvironment::update_dirichlet_node( int voxel_index , int substrate_in dirichlet_value_vectors[voxel_index][substrate_index] = new_value; dirichlet_activation_vectors[voxel_index][substrate_index] = true; - + return; } @@ -250,6 +250,12 @@ bool Microenvironment::get_substrate_dirichlet_activation( int substrate_index ) return dirichlet_activation_vector[substrate_index]; } +// TODO? fix confusing swapped usage of args +double Microenvironment::get_substrate_dirichlet_value( int substrate_index, int index ) +{ + return dirichlet_value_vectors[index][substrate_index]; +} + // new functions for finer-grained control of Dirichlet conditions -- 1.7.0 void Microenvironment::set_substrate_dirichlet_activation( int substrate_index , int index, bool new_value ) @@ -261,6 +267,7 @@ void Microenvironment::set_substrate_dirichlet_activation( int substrate_index , bool Microenvironment::get_substrate_dirichlet_activation( int substrate_index, int index ) { return dirichlet_activation_vectors[index][substrate_index]; } + void Microenvironment::apply_dirichlet_conditions( void ) { /* @@ -436,12 +443,12 @@ void Microenvironment::resize_densities( int new_size ) one_third /= 3.0; dirichlet_value_vectors.assign( mesh.voxels.size(), one ); - dirichlet_activation_vector.assign( new_size, true ); + dirichlet_activation_vector.assign( new_size, false ); dirichlet_activation_vectors.assign( mesh.voxels.size(), dirichlet_activation_vector ); default_microenvironment_options.Dirichlet_condition_vector.assign( new_size , 1.0 ); - default_microenvironment_options.Dirichlet_activation_vector.assign( new_size, true ); + default_microenvironment_options.Dirichlet_activation_vector.assign( new_size, false ); default_microenvironment_options.initial_condition_vector.assign( new_size , 1.0 ); @@ -512,7 +519,7 @@ void Microenvironment::add_density( void ) // Fixes in PhysiCell preview November 2017 default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one; - default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true ); + default_microenvironment_options.Dirichlet_activation_vector.push_back( false ); default_microenvironment_options.initial_condition_vector.push_back( 1.0 ); @@ -577,15 +584,14 @@ void Microenvironment::add_density( std::string name , std::string units ) one_third /= 3.0; dirichlet_value_vectors.assign( mesh.voxels.size(), one ); - dirichlet_activation_vector.push_back( true ); + dirichlet_activation_vector.push_back( false ); dirichlet_activation_vectors.assign( mesh.voxels.size(), dirichlet_activation_vector ); // fix in PhysiCell preview November 2017 default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one; - default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true ); + default_microenvironment_options.Dirichlet_activation_vector.push_back( false ); // assign( number_of_densities(), false ); - default_microenvironment_options.Dirichlet_all.push_back( true ); -// default_microenvironment_options.Dirichlet_interior.push_back( true ); + default_microenvironment_options.Dirichlet_all.push_back( false ); default_microenvironment_options.Dirichlet_xmin.push_back( false ); default_microenvironment_options.Dirichlet_xmax.push_back( false ); default_microenvironment_options.Dirichlet_ymin.push_back( false ); @@ -647,12 +653,12 @@ void Microenvironment::add_density( std::string name , std::string units, double one_third /= 3.0; dirichlet_value_vectors.assign( mesh.voxels.size(), one ); - dirichlet_activation_vector.push_back( true ); + dirichlet_activation_vector.push_back( false ); dirichlet_activation_vectors.assign( mesh.voxels.size(), dirichlet_activation_vector ); // fix in PhysiCell preview November 2017 default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one; - default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true ); + default_microenvironment_options.Dirichlet_activation_vector.push_back( false ); // assign( number_of_densities(), false ); default_microenvironment_options.initial_condition_vector.push_back( 1.0 ); @@ -1219,7 +1225,7 @@ Microenvironment_Options::Microenvironment_Options() outer_Dirichlet_conditions = false; Dirichlet_condition_vector.assign( pMicroenvironment->number_of_densities() , 1.0 ); - Dirichlet_activation_vector.assign( pMicroenvironment->number_of_densities() , true ); + Dirichlet_activation_vector.assign( pMicroenvironment->number_of_densities() , false ); initial_condition_vector.resize(0); // = Dirichlet_condition_vector; @@ -1523,11 +1529,13 @@ void initialize_microenvironment( void ) } */ - // set the Dirichlet condition activation vector to match the microenvironment options - for( int i=0 ; i < default_microenvironment_options.Dirichlet_activation_vector.size(); i++ ) - { - microenvironment.set_substrate_dirichlet_activation( i , default_microenvironment_options.Dirichlet_activation_vector[i] ); - } + // April 2023: no longer necessary after flipping our approach and doing an "additive" instead of "subtractive" DCs handling. I.e., we assume DC activation is false by default; make true on-demand. + + // // set the Dirichlet condition activation vector to match the microenvironment options + // for( int i=0 ; i < default_microenvironment_options.Dirichlet_activation_vector.size(); i++ ) + // { + // microenvironment.set_substrate_dirichlet_activation( i , default_microenvironment_options.Dirichlet_activation_vector[i] ); + // } microenvironment.display_information( std::cout ); return; diff --git a/BioFVM/BioFVM_microenvironment.h b/BioFVM/BioFVM_microenvironment.h index 3d14e8873..4896b44ad 100644 --- a/BioFVM/BioFVM_microenvironment.h +++ b/BioFVM/BioFVM_microenvironment.h @@ -252,6 +252,8 @@ class Microenvironment void set_substrate_dirichlet_activation( int substrate_index , int index, bool new_value ); void set_substrate_dirichlet_activation( int index, std::vector& new_value ); bool get_substrate_dirichlet_activation( int substrate_index, int index ); + + double get_substrate_dirichlet_value( int substrate_index, int index ); bool& is_dirichlet_node( int voxel_index ); diff --git a/BioFVM/BioFVM_vector.cpp b/BioFVM/BioFVM_vector.cpp index 6a35541e4..0cb50c7af 100644 --- a/BioFVM/BioFVM_vector.cpp +++ b/BioFVM/BioFVM_vector.cpp @@ -319,7 +319,7 @@ void randomize( std::vector* v ) /* axpy and related BLAS-type operations */ -void axpy( std::vector* y, double& a , std::vector& x ) +void axpy( std::vector* y, const double& a , const std::vector& x ) { for( unsigned int i=0; i < (*y).size() ; i++ ) { @@ -328,7 +328,7 @@ void axpy( std::vector* y, double& a , std::vector& x ) return ; } -void axpy( std::vector* y, std::vector& a , std::vector& x ) +void axpy( std::vector* y, const std::vector& a , const std::vector& x ) { for( unsigned int i=0; i < (*y).size() ; i++ ) { @@ -337,7 +337,7 @@ void axpy( std::vector* y, std::vector& a , std::vector& return; } -void naxpy( std::vector* y, double& a , std::vector& x ) +void naxpy( std::vector* y, const double& a , const std::vector& x ) { for( unsigned int i=0; i < (*y).size() ; i++ ) { @@ -346,7 +346,7 @@ void naxpy( std::vector* y, double& a , std::vector& x ) return ; } -void naxpy( std::vector* y, std::vector& a , std::vector& x ) +void naxpy( std::vector* y, const std::vector& a , const std::vector& x ) { for( unsigned int i=0; i < (*y).size() ; i++ ) { @@ -498,7 +498,7 @@ void vector3_to_list( const std::vector& vect , char*& buffer , char del return; } -double dot_product( std::vector& a , std::vector& b ) +double dot_product( const std::vector& a , const std::vector& b ) { double out = 0.0; for( unsigned int i=0 ; i < a.size() ; i++ ) @@ -506,7 +506,7 @@ double dot_product( std::vector& a , std::vector& b ) return out; } -std::vector cross_product( std::vector& a , std::vector& b ) +std::vector cross_product( const std::vector& a , const std::vector& b ) { std::vector out( 3, 0.0 ); out[0] = a[1]*b[2] - a[2]*b[1]; diff --git a/BioFVM/BioFVM_vector.h b/BioFVM/BioFVM_vector.h index 3910ce618..ec8cb8359 100644 --- a/BioFVM/BioFVM_vector.h +++ b/BioFVM/BioFVM_vector.h @@ -103,14 +103,14 @@ void randomize( std::vector* v ); /* axpy and related BLAS-type operations */ // y = y + a*x -void axpy( std::vector* y, double& a , std::vector& x ); +void axpy( std::vector* y, const double& a , const std::vector& x ); // y = y + a.*x -void axpy( std::vector* y, std::vector& a , std::vector& x ); +void axpy( std::vector* y, const std::vector& a , const std::vector& x ); // y = y - a*x -void naxpy( std::vector* y, double& a , std::vector& x ); +void naxpy( std::vector* y, const double& a , const std::vector& x ); // y = y - a.*x -void naxpy( std::vector* y, std::vector& a , std::vector& x ); +void naxpy( std::vector* y, const std::vector& a , const std::vector& x ); /* I may cut these from the final version */ /* CLEANUP BEFORE RELEASE */ @@ -141,9 +141,9 @@ void vector_to_list( const std::vector& vect , char*& buffer , char deli void vector3_to_list( const std::vector& vect , char*& buffer , char delim ); -double dot_product( std::vector& a , std::vector& b ); -std::vector cross_product( std::vector& a , std::vector& b ); - +double dot_product( const std::vector& a , const std::vector& b ); +std::vector cross_product( const std::vector& a , const std::vector& b ); + }; #endif diff --git a/CITATION.txt b/CITATION.txt index 6e9a426f8..525bacbae 100644 --- a/CITATION.txt +++ b/CITATION.txt @@ -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.12.0) [1]. +We implemented and solved the model using PhysiCell (Version 1.13.0) [1]. [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellu- @@ -11,7 +11,7 @@ We implemented and solved the model using PhysiCell (Version 1.12.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.12.0) [1], +We implemented and solved the model using PhysiCell (Version 1.13.0) [1], with BioFVM [2] to solve the transport equations. [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, diff --git a/Makefile b/Makefile index 3a9591725..00e0f1ade 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ BioFVM_utilities.o BioFVM_basic_agent.o BioFVM_MultiCellDS.o BioFVM_agent_contai PhysiCell_core_OBJECTS := PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o \ PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_basic_signaling.o \ -PhysiCell_signal_behavior.o PhyisiCell_rules.o +PhysiCell_signal_behavior.o PhysiCell_rules.o PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o @@ -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 mechano-sample rules-sample" + @echo " worm-sample interaction-sample mechano-sample rules-sample physimess-sample" @echo "" @echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample" @echo "" @@ -188,6 +188,14 @@ rules-sample: 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/ # ---- intracellular projects ode-energy-sample: diff --git a/README.md b/README.md index 18326fff4..809021c67 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems -**Versions:** 1.12.0 - +**Versions:** 1.13.0 - -**Release dates:** 15 May 2023 - -* 1.12.0 : 15 May 2023 +**Release dates:** 29 July 2023 - +* 1.13.0 : 29 July 2023 ## Overview: PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. @@ -40,6 +40,7 @@ Visit http://MathCancer.org/blog for the latest tutorials and help. * interaction-sample * mechano-sample * rules-sample + * physimess-sample **`make list-projects`** : list all available sample projects @@ -83,134 +84,52 @@ See changes.md for the full change log. * * * ## Release summary: -Version 1.12.0 introduces rules-based modeling: human-interpretable statements of the form +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. -> In cell type T, signal S increases/decreases behavior B - -are represented with a CSV format that can _directly_ and _uniquely_ map onto a Hill response function to auto-generate simulation code. `T` is any cell type in the simulation, `S` can be any signal in the signal dictionary, and `B` any supported behavior in the behavior dictionary. For example: - -* In malignant epithelial cells, pressure decreases cycle entry. -* In M0 macrophages, necrotic debris increases transformation to M1 macrophage. -* In effector T cells, contact with malignant epithelial cell decreases migration speed. -* In effector T cells, IFN-gamma increases attack of malignant epithelial cells. - -The CSV version of these statements can be parsed and transformed into code dynamically at runtime, without additional user-written C++ or recompiling. This will be the basis of a pre-compiled PhysiCell Studio (model design, execution, and visualization in one package) and similar PhysiCell Cloud (install-free, browser-based model design, execution, and visualization). This allows modelers to focus on choosing their hypotheses--how signals (stimuli) change cell behavior--and less on coding and debugging. It is our hope that this language is sufficiently expressive to write most models without additional user code. However, users can still write custom phenotype functions that can be integrated with rules-based modeling, allowing further fine-tuning of individual cell behavior. +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. **NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. **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.12.z versions -#### 1.12.0 -+ **Rules-based modeling:** See introduction above. - -+ **Automated annotation of the model hypotheses:** Upon parsing the rules, PhysiCell auto-generates HTML-formatted text annotating all model hypotheses, for use in a paper's method section. This is to encourage better model interoperability and reproducibility. - -+ **CSV-based specification of model rules:** - + Version 1: - ```cell_type , signal , direction , behavior , base_value , max_response_value , half_max , Hill_power , applies_to_dead``` - - + `cell_type`: The (human-readable) name of any cell type in the simulation, matching their declarations in the XML configuration file. - + Allowed values: Any named cell type in the simulation. - + `signal`: Any signal in the simulation's signal dictionary that can be queried to modulate a behavior. - + Allowed values: Any signal that is known to the signal dictionary. - + `direction`: Tells whether the signal increases or decreases the behavior. - + Allowed values: `increases` or `decreases` - + `behavior`: Any behavioral parameter in the simulation's behavior dictionary that can be edited to modulate a behavior. - + Allowed values: Any behavioral parameter that is known in the behavior dictionary. - + `base_value`: The value of the behavioral parameter in the absence of any signals - + Allowed value: Must match the behavior's parameter value in the cell definition - + `max_response_value`: The maximally changed behavior when acting under high values of signal - + Allowed values (for rules that increase the behavior): Any positive value equalling or exceeding the `base_value`. E.g., ten times the base value. - + Allowed values (for rules that decrease the behavior): Any positive value equal to or less than the `base_value`. E.g., one tenth the base value. - + `half_max`: Value of the signal at which the behavior undergoes half of its maximal change. - + Allowed values: Non-zero positive numbers. - + `Hill_power`: The Hill coefficient in a Hill response function. - + Allowed values: Any non-zero positive number. **Integer values are MUCH more computationally efficient.** - + 'applies_to_dead': Indicates if the rule should also be applied to dead cells. - + Allowed values: 0 (for false) or 1 (for true). - - + Version 2: - ```cell_type , signal , direction , behavior , max_response_value , half_max , Hill_power , applies_to_dead``` - This version always copies the `base_values` from the corresponding cell definition. - + `cell_type`: The (human-readable) name of any cell type in the simulation, matching their declarations in the XML configuration file. - + Allowed values: Any named cell type in the simulation. - + `signal`: Any signal in the simulation's signal dictionary that can be queried to modulate a behavior. - + Allowed values: Any signal that is known to the signal dictionary. - + `direction`: Tells whether the signal increases or decreases the behavior. - + Allowed values: `increases` or `decreases` - + `behavior`: Any behavioral parameter in the simulation's behavior dictionary that can be edited to modulate a behavior. - + Allowed values: Any behavioral parameter that is known in the behavior dictionary. - + `max_response_value`: The maximally changed behavior when acting under high values of signal - + Allowed values (for rules that increase the behavior): Any positive value equalling or exceeding the `base_value`. E.g., ten times the base value. - + Allowed values (for rules that decrease the behavior): Any positive value equal to or less than the `base_value`. E.g., one tenth the base value. - + `half_max`: Value of the signal at which the behavior undergoes half of its maximal change. - + Allowed values: Non-zero positive numbers. - + `Hill_power`: The Hill coefficient in a Hill response function. - + Allowed values: Any non-zero positive number. **Integer values are MUCH more computationally efficient.** - + `applies_to_dead`: Indicates if the rule should also be applied to dead cells. - + Allowed values: 0 (for false) or 1 (for true). - -+ Support for both rules-based behavior and traditional phenotype functions: If both are specified, then rules-based phenotype are applied first, followed by user-supplied phenotype functions that can further fine-tune cell behavior (as needed). - -+ Code-free model specification by PhysiCell Studio. - -+ Updated PhysiBoSS to remove cell definition "inheritance," (with "flat", self-standing cell definitions), to make it compatible with PhysiCell Studio. Hereafter, all properties of each cell definition must be explicitely defined. - -+ New section in `PhysiCell_settings.xml` to indicate a rules CSV file file: -``` - - - - ./config - cell_rules.csv - - - - -``` - + `protocol`: This value should always be `CBHG` (cell behavior hypothesis grammar) - + `version`: Use `0.0` (or none for pre-beta files, but migrate away from this.) Use `1.0` for v1 rules as specified above. Use `2.0` for v2 rules as specified above. - + `format`: For now, only `csv` is supported. - + `enabled`: Set `true` to apply the rules, and `false` otherwise. - * `folder`: Set the folder containing the rules file. This should typically be `./config`. - * `filename`: Set the name of the rules file. e.g., `cell_rules.csv`. +### Major new features and changes in the 1.13.z versions +#### 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.12.0 -+ Added new functions to `PhysiCell_basic_signaling`: - + `multivariate_Hill_response_function` combines multiple signals (`std::vector signals`) with individual half-maxes (`std::vector half_maxes`) and Hill powers (`std::vector hill_powers`) into a multivariate Hill response function, such that if only supplied with a single nonzero signal, then it returns the regular single-variable Hill function for that corresponding signal. - - + `multivariate_linear_response_function` combines multiple signals (`std::vector signals`) with independent minimal thresholds (`std::vector min_thresholds`: values below which individual linear responses are zero) and maximum thresholds (`std::vector max_thresholds )`: values above which individual linear responses are one) into a multivariate linear response, such that if only supplied with a single nonzero signal, then it returns the regular single-variable linear response function for that corresponding signal. This function is "capped" between 0 and 1. - - + `linear_response_to_Hill_parameters` determines a half-maximum and Hill power to approximate a linear response function (with minimum threshold `s0` and maximum threshold `s1`) with a Hill response function. - - + `Hill_response_to_linear_parameters` determins minimum and maximum thresholds to approximate a Hill response function (with half-maximum `half_max` and Hill power `double Hill_power`) with a linear response function. - -+ Added `double get_single_base_behavior( Cell_Definition* pCD , std::string name )` to `PhysiCell_signal_behavior` to extract single base behaviors directly from a `Cell_Definition`. - -+ Added `double get_single_base_behavior( Cell* pCD , std::string name )` to `PhysiCell_signal_behavior` to extract single base behaviors directly from a cell's corresponding `Cell_Definition`. - -+ PhysiCell outputs `dictionary.txt` at runtime with the current list of known signals and behaviors (for use in rules-based modeling). - -+ `BioFVM_vector` now includes `double dot_product( std::vector& a , std::vector& b );` for a standardized dot product. - -+ `BioFVM_vector` now includes `std::vector cross_product( std::vector& a , std::vector& b );` for a standardized cross product. - -+ Added new `rules-sample` sample project to demonstrate rules-based modeling. It's a "toy model" with tumor cells, macrophages, and T cells. - -+ Updated sample projects for compatibility. - -+ Added `make list-user-projects` rule to Makefile to list all user projects available for loading +#### 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! ++ Made changes to cell SVG plotting to support broader types of plotting in advance of PhysiMeSS [PR 162](https://github.com/MathCancer/PhysiCell/pull/162). Thanks, Vincent Noēl! ++ Added a safe way to query the current velocity via `Basic_Agent::get_previous_velocity()` in preparation for PhysiMeSS. [PR 163](https://github.com/MathCancer/PhysiCell/pull/163). Thanks, Vincent Noël! ++ Refined control of object counts in SVG for upcoming PhysiMeSS release. [PR 164](https://github.com/MathCancer/PhysiCell/pull/164). Thanks, Vincent! ++ Refined SVG plot options to incorporate substrates. [PR 181](https://github.com/MathCancer/PhysiCell/pull/181). Thanks, Marco Ruscone! ++ Updated PhysiBoSS to Version 2.2.1. See [PR 188](https://github.com/MathCancer/PhysiCell/pull/188). Thanks, Vincent Noël! ++ Updated unit tests (including `custom_DCs_2substrates`) ++ Added `damage rate` (from effector attack) to supported behaviors in the modeling gramamr ++ minor cleanup ### Beta features (not fully supported): -#### 1.12.0 + +#### 1.13.0 + None in this release. ### Bugfixes: -#### 1.12.0 -+ None in this release. +#### 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!) ++ Improved handling of `voxel_index` in `remove_agent_from_voxel` in preparation for voxel-spanning objects such as PhysiMeSS. [PR 159](https://github.com/MathCancer/PhysiCell/pull/159). Thanks, Vincent Noël! ++ Fixed bug to ensure cell definitions without `intracellular` defined get a `NULL` intracellular model function. [PR 182](and [PR 182](https://github.com/MathCancer/PhysiCell/pull/182). THanks, Marco Ruscone! ++ Fixed a whitespaced bug in SVG output. [PR 179](https://github.com/MathCancer/PhysiCell/pull/179). Thanks, Vincent Noël! ++ Fixed a PhysiBoSS bug where dead cells could execute models. [PR 180](https://github.com/MathCancer/PhysiCell/pull/180) Thanks, Vincent Noël! ++ Fixed bugs involving Dirichlet conditions and multiple substrates (thanks to Daniel Bergman for pointing it out!) See [Issue 124](rf. https://github.com/MathCancer/PhysiCell/issues/124) and [PR 149](https://github.com/MathCancer/PhysiCell/pull/180). Thank you, Daniel Bergman and Randy Heiland! ++ `cancer_biorobots` Makefille PROGRAM_NAME is now `cancer_biorobots` instead of `project` ++ Deleted a meaningless line `dt;` in PhysiCell_standard_models.cpp ++ Added missing commas to cell_rules.csv in rules_sample project ++ Fixed typo: `PhyisiCell_rules.o` to `PhysiCell_rules.o` in Makefile-default (thanks to Joseph Abrams for pointing it out!) ++ Fixed errors in SBML ODE models. See [PR 185](https://github.com/MathCancer/PhysiCell/pull/185) and [PR 186](https://github.com/MathCancer/PhysiCell/pull/186). Thanks, Furkan Kurtoglu and Vincent Noël! ++ Fixed errors the PhysiBoSS readme. See [PR 187](https://github.com/MathCancer/PhysiCell/pull/187). Thanks, Vincent Noël! ### Notices for intended changes that may affect backwards compatibility: + We intend to deprecate the unused phenotype variables `relative_maximum_attachment_distance`, `relative_detachment_distance`, and `maximum_attachment_rate` from `phenotype.mechanics.` diff --git a/VERSION.txt b/VERSION.txt index 32bd932f3..f88cf52e6 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.12.0 \ No newline at end of file +1.13.0 \ No newline at end of file diff --git a/addons/PhysiBoSS/src/maboss_intracellular.h b/addons/PhysiBoSS/src/maboss_intracellular.h index 2f7958f5b..417b51aab 100644 --- a/addons/PhysiBoSS/src/maboss_intracellular.h +++ b/addons/PhysiBoSS/src/maboss_intracellular.h @@ -10,7 +10,7 @@ #include "maboss_network.h" #include "utils.h" -static std::string PhysiBoSS_Version = "2.2.0"; +static std::string PhysiBoSS_Version = "2.2.1"; class MaBoSSIntracellular : public PhysiCell::Intracellular { private: @@ -68,10 +68,12 @@ class MaBoSSIntracellular : public PhysiCell::Intracellular { } void update(PhysiCell::Cell * cell, PhysiCell::Phenotype& phenotype, double dt) { - this->update_inputs(cell, phenotype, dt); - this->maboss.run_simulation(); - this->update_outputs(cell, phenotype, dt); - this->next_physiboss_run += this->maboss.get_time_to_update(); + if (!cell->phenotype.death.dead) { + this->update_inputs(cell, phenotype, dt); + this->maboss.run_simulation(); + this->update_outputs(cell, phenotype, dt); + this->next_physiboss_run += this->maboss.get_time_to_update(); + } } bool need_update() { diff --git a/addons/PhysiMeSS/PhysiMeSS.cpp b/addons/PhysiMeSS/PhysiMeSS.cpp new file mode 100644 index 000000000..e1f572b3b --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS.cpp @@ -0,0 +1,254 @@ +#include "PhysiMeSS.h" + +#include +#include + + +static double last_update_time = -mechanics_dt; + +void remove_physimess_out_of_bounds_fibres() +{ + for (auto* cell : *all_cells) { + if (isFibre(cell) && static_cast(cell)->fail_count >= 10) + { + // std::cout << "I failed to place " << cell->type_name << " " + // << cell->ID << " in the domain - I am deleting agent " + // << std::endl; + delete_cell(cell); + } + } +} + +void physimess_update_cell_velocity( Cell* pCell, Phenotype& phenotype, double dt) +{ + + double movement_threshold = PhysiCell::parameters.doubles("fibre_stuck_threshold"); + if (!isFibre(pCell) && phenotype.motility.is_motile) { + + // Here I changed this, because here we don't have access to the old position, and I didn't want to track the old position + // So I'm using the previous velocity, which is not exactly the same (because of Adams-Bashforth), but is a good proxy + // if (dist(pCell->old_position, pCell->position) < movement_threshold) { + if (norm(pCell->get_previous_velocity())*mechanics_dt < movement_threshold) { + static_cast(pCell)->stuck_counter++; + } else { + static_cast(pCell)->stuck_counter = 0; + } + } + + if( pCell->functions.add_cell_basement_membrane_interactions ) + { + pCell->functions.add_cell_basement_membrane_interactions(pCell, phenotype,dt); + } + + pCell->state.simple_pressure = 0.0; + pCell->state.neighbors.clear(); // new 1.8.0 + + if (!isFibre(pCell)) { + //First check the neighbors in my current voxel + for (auto* neighbor: pCell->get_container()->agent_grid[pCell->get_current_mechanics_voxel_index()]) + { + if (!isFibre(neighbor)) { + pCell->add_potentials(neighbor); + } + } + for (auto neighbor_voxel_index: pCell->get_container()->underlying_mesh.moore_connected_voxel_indices[pCell->get_current_mechanics_voxel_index()]) + { + if(!is_neighbor_voxel(pCell, pCell->get_container()->underlying_mesh.voxels[pCell->get_current_mechanics_voxel_index()].center, pCell->get_container()->underlying_mesh.voxels[neighbor_voxel_index].center, neighbor_voxel_index)) + continue; + + for (auto* neighbor: pCell->get_container()->agent_grid[neighbor_voxel_index]) + { + if (!isFibre(neighbor)) { + pCell->add_potentials(neighbor); + } + } + } + } else { + // Count crosslinks + static_cast(pCell)->X_crosslink_count = 0; + if (static_cast(pCell)->fibres_crosslinkers.size() > 0){ + static_cast(pCell)->X_crosslink_count = static_cast(pCell)->fibres_crosslinkers.size(); + } + + } + + // std::cout << " AGENT " << pCell->type_name << " " << pCell->ID << " has " ; + //add potentials between pCell and its neighbors + for (auto* neighbor : static_cast(pCell)->physimess_neighbors) + { + // std::cout << neighbor->type_name << " " << neighbor->ID << " " ; + + // if( this->ID == other_agent->ID ) + if( pCell != neighbor ) + { + if (!isFibre(pCell) && !isFibre(neighbor)) { + //Already done above + continue; + } else + if (!isFibre(pCell) && isFibre(neighbor)) { + static_cast(pCell)->add_potentials_from_fibre(static_cast(neighbor)); + } else if (isFibre(pCell) && !isFibre(neighbor)) { + static_cast(pCell)->add_potentials_from_cell(static_cast(neighbor)); + } else if (isFibre(pCell) && isFibre(neighbor)) { + static_cast(pCell)->add_potentials_from_fibre(static_cast(neighbor)); + } else { + // std::cout << " WARNING: interaction between errant cell-types has been called : " << pCell->type_name << ", " << neighbor->type_name << std::endl; + return; + } + } + } + // std::cout << std::endl; + + if (!isFibre(pCell)) { + + PhysiMeSS_Cell* ppCell = static_cast(pCell); + int stuck_threshold = 10; + int unstuck_threshold = 1; + + if (ppCell->stuck_counter == stuck_threshold){ + // std::cout << "!HELP! cell " << pCell->ID << " gets stuck at time " + // << PhysiCell_globals.current_time << std::endl; + ppCell->stuck_counter = 0; + ppCell->unstuck_counter = 1; + } + + if (1 <= ppCell->unstuck_counter && ppCell->unstuck_counter < unstuck_threshold+1) { + /*std::cout << " getting unstuck at time " + << PhysiCell_globals.current_time << std::endl;*/ + ppCell->unstuck_counter++; + ppCell->force_update_motility_vector(dt); + ppCell->velocity += phenotype.motility.motility_vector; + } + else { + pCell->update_motility_vector(dt); + pCell->velocity += phenotype.motility.motility_vector; + } + + if(ppCell->unstuck_counter == unstuck_threshold+1){ + ppCell->unstuck_counter = 0; + } + } + return; + +} + +void physimess_mechanics( double dt ) +{ + static double dt_tolerance = 0.001 * dt; + if(fabs(((PhysiCell_globals.current_time - last_update_time)) - dt) < dt_tolerance) + { + last_update_time = PhysiCell_globals.current_time; + + #pragma omp parallel for + for( int i=0; i < (*all_cells).size(); i++ ) + { + Cell* pC = (*all_cells)[i]; + + static_cast(pC)->physimess_voxels.clear(); + if( !pC->is_out_of_domain ) + { + static_cast(pC)->register_fibre_voxels(); + } + } + + #pragma omp parallel for + for( int i=0; i < (*all_cells).size(); i++ ) + { + Cell* pC = (*all_cells)[i]; + static_cast(pC)->physimess_neighbors.clear(); + if (isFibre(pC)) { + static_cast(pC)->fibres_crosslinkers.clear(); + } + if( !pC->is_out_of_domain ) + { + static_cast(pC)->find_agent_neighbors(); + } + } + + #pragma omp parallel for + for( int i=0; i < (*all_cells).size(); i++ ) + { + Cell* pC = (*all_cells)[i]; + if( !pC->is_out_of_domain ) + { + static_cast(pC)->deregister_fibre_voxels(); + } + } + + // determine and add crosslinks + #pragma omp parallel for + for( int i=0; i < (*all_cells).size(); i++ ) + { + Cell* pC = (*all_cells)[i]; + if (isFibre(pC)) { + static_cast(pC)->add_crosslinks(); + } + } + } +} + + +void fibre_agent_SVG(std::ofstream& os, PhysiCell::Cell* pC, double z_slice, std::vector (*cell_coloring_function)(Cell*), double X_lower, double Y_lower) { + + // place a rod if it's a fibre (note fibre already renamed here) + if (isFibre(pC) ){ + + PhysiMeSS_Fibre* pFibre = static_cast(pC); + int crosslinks = pFibre->X_crosslink_count; + if (crosslinks >= 3){ + // if fibre has cross-links different colour than if not + Write_SVG_line(os, (pC->position)[0] - (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] - (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + (pC->position)[0] + (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] + (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + 4.0, "darkblue"); + } + else if (crosslinks == 2){ + // if fibre has cross-links different colour than if not + Write_SVG_line(os, (pC->position)[0] - (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] - (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + (pC->position)[0] + (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] + (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + 4.0, "blue"); + } + else if (crosslinks == 1){ + // if fibre has cross-links different colour than if not + Write_SVG_line(os, (pC->position)[0] - (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] - (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + (pC->position)[0] + (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] + (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + 4.0, "steelblue"); + } + else { + Write_SVG_line(os, (pC->position)[0] - (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] - (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + (pC->position)[0] + (pFibre->mLength) * (pC->state.orientation)[0] - X_lower, + (pC->position)[1] + (pFibre->mLength) * (pC->state.orientation)[1] - Y_lower, + 4.0, "lightskyblue"); + } + + } + else{ + standard_agent_SVG(os, pC, z_slice, cell_coloring_function, X_lower, Y_lower); + } +} + +void fibre_agent_legend(std::ofstream& os, Cell_Definition* cell_definition, double& cursor_x, double& cursor_y, std::vector (*cell_coloring_function)(Cell*), double temp_cell_radius) { + + // switch to the cell type + Cell C; + C.convert_to_cell_definition( *cell_definition ); + + // get the colors using the current coloring function + std::vector colors = cell_coloring_function(&C); + + // place the label + // place a rod if it's a fibre (note fibre not yet renamed) + if (isFibre(&C)) { + //Write_SVG_fibre(os, cursor_x, cursor_y , 0.5*temp_cell_radius , 1.0 , colors[1] , colors[0] ); + Write_SVG_line(os, cursor_x, cursor_y-20.0 , cursor_x , cursor_y+20.0 , 4.0 , "lightskyblue" ); + } + else { + standard_agent_legend(os, cell_definition, cursor_x, cursor_y, cell_coloring_function, temp_cell_radius); + } +} \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS.h b/addons/PhysiMeSS/PhysiMeSS.h new file mode 100644 index 000000000..de1911a17 --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS.h @@ -0,0 +1,23 @@ +#ifndef __PHYSIMESS__ +#define __PHYSIMESS__ + +#include "../../core/PhysiCell_cell.h" +#include "../../modules/PhysiCell_pathology.h" +#include "PhysiMeSS_cell.h" +#include "PhysiMeSS_fibre.h" + +#include + +using namespace PhysiCell; + +static std::string PhysiMeSS_Version = "1.0.0"; + +void remove_physimess_out_of_bounds_fibres(); + +void physimess_mechanics( double dt ); +void physimess_update_cell_velocity( Cell* pCell, Phenotype& phenotype, double dt); + +void fibre_agent_SVG(std::ofstream& os, PhysiCell::Cell* pCell, double z_slice, std::vector (*cell_coloring_function)(Cell*), double X_lower, double Y_lower); +void fibre_agent_legend(std::ofstream& os, Cell_Definition* cell_definition, double& cursor_x, double& cursor_y, std::vector (*cell_coloring_function)(Cell*), double temp_cell_radius); + +#endif \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS_agent.cpp b/addons/PhysiMeSS/PhysiMeSS_agent.cpp new file mode 100644 index 000000000..964ade6a6 --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_agent.cpp @@ -0,0 +1,56 @@ +#include "PhysiMeSS_agent.h" + +#include +// #include "PhysiMeSS_fibre.h" + +PhysiMeSS_Agent::PhysiMeSS_Agent() +{ + physimess_neighbors.clear(); + physimess_voxels.clear(); +} + +std::list PhysiMeSS_Agent::find_agent_voxels() { + + // this code is for creating a list of all voxels which either contain the agent + // or are neighboring voxels of the voxel containing the agent + std::list all_agent_voxels_to_test; + + for (int voxel: physimess_voxels) + { + all_agent_voxels_to_test.push_back(voxel); + + for (auto side_voxel : this->get_container()->underlying_mesh.moore_connected_voxel_indices[voxel]) + { + all_agent_voxels_to_test.push_back(side_voxel); + } + } + // get rid of any duplicated voxels + all_agent_voxels_to_test.sort(); + all_agent_voxels_to_test.unique(); + + return all_agent_voxels_to_test; +} + +void PhysiMeSS_Agent::find_agent_neighbors() { + + // this code is for finding all neighbors of an agent: first we call find_agent_voxels + // to create a list of all the voxels to test, then we search for agents in those voxels + + std::list voxels_to_test = this->find_agent_voxels(); + + //std::cout << "Agent " << pCell->ID << " is tested in voxels: " ; + for (int voxel: voxels_to_test) + { + //std::cout << voxel << " " ; + for (auto* neighbor : this->get_container()->agent_grid[voxel]) + { + // do not include the neighbor if it is the agent itself or if it is in the list already + if (this != neighbor){ + if (std::find(physimess_neighbors.begin(), physimess_neighbors.end(), neighbor) == physimess_neighbors.end()) { + physimess_neighbors.push_back(neighbor); + } + } + } + } + //std::cout << std::endl; +} \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS_agent.h b/addons/PhysiMeSS/PhysiMeSS_agent.h new file mode 100644 index 000000000..7bea002d0 --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_agent.h @@ -0,0 +1,30 @@ +#ifndef __PhysiMeSS_agent_h__ +#define __PhysiMeSS_agent_h__ + + +#include + +#include "../../core/PhysiCell.h" + +// using namespace PhysiCell; + +class PhysiMeSS_Agent : public PhysiCell::Cell +{ + private: + public: + + std::vector physimess_neighbors; + std::list physimess_voxels; + + PhysiMeSS_Agent(); + virtual ~PhysiMeSS_Agent(){}; + + virtual void register_fibre_voxels() {}; + virtual void deregister_fibre_voxels() {}; + + std::list find_agent_voxels(); + void find_agent_neighbors(); + +}; + +#endif \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS_cell.cpp b/addons/PhysiMeSS/PhysiMeSS_cell.cpp new file mode 100644 index 000000000..0eb9714e4 --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_cell.cpp @@ -0,0 +1,188 @@ +#include "PhysiMeSS_cell.h" +#include "PhysiMeSS_fibre.h" + +PhysiMeSS_Cell::PhysiMeSS_Cell() +{ + stuck_counter = 0; + unstuck_counter = 0; +} + + +void PhysiMeSS_Cell::register_fibre_voxels() +{ + //a cell will be in one voxel + int voxel = this->get_container()->underlying_mesh.nearest_voxel_index(this->position); + physimess_voxels.push_back(voxel); + +} + +void PhysiMeSS_Cell::deregister_fibre_voxels() { + + //only do this for fibres + return; +} + + +void PhysiMeSS_Cell::add_potentials_from_fibre(PhysiMeSS_Fibre* pFibre) +{ + + double distance = 0.0; + pFibre->nearest_point_on_fibre(position, displacement); + for (int index = 0; index < 3; index++) { + distance += displacement[index] * displacement[index]; + } + distance = std::max(sqrt(distance), 0.00001); + /*if( this->phenotype.motility.is_motile) { + std::cout << " determining distance from " << this->type_name << " " << this->ID << " to " + << (*other_agent).type_name << " " << (*other_agent).ID + << " the distance is " << distance << std::endl; + }*/ + + // as per PhysiCell + static double simple_pressure_scale = 0.027288820670331; + + // check distance relative repulsion and adhesion distances + // cell should repel from a fibre if it comes within cell radius plus fibre radius (note fibre radius ~2 micron) + double R = phenotype.geometry.radius + pFibre->mRadius; + // cell should feel adhesion over + double max_interactive_distance = + phenotype.mechanics.relative_maximum_adhesion_distance * phenotype.geometry.radius + + pFibre->phenotype.mechanics.relative_maximum_adhesion_distance * + pFibre->mRadius; + + // First Repulsion as per PhysiCell + double temp_r = 0; + if (distance > R) { + temp_r = 0; + } else { + // temp_r = 1 - distance/R; + temp_r = -distance; // -d + temp_r /= R; // -d/R + temp_r += 1.0; // 1-d/R + temp_r *= temp_r; // (1-d/R)^2 + + // add the relative pressure contribution NOT SURE IF NEEDED + state.simple_pressure += (temp_r / simple_pressure_scale); + + double effective_repulsion = sqrt(phenotype.mechanics.cell_cell_repulsion_strength * + pFibre->phenotype.mechanics.cell_cell_repulsion_strength); + temp_r *= effective_repulsion; + } + + if (fabs(temp_r) < 1e-16) { return; } + temp_r /= distance; + + axpy(&(velocity), temp_r, displacement); + + //Then additional repulsion/adhesion as per Cicely's code + double fibre_adhesion = 0; + double fibre_repulsion = 0; + if (distance < max_interactive_distance) { + const std::vector previous_velocity = get_previous_velocity(); + double cell_velocity_dot_fibre_direction = 0.; + for (unsigned int j = 0; j < 3; j++) { + cell_velocity_dot_fibre_direction += pFibre->state.orientation[j] * previous_velocity[j]; + } + double cell_velocity = 0; + for (unsigned int j = 0; j < velocity.size(); j++) { + cell_velocity += previous_velocity[j] * previous_velocity[j]; + } + cell_velocity = std::max(sqrt(cell_velocity), 1e-8); + + double p_exponent = 1.0; + double q_exponent = 1.0; + double xi = fabs(cell_velocity_dot_fibre_direction) / (cell_velocity); + double xip = pow(xi, p_exponent); + double xiq = pow((1 - xi * xi), q_exponent); + + fibre_adhesion = PhysiCell::parameters.doubles("vel_adhesion") * xip * + (1 - cell_velocity / PhysiCell::parameters.doubles("cell_velocity_max")); + + fibre_repulsion = PhysiCell::parameters.doubles("vel_contact") * xiq; + + axpy(&(velocity), fibre_adhesion, pFibre->state.orientation); + naxpy(&(velocity), fibre_repulsion, previous_velocity); + + degrade_fibre(pFibre); + } +} + + +void PhysiMeSS_Cell::degrade_fibre(PhysiMeSS_Fibre* pFibre) +{ + + double distance = 0.0; + pFibre->nearest_point_on_fibre(position, displacement); + for (int index = 0; index < 3; index++) { + distance += displacement[index] * displacement[index]; + } + distance = std::max(sqrt(distance), 0.00001); + + // Fibre degradation by cell - switched on by flag fibre_degradation + double stuck_threshold = PhysiCell::parameters.doubles("fibre_stuck_time"); + if (PhysiCell::parameters.bools("fibre_degradation") && stuck_counter >= stuck_threshold) { + // if (stuck_counter >= stuck_threshold){ + // std::cout << "Cell " << ID << " is stuck at time " << PhysiCell::PhysiCell_globals.current_time + // << " near fibre " << pFibre->ID << std::endl;; + // } + displacement *= -1.0/distance; + double dotproduct = dot_product(displacement, phenotype.motility.motility_vector); + if (dotproduct >= 0) { + double rand_degradation = PhysiCell::UniformRandom(); + double prob_degradation = PhysiCell::parameters.doubles("fibre_degradation_rate"); + if (rand_degradation <= prob_degradation) { + //std::cout << " --------> fibre " << (*other_agent).ID << " is flagged for degradation " << std::endl; + // (*other_agent).parameters.degradation_flag = true; + pFibre->flag_for_removal(); + // std::cout << "Degrading fibre agent " << pFibre->ID << " using flag for removal !!" << std::endl; + stuck_counter = 0; + } + } + } +} + +void PhysiMeSS_Cell::force_update_motility_vector(double dt_) { + + if (!this->phenotype.motility.is_motile) { + this->phenotype.motility.motility_vector.assign(3, 0.0); + return; + } + + // force cell to update its motility because it is stuck + // choose a uniformly random unit vector + double temp_angle = 6.28318530717959 * PhysiCell::UniformRandom(); + double temp_phi = 3.1415926535897932384626433832795 * PhysiCell::UniformRandom(); + + double sin_phi = sin(temp_phi); + double cos_phi = cos(temp_phi); + + if (this->phenotype.motility.restrict_to_2D) { + sin_phi = 1.0; + cos_phi = 0.0; + } + + std::vector randvec; + randvec.resize(3, sin_phi); + + randvec[0] *= cos(temp_angle); // cos(theta)*sin(phi) + randvec[1] *= sin(temp_angle); // sin(theta)*sin(phi) + randvec[2] = cos_phi; // cos(phi) + + // if the update_bias_vector function is set, use it + /*if (functions.update_migration_bias) { + functions.update_migration_bias(this, phenotype, dt_); + }*/ + + //phenotype.motility.motility_vector *= -1.0;//phenotype.motility.migration_bias_direction; // motiltiy = bias_vector + //phenotype.motility.motility_vector *= phenotype.motility.migration_bias; // motility = bias*bias_vector + + double one_minus_bias = 1.0;// - phenotype.motility.migration_bias; + + axpy(&(this->phenotype.motility.motility_vector), one_minus_bias,randvec); // motility = (1-bias)*randvec + bias*bias_vector + + normalize(&(this->phenotype.motility.motility_vector)); + + this->phenotype.motility.motility_vector *= this->phenotype.motility.migration_speed; + + return; +} diff --git a/addons/PhysiMeSS/PhysiMeSS_cell.h b/addons/PhysiMeSS/PhysiMeSS_cell.h new file mode 100644 index 000000000..a7be7d8ff --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_cell.h @@ -0,0 +1,31 @@ +#ifndef __PhysiMeSS_cell_h__ +#define __PhysiMeSS_cell_h__ + +#include "PhysiMeSS_agent.h" +#include "PhysiMeSS_fibre.h" + +class PhysiMeSS_Fibre; + +class PhysiMeSS_Cell : public PhysiMeSS_Agent +{ + private: + public: + + int stuck_counter; + int unstuck_counter; + + PhysiMeSS_Cell(); + ~PhysiMeSS_Cell() {}; + + virtual void add_potentials_from_fibre(PhysiMeSS_Fibre* fibre); + + void register_fibre_voxels(); + void deregister_fibre_voxels(); + + void force_update_motility_vector(double dt_); + + virtual void degrade_fibre(PhysiMeSS_Fibre* pFibre); + +}; + +#endif \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS_fibre.cpp b/addons/PhysiMeSS/PhysiMeSS_fibre.cpp new file mode 100644 index 000000000..cf2aced0b --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_fibre.cpp @@ -0,0 +1,534 @@ +#include "PhysiMeSS_fibre.h" +#include "PhysiMeSS_cell.h" +#include + +bool isFibre(PhysiCell::Cell* pCell) +{ + const auto agentname = std::string(pCell->type_name); + const auto ecm = std::string("ecm"); + const auto matrix = std::string("matrix"); + const auto fiber = std::string("fiber"); + const auto fibre = std::string("fibre"); + const auto rod = std::string("rod"); + + return (agentname.find(ecm) != std::string::npos || + agentname.find(matrix) != std::string::npos || + agentname.find(fiber) != std::string::npos || + agentname.find(fibre) != std::string::npos || + agentname.find(rod) != std::string::npos + ); +} + +bool isFibre(PhysiCell::Cell_Definition * cellDef) +{ + const auto agentname = std::string(cellDef->name); + const auto ecm = std::string("ecm"); + const auto matrix = std::string("matrix"); + const auto fiber = std::string("fiber"); + const auto fibre = std::string("fibre"); + const auto rod = std::string("rod"); + + return (agentname.find(ecm) != std::string::npos || + agentname.find(matrix) != std::string::npos || + agentname.find(fiber) != std::string::npos || + agentname.find(fibre) != std::string::npos || + agentname.find(rod) != std::string::npos + ); +} + +std::vector* getFibreCellDefinitions() { + std::vector* result = new std::vector(); + PhysiCell::Cell_Definition* pCD; + + + for (auto& cd_name: PhysiCell::cell_definitions_by_name) { + if (isFibre(cd_name.second)) { + result->push_back(cd_name.second); + } + } + + return result; +} + +PhysiMeSS_Fibre::PhysiMeSS_Fibre() +{ + // std::cout << "PhysiMeSS_Fibre constructor,"; + fibres_crosslinkers.clear(); + fibres_crosslink_point.clear(); + + mLength = PhysiCell::NormalRandom(PhysiCell::parameters.doubles("fibre_length"), PhysiCell::parameters.doubles("length_normdist_sd")) / 2.0; + mRadius = PhysiCell::parameters.doubles("fibre_radius"); + // std::cout << "mLength = " << mLength; + X_crosslink_count = 0; + fail_count = 0; +} + +void PhysiMeSS_Fibre::assign_fibre_orientation() +{ + this->assign_orientation(); + if (default_microenvironment_options.simulate_2D) { + if (PhysiCell::parameters.bools("anisotropic_fibres")){ + double theta = PhysiCell::NormalRandom(PhysiCell::parameters.doubles("fibre_angle"),PhysiCell::parameters.doubles("angle_normdist_sd")); + this->state.orientation[0] = cos(theta); + this->state.orientation[1] = sin(theta); + } + else{ + this->state.orientation = PhysiCell::UniformOnUnitCircle(); + } + this->state.orientation[2] = 0.0; + } + else { + this->state.orientation = PhysiCell::UniformOnUnitSphere(); + } + //###########################################// + // this bit a hack for PacMan and maze // + //###########################################// + if (this->type_name == "fibre_vertical") { + this->state.orientation[0] = 0.0; + this->state.orientation[1] = 1.0; + this->state.orientation[2] = 0.0; + } + if (this->type_name == "fibre_horizontal") { + this->state.orientation[0] = 1.0; + this->state.orientation[1] = 0.0; + this->state.orientation[2] = 0.0; + } + //###########################################// +} + +void PhysiMeSS_Fibre::check_out_of_bounds(std::vector& position) +{ + double Xmin = BioFVM::get_default_microenvironment()->mesh.bounding_box[0]; + double Ymin = BioFVM::get_default_microenvironment()->mesh.bounding_box[1]; + double Zmin = BioFVM::get_default_microenvironment()->mesh.bounding_box[2]; + + double Xmax = BioFVM::get_default_microenvironment()->mesh.bounding_box[3]; + double Ymax = BioFVM::get_default_microenvironment()->mesh.bounding_box[4]; + double Zmax = BioFVM::get_default_microenvironment()->mesh.bounding_box[5]; + + if( default_microenvironment_options.simulate_2D == true ) + { + Zmin = 0.0; + Zmax = 0.0; + } + + // start and end points of a fibre are calculated from fibre center + double xs = position[0] - this->mLength * this->state.orientation[0]; + double xe = position[0] + this->mLength * this->state.orientation[0]; + double ys = position[1] - this->mLength * this->state.orientation[1]; + double ye = position[1] + this->mLength * this->state.orientation[1]; + double zs = 0.0; + double ze = 0.0; + if (default_microenvironment_options.simulate_2D) { + /*std::cout << " fibre endpoints in 2D are " << xs << " " << ys << + " and " << xe << " " << ye << std::endl; */ + } + else if (!default_microenvironment_options.simulate_2D) { + zs = position[2] - this->mLength * this->state.orientation[2]; + ze = position[2] + this->mLength * this->state.orientation[2]; + /*std::cout << " fibre endpoints in 3D are " << xs << " " << ys << " " << zs << + " and " << xe << " " << ye << " " << ze << std::endl; */ + } + + /* check whether a fibre end point leaves the domain and if so initialise fibre again + assume user placed the centre of fibre within the domain so reinitialise orientation, + break after 10 failures + It needs re-writing at some stage to handle the 3D case properly */ + + if (PhysiCell::parameters.bools("anisotropic_fibres")) { + if (xs < Xmin || xe > Xmax || xe < Xmin || xs > Xmax || + ys < Ymin || ye > Ymax || ye < Ymin || ys > Ymax) { + fail_count = 10; + } + } + else{ + if (default_microenvironment_options.simulate_2D) { + while (fail_count < 10) { + if (xs < Xmin || xe > Xmax || xe < Xmin || xs > Xmax || + ys < Ymin || ye > Ymax || ye < Ymin || ys > Ymax) { + fail_count++; + this->state.orientation = PhysiCell::UniformOnUnitCircle(); + xs = position[0] - mLength * this->state.orientation[0]; + xe = position[0] + mLength * this->state.orientation[0]; + ys = position[1] - mLength * this->state.orientation[1]; + ye = position[1] + mLength * this->state.orientation[1]; + } + else { + break; + } + } + } + + if (!default_microenvironment_options.simulate_2D) { + while (fail_count < 10) { + if (xs < Xmin || xe > Xmax || xe < Xmin || xs > Xmax || + ys < Ymin || ye > Ymax || ye < Ymin || ys > Ymax || + zs < Zmin || ze > Zmax || ze < Xmin || zs > Xmax) { + fail_count++; + this->state.orientation = PhysiCell::UniformOnUnitSphere(); + xs = position[0] - mLength * this->state.orientation[0]; + xe = position[0] + mLength * this->state.orientation[0]; + ys = position[1] - mLength * this->state.orientation[1]; + ye = position[1] + mLength * this->state.orientation[1]; + zs = position[2] - mLength * this->state.orientation[2]; + ze = position[2] + mLength * this->state.orientation[2]; + } + else { + break; + } + } + } + } +} + + +void PhysiMeSS_Fibre::add_potentials_from_cell(PhysiMeSS_Cell* cell) +{ + // fibres only get pushed or rotated by motile cells + if (!cell->phenotype.motility.is_motile || X_crosslink_count >= 2) { + return; + } + + double distance = 0.0; + nearest_point_on_fibre(cell->position, displacement); + for (int index = 0; index < 3; index++) { + distance += displacement[index] * displacement[index]; + } + distance = std::max(sqrt(distance), 0.00001); + // fibre should only interact with cell if it comes within cell radius plus fibre radius (note fibre radius ~2 micron) + double R = phenotype.geometry.radius + mRadius; + if (distance <= R) { + std::vector point_of_impact(3, 0.0); + for (int index = 0; index < 3; index++) { + point_of_impact[index] = (*cell).position[index] - displacement[index]; + } + // cell-fibre pushing only if fibre no crosslinks + if (X_crosslink_count == 0) { + //fibre pushing turned on + if (PhysiCell::parameters.bools("fibre_pushing")) { + // as per PhysiCell + static double simple_pressure_scale = 0.027288820670331; + // temp_r = 1 - distance/R; + double temp_r = 0; + temp_r = -distance; + temp_r /= R; + temp_r += 1.0; + temp_r *= temp_r; + // add the relative pressure contribution NOT SURE IF NEEDED + state.simple_pressure += (temp_r / simple_pressure_scale); + + double effective_repulsion = sqrt(phenotype.mechanics.cell_cell_repulsion_strength * + (*cell).phenotype.mechanics.cell_cell_repulsion_strength); + temp_r *= effective_repulsion; + + if (fabs(temp_r) < 1e-16) { return; } + temp_r /= distance; + naxpy(&velocity, temp_r, displacement); + } + + // fibre rotation turned on (2D) + if (PhysiCell::parameters.bools("fibre_rotation")) { + std::vector old_orientation(3, 0.0); + for (int i = 0; i < 2; i++) { + old_orientation[i] = state.orientation[i]; + } + + double moment_arm_magnitude = sqrt( + point_of_impact[0] * point_of_impact[0] + point_of_impact[1] * point_of_impact[1]); + double impulse = PhysiCell::parameters.doubles("fibre_sticky")*(*cell).phenotype.motility.migration_speed * moment_arm_magnitude; + double fibre_length = 2 * mLength; + double angular_velocity = impulse / (0.5 * fibre_length * fibre_length); + double angle = angular_velocity; + state.orientation[0] = old_orientation[0] * cos(angle) - old_orientation[1] * sin(angle); + state.orientation[1] = old_orientation[0] * sin(angle) + old_orientation[1] * cos(angle); + normalize(&state.orientation); + } + } + + // fibre rotation around other fibre (2D only and fibres intersect at a single point) + if (PhysiCell::parameters.bools("fibre_rotation") && X_crosslink_count == 1) { + double distance_fibre_centre_to_crosslink = 0.0; + std::vector fibre_centre_to_crosslink(3, 0.0); + for (int i = 0; i < 2; i++) { + fibre_centre_to_crosslink[i] = fibres_crosslink_point[i]-position[i]; + distance_fibre_centre_to_crosslink += fibre_centre_to_crosslink[i]*fibre_centre_to_crosslink[i]; + } + distance_fibre_centre_to_crosslink = sqrt(distance_fibre_centre_to_crosslink); + + std::vector old_orientation(3, 0.0); + for (int i = 0; i < 2; i++) { + old_orientation[i] = state.orientation[i]; + } + double moment_arm_magnitude = sqrt( + point_of_impact[0] * point_of_impact[0] + point_of_impact[1] * point_of_impact[1]); + double impulse = PhysiCell::parameters.doubles("fibre_sticky")*(*cell).phenotype.motility.migration_speed * moment_arm_magnitude; + double fibre_length = 2 * mLength; + double angular_velocity = impulse / (0.5 * fibre_length * fibre_length); + double angle = angular_velocity; + state.orientation[0] = old_orientation[0] * cos(angle) - old_orientation[1] * sin(angle); + state.orientation[1] = old_orientation[0] * sin(angle) + old_orientation[1] * cos(angle); + normalize(&state.orientation); + position[0] = fibres_crosslink_point[0]-distance_fibre_centre_to_crosslink*state.orientation[0]; + position[1] = fibres_crosslink_point[1]-distance_fibre_centre_to_crosslink*state.orientation[1]; + } + } + + return; +} + + +void PhysiMeSS_Fibre::add_potentials_from_fibre(PhysiMeSS_Fibre* other_fibre) +{ + /* probably want something here to model tension along fibres + * this will be strong tension along the fibre for those fibres with a crosslink + * and weak tension with background ECM */ + return; +} + +void PhysiMeSS_Fibre::register_fibre_voxels() { + + int voxel; + int voxel_size = this->get_container()->underlying_mesh.dx; // note this must be the same as the mechanics_voxel_size + int test = 2.0 * this->mLength / voxel_size; //allows us to sample along the fibre + + std::vector fibre_start(3, 0.0); + std::vector fibre_end(3, 0.0); + for (unsigned int i = 0; i < 3; i++) { + fibre_start[i] = this->position[i] - this->mLength * this->state.orientation[i]; + fibre_end[i] = this->position[i] + this->mLength * this->state.orientation[i]; + } + // first add the voxel of the fibre end point + voxel = this->get_container()->underlying_mesh.nearest_voxel_index(fibre_end); + //std::cout << voxel << " " ; + physimess_voxels.push_back(voxel); + if (std::find(this->get_container()->agent_grid[voxel].begin(), + this->get_container()->agent_grid[voxel].end(), + this) == this->get_container()->agent_grid[voxel].end()) { + this->get_container()->agent_grid[voxel].push_back(this); + } + // then walk along the fibre from fibre start point sampling and adding voxels as we go + std::vector point_on_fibre(3, 0.0); + for (unsigned int j = 0; j < test + 1; j++) { + for (unsigned int i = 0; i < 3; i++) { + point_on_fibre[i] = fibre_start[i] + j * voxel_size * this->state.orientation[i]; + } + voxel = this->get_container()->underlying_mesh.nearest_voxel_index(point_on_fibre); + //std::cout << voxel << " " ; + physimess_voxels.push_back(voxel); + if (std::find(this->get_container()->agent_grid[voxel].begin(), + this->get_container()->agent_grid[voxel].end(), + this) == this->get_container()->agent_grid[voxel].end()) { + this->get_container()->agent_grid[voxel].push_back(this); + } + } + //std::cout << std::endl; + + physimess_voxels.sort(); + physimess_voxels.unique(); +} + +void PhysiMeSS_Fibre::deregister_fibre_voxels() +{ + int centre_voxel = this->get_container()->underlying_mesh.nearest_voxel_index(this->position); + for (int voxel: physimess_voxels) { + if (voxel != centre_voxel) { + this->get_container()->remove_agent_from_voxel(this, voxel); + } + } +} + + +std::vector PhysiMeSS_Fibre::nearest_point_on_fibre(std::vector point, std::vector &displacement) +{ + + // don't bother if the "fibre_agent" is not a fibre + if (!isFibre(this)) { return displacement; } + + double fibre_length = 2 * this->mLength; + // vector pointing from one endpoint of "fibre_agent" to "point" + std::vector fibre_to_agent(3, 0.0); + // |fibre_to_agent| squared + double fibre_to_agent_length_squared = 0; + // scalar product fibre_to_agent * fibre_vector + double fibre_to_agent_dot_fibre_vector = 0; + + double distance = 0; + for (unsigned int i = 0; i < 3; i++) { + fibre_to_agent[i] = point[i] - (this->position[i] + - this->mLength * this->state.orientation[i]); + fibre_to_agent_length_squared += fibre_to_agent[i] * fibre_to_agent[i]; + fibre_to_agent_dot_fibre_vector += fibre_to_agent[i] * fibre_length * this->state.orientation[i]; + } + + // "point" is closest to the selected endpoint of "fibre_agent" + if (fibre_to_agent_dot_fibre_vector < 0.) { + for (int i = 0; i < 3; i++) { + displacement[i] = fibre_to_agent[i]; + } + //std::cout << "The point is closest to the start of the fibre" << std::endl; + //std::cout << " Displacement: " << displacement << std::endl; + } + // “point” is closest to the other endpoint of “fibre_agent” + else if (fibre_to_agent_dot_fibre_vector > fibre_length * fibre_length) { + for (unsigned int i = 0; i < 3; i++) { + displacement[i] = point[i] - (this->position[i] + + this->mLength * this->state.orientation[i]); + } + //std::cout << "The point is closest to the end of the fibre" << std::endl; + //std::cout << " Displacement: " << displacement << std::endl; + } + // “point” is closest to a point along “fibre_agent” + else { + double fibre_to_agent_length_cos_alpha_squared = + fibre_to_agent_dot_fibre_vector * fibre_to_agent_dot_fibre_vector / + (fibre_length * fibre_length); + double l = sqrt(fibre_to_agent_length_cos_alpha_squared); + for (unsigned int i = 0; i < 3; i++) { + displacement[i] = fibre_to_agent[i] - l * this->state.orientation[i]; + } + //std::cout << "The point is closest to a point along the fibre" << std::endl; + //std::cout << " Displacement: " << displacement << std::endl; + } + + // the function returns the displacement vector + return displacement; +} + + + +void PhysiMeSS_Fibre::check_fibre_crosslinks(PhysiMeSS_Fibre *fibre_neighbor) { + + if (this == fibre_neighbor) { return; } + + if (isFibre(this) && isFibre(fibre_neighbor)) { + + // fibre endpoints + std::vector point1(3, 0.0); + std::vector point2(3, 0.0); + std::vector point3(3, 0.0); + std::vector point4(3, 0.0); + for (int i = 0; i < 3; i++) { + // endpoints of "this" fibre + point1[i] = this->position[i] - mLength * this->state.orientation[i]; + point2[i] = this->position[i] + mLength * this->state.orientation[i]; + // endpoints of "neighbor" fibre + point3[i] = fibre_neighbor->position[i] - fibre_neighbor->mLength * fibre_neighbor->state.orientation[i]; + point4[i] = fibre_neighbor->position[i] + fibre_neighbor->mLength * fibre_neighbor->state.orientation[i]; + } + + //vectors between fibre endpoints + std::vector p1_to_p2(3, 0.0); + std::vector p3_to_p4(3, 0.0); + std::vector p1_to_p3(3, 0.0); + std::vector centre_to_centre(3, 0.0); + for (int i = 0; i < 3; i++) { + // "fibre" fibre vector + p1_to_p2[i] = point2[i] - point1[i]; + // "neighbor" fibre vector + p3_to_p4[i] = point4[i] - point3[i]; + // vector from "fibre" to "neighbor" + p1_to_p3[i] = point3[i] - point1[i]; + // vector between fibre centres + centre_to_centre[i] = fibre_neighbor->position[i] - this->position[i]; + } + + double co_radius = this->mRadius + fibre_neighbor->mRadius; + double co_length = this->mLength + fibre_neighbor->mLength; + std::vector zero(3, 0.0); + double distance = PhysiCell::dist(zero, centre_to_centre); + normalize(¢re_to_centre); + + /* test if fibres intersect + (1) if fibres are coplanar and parallel: + the cross product of the two fibre vectors is zero + [(P2 - P1) x (P4 - P3)].[(P2 - P1) x (P4 - P3)] = 0 */ + std::vector FCP = cross_product(p1_to_p2, p3_to_p4); + /* coplanar parallel fibres could intersect if colinear + i.e. the orientation of the fibres are parallel or + antiparallel to the centre_to_centre vector and + distance between fibre centres is less than their co_length */ + if (dot_product(FCP,FCP) == 0 && + (centre_to_centre == this->state.orientation || + centre_to_centre == -1.0 * this->state.orientation) && + distance <= co_length) { + //std::cout << "fibre " << fibre->ID << " crosslinks with parallel colinear fibre " << (*fibre_neighbor).ID << std::endl; + if (std::find(this->fibres_crosslinkers.begin(), this->fibres_crosslinkers.end(), (fibre_neighbor)) == + this->fibres_crosslinkers.end()) { + this->fibres_crosslinkers.push_back(fibre_neighbor); + } + this->fibres_crosslink_point = this->position + this->mLength * centre_to_centre; + } + /* (2) parallel fibres may sit on top of one another + we check the distance between fibre end points and + the nearest point on neighbor fibre to see if they do */ + std::vector displacement(3, 0.0); + fibre_neighbor->nearest_point_on_fibre(point1, displacement); + double test_point1 = PhysiCell::dist(zero, displacement); + fibre_neighbor->nearest_point_on_fibre(point2, displacement); + double test_point2 = PhysiCell::dist(zero, displacement); + this->nearest_point_on_fibre(point3, displacement); + double test_point3 = PhysiCell::dist(zero, displacement); + this->nearest_point_on_fibre(point4, displacement); + double test_point4 = PhysiCell::dist(zero, displacement); + if (std::abs(test_point1) <= co_radius || + std::abs(test_point2) <= co_radius || + std::abs(test_point3) <= co_radius || + std::abs(test_point4) <= co_radius && + centre_to_centre != this->state.orientation && + centre_to_centre != -1.0 * this->state.orientation) { + //std::cout << "fibre " << fibre->ID << " crosslinks in parallel plane with fibre " << (*fibre_neighbor).ID << std::endl; + if (std::find(this->fibres_crosslinkers.begin(), this->fibres_crosslinkers.end(), (fibre_neighbor)) == + this->fibres_crosslinkers.end()) { + this->fibres_crosslinkers.push_back(fibre_neighbor); + } + this->fibres_crosslink_point = point1; + } + /* (3) if fibres are skew (in parallel planes): + the scalar triple product (P3 - P1) . [(P2 - P1) x (P4 - P3)] != 0 + so intersecting fibres require (P3 - P1) . [(P2 - P1) x (P4 - P3)] = 0 + we include a tolerance on this to allow for fibre radius */ + double test2_tolerance = co_radius; + double test2 = dot_product(p1_to_p3, FCP); + if (std::abs(test2) < test2_tolerance) { + double a = dot_product(p1_to_p2, p1_to_p3) / dot_product(p1_to_p2, p1_to_p2); + double b = dot_product(p1_to_p2, p3_to_p4) / dot_product(p1_to_p2, p1_to_p2); + std::vector c(3, 0.0); + std::vector n(3, 0.0); + for (int i = 0; i < 3; i++) { + c[i] = b * p1_to_p2[i] - p3_to_p4[i]; + n[i] = p1_to_p3[i] - a * p1_to_p2[i]; + } + double t_neighbor = dot_product(c, n) / dot_product(c, c); + double t_this = a + b * t_neighbor; + std::vector crosslink_point(3, 0.0); + for (int i = 0; i < 2; i++) { + crosslink_point[i] = point1[i] + t_this * p1_to_p2[i]; + } + /* For fibres to intersect the "t" values for both line equations + must lie in [0,1] we include a tolerance to allow for fibre normalized co_radius */ + double tolerance = co_radius/co_length; //(*fibre_neighbor).custom_data["mRadius"] / (2 * fibre->custom_data["mLength"]); + double lower_bound = 0.0 - tolerance; + double upper_bound = 1.0 + tolerance; + if (lower_bound <= t_neighbor && t_neighbor <= upper_bound && + lower_bound <= t_this && t_this <= upper_bound) { + if (std::find(this->fibres_crosslinkers.begin(), this->fibres_crosslinkers.end(), (fibre_neighbor)) == + this->fibres_crosslinkers.end()) { + //std::cout << "fibre " << fibre->ID << " crosslinks with fibre " << (*fibre_neighbor).ID << std::endl; + this->fibres_crosslinkers.push_back(fibre_neighbor); + } + this->fibres_crosslink_point = crosslink_point; + } + } + } else { return; } +} + + +void PhysiMeSS_Fibre::add_crosslinks() +{ + for (auto* neighbor : physimess_neighbors) + { + if (isFibre(neighbor)) { + this->check_fibre_crosslinks(static_cast(neighbor)); + } + } +} \ No newline at end of file diff --git a/addons/PhysiMeSS/PhysiMeSS_fibre.h b/addons/PhysiMeSS/PhysiMeSS_fibre.h new file mode 100644 index 000000000..5ccd5b177 --- /dev/null +++ b/addons/PhysiMeSS/PhysiMeSS_fibre.h @@ -0,0 +1,44 @@ +#ifndef __PhysiMeSS_fibre_h__ +#define __PhysiMeSS_fibre_h__ + +#include "PhysiMeSS_agent.h" + +class PhysiMeSS_Cell; + +bool isFibre(PhysiCell::Cell* pCell); + +bool isFibre(PhysiCell::Cell_Definition * cellDef); + +std::vector* getFibreCellDefinitions(); + +class PhysiMeSS_Fibre : public PhysiMeSS_Agent +{ + private: + public: + std::vector fibres_crosslinkers; + std::vector fibres_crosslink_point; + + double mLength; + double mRadius; + int X_crosslink_count; + int fail_count; + + PhysiMeSS_Fibre(); + ~PhysiMeSS_Fibre() {}; + void assign_fibre_orientation() ; + + void check_out_of_bounds(std::vector& position); + virtual void add_potentials_from_fibre(PhysiMeSS_Fibre* other_fibre); + virtual void add_potentials_from_cell(PhysiMeSS_Cell* cell); + + void register_fibre_voxels(); + void deregister_fibre_voxels(); + + std::vector nearest_point_on_fibre(std::vector point, std::vector &displacement); + + void check_fibre_crosslinks(PhysiMeSS_Fibre *fibre_neighbor); + void add_crosslinks(); + +}; + +#endif \ No newline at end of file diff --git a/addons/PhysiMeSS/README.md b/addons/PhysiMeSS/README.md new file mode 100644 index 000000000..eea609863 --- /dev/null +++ b/addons/PhysiMeSS/README.md @@ -0,0 +1,84 @@ +# PhysiMeSS +PhysiMeSS (PhysiCell Microenvironment Structure Simulation) is a PhysiCell add-on which allows users to simulate ECM components as agents. + +## Dedicated sample project +PhysiMeSS comes with a dedicated sample project, called **physimess-sample**. To build it, go to the root directory and use : + +``` + make physimess-sample + make +``` + +## Pre-loaded examples +The following example directories are populated in config directory once the **physimess-sample** project is loaded as above. + +### Fibre_Initialisation +The directory Fibre_Initialisation contains simple examples in which you can initialise ECM fibres in the domain. Fibres are cylindrical agents described by their centre, radius, length and orientation. The centre of each fibre is prescribed either from a csv file or at random (as per cells in PhysiCell). The other attributes can be altered via user parameters in the xml or GUI. The following default parameters are found in ```mymodel_initialisation.xml``` + +``` +number_of_fibres = 2000 +anisotropic_fibres = false +fibre_length = 75.0 (microns) +length_normdist_sd = 0.0 (microns) +fibre_radius = 2.0 (microns) +fibre_angle = 0.0 (radians) +angle_normdist_sd = 0.0 (radians) +``` + +Using these parameters you can set up a domain with 2000 fibres randomly positioned and randomly aligned with a length of 75 microns and radius of 2 microns. Note, since we remove any fibres which overlap the boundaries of the domain, 1931 fibres remain after initialisation. Although fibres are cylinders, they are visualised in the domain and plot legend as lines. Note, agent names with the following strings are presumed to be fibres: **ecm**; **fibre**; **fiber**; **rod**; **matrix**. + +A second xml file ```mymodel_initialisation_maze.xml``` along with the csv ```initialfibres.csv``` allows you to create a maze with horizontal and vertical fibres. Agent names **fibre_horizontal** and **fibre_vertical** are reserved for creating horizontal and vertical fibres, respectively. In this way fibre agents can be used to create walls in your domain. + +### Fibre_Degradation +The directory Fibre_Degradation contains examples which show how fibre degradation affects simulations of cell migration and cell proliferation. + +* The xml file ```mymodel_fibre_degradation.xml``` with csv file ```cells_and_fibres_attractant.csv``` simulates the migration of a single cell towards an attractant through a mesh of fibres. Fibres are assigned a position, radius and length but their orientation is random. By turning fibre degradation on (or off) and adjusting parameters you can control whether the cell navigates to the attractant. + +Default parameters are: + +``` +fibre_length = 40.0 (microns) +fibre_degradation = true +fibre_deg_rate = 0.01 (1/min) +fibre_stuck = 10.0 (mechanics timesteps) +``` + +Note the parameter ```fibre_stuck``` determines how many mechanics time steps a cell needs to have been stuck before it can possibly degrade a fibre at the rate ```fibre_deg_rate```. When a fibre is degraded it is immediately removed from the domain. + +* The xml file ```mymodel_matrix_degradation.xml``` with csv file ```cells_and_fibres.csv``` simulates cell proliferation and the forming of a cell mass within a mesh of fibres. The fibrous mesh is as above. By turning fibre degradation on (or off) and adjusting parameters you can control the development of the growing mass of cells. + + +### Cell_Fibre_Mechanics +The directory Cell_Fibre_Mechanics contains examples which demonstrate cell-fibre mechanics. + +* The xml file ```mymodel_fibremaze.xml``` with csv file ```fibre_maze.csv``` simulates a single cell moving within a maze made of fibres towards an attractant secreting a nutrient. By adjusting parameters you can control whether the cell navigates to the attractant. + +Default parameters are: + +``` +fibre_length = 60.0 (microns) +vel_adhesion = 0.6 +vel_contact = 0.1 +cell_velocity_max = 1.0 +``` + +* The xml file ```mymodel_pushing.xml``` with csv file ```snowplough.csv``` simulates a single cell pushing a single free/non-crosslinked fibre out of the way to access an attractant. By turning fibre pushing on (or off) you can control whether the cell can push fibres. Note, since cells can only push non-crosslinked fibres by increasing the ```fibre_length``` in this example and thereby creating crosslinks you can prevent cells from pushing fibres. + +Default parameters are: + +``` +fibre_length = 40.0 (microns) +fibre_pushing = true +``` + +* The xml file ```mymodel_rotating.xml``` with csv file ```snowplough.csv``` simulates a single cell rotating free/non-crosslinked fibres to access an attractant. By turning fibre rotating on (or off) you can control whether the cell can push fibres. Note the parameter ```fibre_sticky``` modulates how much a cell can rotate a fibre. Values less than 1.0 decrease how much the cell rotates the fibre per timestep and values greater than 1.0 increase how much the cell rotates the fibre per timestep. + +Default parameters are: + +``` +fibre_length = 40.0 (microns) +fibre_sticky = 1.0 +fibre_rotation = true +``` + +* The xml file ```mymodel_hinge.xml``` with csv file ```hinge.csv``` simulates two crosslinked fibres being rotated at their crosslink point (hinge) by a single cell in order for the cell to navigated towards an attractant. By turning fibre rotating on (or off) and adjusting parameters you can control whether the cell successfully navigates towards the attractant. diff --git a/addons/libRoadrunner/src/librr_intracellular.cpp b/addons/libRoadrunner/src/librr_intracellular.cpp index 89448a70f..1765c9532 100644 --- a/addons/libRoadrunner/src/librr_intracellular.cpp +++ b/addons/libRoadrunner/src/librr_intracellular.cpp @@ -125,17 +125,17 @@ void RoadRunnerIntracellular::start() // called when a new cell is created; creates the unique 'rrHandle' rrc::RRVectorPtr vptr; - std::cout << "\n------------ " << __FUNCTION__ << ": librr_intracellular.cpp: start() called\n"; + //std::cout << "\n------------ " << __FUNCTION__ << ": librr_intracellular.cpp: start() called\n"; // this->enabled = true; - std::cout << "\n------------ " << __FUNCTION__ << ": doing: rrHandle = createRRInstance()\n"; + //std::cout << "\n------------ " << __FUNCTION__ << ": doing: rrHandle = createRRInstance()\n"; rrHandle = createRRInstance(); - std::cout << "\n------------ " << __FUNCTION__ << ": rrHandle = " << rrHandle << std::endl; + //std::cout << "\n------------ " << __FUNCTION__ << ": rrHandle = " << rrHandle << std::endl; // if (!rrc::loadSBML (rrHandle, get_cell_definition("lung epithelium").sbml_filename.c_str())) - std::cout << " sbml_filename = " << sbml_filename << std::endl; + //std::cout << " sbml_filename = " << sbml_filename << std::endl; // TODO: don't hard-code name if ( !rrc::loadSBML(rrHandle, (sbml_filename).c_str() ) ) @@ -156,32 +156,34 @@ void RoadRunnerIntracellular::start() int p = rrc::getNumberOfGlobalParameters(rrHandle); int c = rrc::getNumberOfCompartments(rrHandle); - std::cerr << "Number of reactions = " << r << std::endl; - std::cerr << "Number of floating species = " << m << std::endl; // 4 - std::cerr << "Number of boundary species = " << b << std::endl; // 0 - std::cerr << "Number of compartments = " << c << std::endl; // 1 - std::cerr << "Floating species names:\n"; - std::cerr << "-----------------------\n"; + //std::cerr << "Number of reactions = " << r << std::endl; + //std::cerr << "Number of floating species = " << m << std::endl; // 4 + //std::cerr << "Number of boundary species = " << b << std::endl; // 0 + //std::cerr << "Number of compartments = " << c << std::endl; // 1 + + //std::cerr << "Floating species names:\n"; + //std::cerr << "-----------------------\n"; std::string species_names_str = stringArrayToString(rrc::getFloatingSpeciesIds(rrHandle)); - std::cerr << species_names_str <<"\n"<< std::endl; + //std::cerr << species_names_str <<"\n"<< std::endl; std::stringstream iss(species_names_str); std::string species_name; int idx = 0; while (iss >> species_name) { species_result_column_index[species_name] = idx; - std::cout << species_name << " -> " << idx << std::endl; + //std::cout << species_name << " -> " << idx << std::endl; idx++; } vptr = rrc::getFloatingSpeciesConcentrations(rrHandle); //std::cerr << vptr->Count << std::endl; - for (int kdx=0; kdxCount; kdx++) +/* for (int kdx=0; kdxCount; kdx++) { std::cerr << kdx << ") " << vptr->Data[kdx] << std::endl; - } + } */ //std::cerr << "---------- end start() -------------\n"; + rrc::freeVector(vptr); // return 0; } diff --git a/changes-old.md b/changes-old.md deleted file mode 100644 index c598be44d..000000000 --- a/changes-old.md +++ /dev/null @@ -1,4487 +0,0 @@ -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems - -**Version:** 1.11.0 - -**Release date:** 20 March 2023 - -## Overview: -PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. - -**Reference:** A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellular Systems, PLoS Comput. Biol. 14(2): e1005991, 2018. DOI: [10.1371/journal.pcbi.1005991](https://dx.doi.org/10.1371/journal.pcbi.1005991) - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -**Notable recognition:** -+ [2019 PLoS Computational Biology Research Prize for Public Impact](https://blogs.plos.org/biologue/2019/05/31/announcing-the-winners-of-the-2019-plos-computational-biology-research-prize/) - -### Key makefile rules: - -**`make`**: compiles the current project. If no - project has been defined, it first - populates the cancer heterogeneity 2D - sample project and compiles it - -**`make project-name`**: populates the indicated sample project. - Use "make" to compile it. - - * **`project-name`** choices: - * template - * biorobots-sample - * cancer-biorobots-sample - * cancer-immune-sample - * celltypes3-sample - * heterogeneity-sample - * pred-prey-farmer - * virus-macrophage-sample - * worm-sample - * ode-energy-sample - * physiboss-cell-lines-sample - * cancer-metabolism-sample - * interaction-sample - * mechano-sample - -**`make list-projects`** : list all available sample projects - -**`make clean`** : removes all .o files and the executable, so that the next "make" recompiles the entire project - -**`make data-cleanup`** : clears out all simulation data - -**`make reset`** : de-populates the sample project and returns to the original PhysiCell state. Use this when switching to a new PhysiCell sample project. - -**`make jpeg`** : uses ImageMagick to convert the SVG files in the output directory to JPG (with appropriate sizing to make movies). Supply `OUTPUT=foldername` to select a different folder. - -**`make movie`** : uses ffmpeg to convert the JPG files in the output directory an mp4 movie. Supply `OUTPUT=foldername` to select a different folder, or `FRAMERATE=framerate` to override the frame rate. - -**`make upgrade`** : fetch the latest release of PhysiCell and overwrite the core library and sample projects. - -### Key Links -**Homepage:** http://PhysiCell.MathCancer.org - -**Downloads:** http://PhysiCell.sf.net - -**Support:** https://sourceforge.net/p/physicell/tickets/ - -**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 - -**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ - -**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) - -See changes.md for the full change log. - -* * * -## Release summary: -Version 1.11.0 adds several notable features, fixes bugs, and further expands the "signals" and "behaviors" that can be read and written with a simple API to facilitate building models. In particular, we add a brand new CSV format for initial cell positions (with more robust naming of cells by their human-readable names, a "header" line, and ability to extensively add and specificy individual cell properties), a new ability to save and load user projects in the `user_projects` directory, automated dynamic formation and breakage of spring-based cell-cell adhesions (based upon the cell-cell adhesion affinities, attachment rates, and detachment rates), automated inclusion of spring-based adhesions (at the mechanics time step) without need for the user to explicitly supply a spring function, a new "mechano" sample project to illustrate the new automated spring functionality, and updates to PhysiBoSS to ensure compatibility with the rapidly improving PhysiCell Studio. In addition, there is new capability of adding a background coloring (e.g., an oxygen heatmap) to SVG ouptuts--see the `interaction-sample` for an illustration (use the alternate XML config file to enable). This release includes several bugfixes, the most critical of which is to update the parameters for necrotic cells (which had previously been misset in the XML files, thus disabling necrotic cell lysis and shrinking). - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.11.z versions -#### 1.11.0 -+ New and improved (v2) cell CSV format for cell import. This allows more intuitive statement of initial cell positions. The first line of your CSV file must be: - - ```x,y,z,cell type``` - - Every subsequent line is a single cell, now referencing cell types by their human-readable names (as defined in your XML configuration file) rather than requiring the integer `ID`. So, a sample second line to place a CD8 T cell at (30,-10,12) would be: - - ```30,-10,12,CD8 T cell``` - - Moreover, the new format allows you to initialize a variety of individual cell properties, including (total) `volume` and any supported cell beheavior. For example, if your cell definitions have custom variables `GFP` ond `oncoprotein`, then you can extend the first header line to: - - ```x,y,z,cell type,custom:GFP,custom:oncoprotein``` - - And then subsequent cells look like this: - - ```30,-10,12,CD8 T cell,0.5,3.2``` - - You can tell our parser to skip specifying a specific variable with `s` or `S` or an empty entry. Here, the first cell would skip writing the initial value of the GFP, and teh second would skip initializing the oncoprotein: - - ```30,-10,12,CD8 T cell,,3.2``` - ```50,13,-4,M0 Macrophage,0.5,s``` - - We will continue to automatically support older CSV cell files; any cells CSV file missing the first line of headers will be processed in the old format. - -+ Ability to save and load user projects - + Use `make save PROJ=project_name` to save your project to a folder in `./user_projects` named `project_name`. For example: - - ```make save PROJ=new_tumor_sample``` - - saves your project as `new_tumor_sample`. In particular, it saves your `Makefile`, `main.cpp`, everything in `./config`, and everything in `./custom_modules`. - - + Use `make load PROJ=project_name` to load your project from a folder in `./user_projects` named `project_name`. For example: - - ```make load PROJ=new_tumor_sample``` - - loads your project from `new_tumor_sample`. In particular, it loads your `Makefile`, `main.cpp`, everything in `./config`, and everything in `./custom_modules`. - -+ Extended `cell_interactions` to include a vector `immunogenicities`: for a cell, `immunogenicity[j]` is how immunogenic this cell is to the jth cell type. By default, these will all be set to 1. (See next point.) - -+ Updated the built-in "attack" model: - $$\textrm{Probability cell } i \textrm{ attacks cell } j \textrm{ in } [t,t+\Delta t] = \textrm{attack}\_{ij} \cdot \textrm{immunogenicity}\_{ji} \Delta t $$ - By setting $\textrm{immunogenicity}\_{ji} = 1$ as teh default value, we maintain compatibiltiy with prior models. This is a way to further modulate immunogenic and cytotoxic interactions. - -+ Began migrating built-in sample projects to be compatible with the model builder GUI and the upcoming PhysiCell Studio, including: - + template - + biorobots (updates spring constant from 0.05 to 0.5) - + heterogeneity - + cancer biorobots (updates spring constant from 0.05 to 0.5) - -+ Added new signals: - + `apoptotic` returns 1 if a cell is apoptotic, and 0 otherwise - + `necrotic` returns 1 if a cell is necrotic, and 0 otherwise - - As always, access these via `double get_single_signal(Cell* pCell,std::string sig_name)`. - -+ Added new behaviors: - + `immunogenicity to [cell type]` is the cell's immunogenicity to a specific cell type. The probability that cell `i` attacks cell `j` in $[t,t+\Delta t]$ is $\textrm{attack}\_{ij} \cdot \textrm{immunogenicity}\_{ji} \Delta t.$ - + `cell attachment rate` is the rate at which the cell forms spring links with other cells. - + `cell detachment rate` is the rate at which spring links break. - + `maximum number of cell attachments` is the maximum number of spring links. - + `is_movable` can be set to 0 (false) to make an agent rigid: it will exert forces on other cells, but it itself cannot be moved. This behavior right now is somewhat fragile if used dynmaically, but can reliably be used during tissue setup. - - As always, access these via `double get_single_behavior(Cell* pCell,std::string beh_name)` and `void set_single_behavior(Cell* pCell,std::string beh_name,double new_value)`. - -+ Added new standard model `void dynamic_attachments(Cell*, Phenotype& ,double);` This function can automate dynamic attachments and detachments. When calling this function for cell $i$: - + For each current attachment, it detaches with probability $\textrm{detachment rate}\_i \Delta t$ - + For each cell $j$ in the neighbors list, it forms an attachment with probability - - $$\textrm{Prob attach } i \textrm{ to cell } j = \textrm{adhesion affinity}\_j \cdot \textrm{attachment rate}\_i \cdot \Delta t.$$ - - The attachment is only formed if both cell $i$ and $j$ have not exceeded their maximum number of - attachments. - -+ Added a new `spring_attachments` (of type `std::vector`) to cell `state` to track automated formation and removal of spring-link adhesions separately of the user-focused `attached` data struture. This will allow users to continue managing the `attachments` structure on their own for custom contact functions, without interference from automated springs (see more below). - -+ Added new standard model `void dynamic_spring_attachments(Cell*, Phenotype& ,double);` This functions exactly as the `dynamic_attachments` function, except it stores attached cells to `cell.state.spring_attachments` to avoid interfering with the user-managed `cell.state.attachments` data struture. - -+ **Automated spring attachments / detachments:** the new `dynamic_spring_attachments` function is automatically called at every mechancis time step, with cell-cell spring attachment and detachment based on the cells' current rates. Each cell evaluates spring-like elastic adhesion betwen itslef and cells in `cell.state.spring_attachments` to add to its own velocity. Some notes: - + Each cell automatically removes all its spring attachments during division - + Each cell automatically removes all its spring attachments at the *end* of death. If you want dead cells to have increased detachment, add a rule accordingly using the built-in behavior dictionary. - + If a cell is not movable (`is_movable = false`), then it is not moved by springs, but it can exert spring forces on other cells, allowing it to act as an "anchor". - + This automated spring functionality is completely independent of (and does not interfere with) the user-defined contact function and user-manageed `cell.state.attached` data structure. - + **WARNING:** If in a past life you set `phenotype.mechanics.attachment_rate` to a nonzero rate, you may find yourself surprised with unintended spring adhesions as this new automation kicks in. Please review and revise your configuration file as necessary. - + You can disable this behavior in the XML configuration file: - ``` - - - true - - -+ Added a new `mechano-sample` project that shows automated dynamic attachment and detachment of cells: - + Constant cancer cell birth and death - + Basic mechano feedback: high-pressure sets cancer cell birth to zero - + Cancer cell phenotype sets high detachment rate upon death. - + Automated connection of cancer, basement membrane (BM) agents with spring links using the built-ins noted above. No user intervention or code required beyond setting nonzero rates. - + Cancer cells manually set to apoptose at 10000 min. - -+ Updated PhysiBoSS to remove cell definition "inheritance," (with "flat", self-standing cell definitions), to make it compatible with PhysiCell Studio. Hereafter, all properties of each cell definition must be explicitely defined. - -### Minor new features and changes: -#### 1.11.0 -+ Updated the `paint_by_number_cell_coloring` coloring function to paint the entire cell white if apoptotic, and brown if necrotic. (Previously, we colored the nucleus based on live/dead status.) This improves compatibility with the model GUI. - -+ Changed the default value of `attachment_rate` from 10 to 0 (in the `Mechanics` class) to avoid unexpected triggering of automated spring adheions. - -+ Added a safety check to `operator[]` for Parameters, based on [PR145](https://github.com/MathCancer/PhysiCell/pull/145/). Thanks, Vincent Noel!! - -+ In PhysiBoSS, introduced a new state inheritance mechanism (global, and node-specific). - -+ PhisBoSS has a new optional start time, to initiate the intracellular model at t > 0. - -+ Updated PhysiBoSS Cell Lines sample project (flatten XML, initial positions as CSV). - -### Beta features (not fully supported): -#### 1.11.0 -+ Added `bool read_microenvironment_from_matlab( std::string mat_filename )` to `BioFVM_MultiCellDS`. This will read and overwrite from a stored microenvironment (in `mat_filename`, saved as a level 4 Matlab file) if it has the following format: - + Number of columns = number of voxels (must match the size as configured in the `PhysiCell_settings.xml` file) - + Number of rows = 3 + 1 + number of diffusing substrates (must match the size and ordering as configured in the `PhysiCell_settings.xml` file) - + Row 0: x coordinate of each voxel - + Row 1: y coordinate of each voxel - + Row 2: z coordinate of each voxel - + Row 3: volume of each voxel - + Rows j to end: value of (j-4)th substrate in each voxel - + Column ordering: - * For each z from low to high: - * For each y from low to high: - * for each x from low to high: - store voxel X[i] , Y[j], Z[k]. - + **Note:** This matches how PhysiCell saves the microenvironment. This will read any PhysiCell-saved microenvironment, so long as its sizes matches your current settings. - + **Note:** This may be fragile. It has only minimal error-checking. - - + Set default cell attachment rate to 0 in the template project and most sample projects to avoid unexpectedly triggering the new autmoated spring adhesions; users must affirmatively set a nonzero attachment rate to trigger this new automation in an individual cell. - - + In repsonse to [PR 123](https://github.com/MathCancer/PhysiCell/pull/123), `parameters.TYPE.find_index(search_name)` now returns -1 if the searched term isn't found. Thanks, Daniel Bergman! - -### Bugfixes: - -#### 1.11.0 -+ Fixed bug in cancer biorobots project that mistakenly set max cancer cell proliferation rate to 0.000072 instead of 0.00072 - -+ Fixed multiple broken signals/behaviors. - -+ Fixed calcification bug reported in issue [133](https://github.com/MathCancer/PhysiCell/issues/133). Thank you, @JulianoGianlupi! - -+ Fixed typo in cell signals that used `contact with dead dell` instead of `contact with dead cell` - -+ Changed default full data output to 60 minutes (to match the SVG output interval) for better compatibility with the model builder GUI. - -+ Fixed incorrect parameters for necrotic cell volume changes that prevented necrotic cell lysis and shrinkage. - -+ Merged Daniel Bergman's [PR 126](https://github.com/MathCancer/PhysiCell/pull/126), which fixes cell legend colors. Thank's Daniel! - -+ Improved safety checks in the cell orientation function, thanks to Randy Heiland's [PR 122](https://github.com/MathCancer/PhysiCell/pull/122). Thanks, Randy! - -+ Now forcing Mersenne Twister as random generator in PhysiBoSS (use or /dev/random by MaBoSS would max out system descriptor) - -+ MaBoSS BND/CFG parsing is now in an OpenMP critical block (flex/bison parser is not thread safe) - -+ Remove duplicate initialization of maximum attachment rate from the Phenotype.Mechanics constructor. - -+ Fixed bug in neighbor/attached graph output filenames (previously double-appended a suffix to the filenames). - -### Notices for intended changes that may affect backwards compatibility: -+ We intend to deprecate the unused phenotype variables `relative_maximum_attachment_distance`, `relative_detachment_distance`, and `maximum_attachment_rate` from `phenotype.mechanics.` - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ Additional 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems - -**Version:** 1.10.4 - -**Release date:** 18 July 2022 - -## Overview: -PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. - -**Reference:** A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellular Systems, PLoS Comput. Biol. 14(2): e1005991, 2018. DOI: [10.1371/journal.pcbi.1005991](https://dx.doi.org/10.1371/journal.pcbi.1005991) - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -**Notable recognition:** -+ [2019 PLoS Computational Biology Research Prize for Public Impact](https://blogs.plos.org/biologue/2019/05/31/announcing-the-winners-of-the-2019-plos-computational-biology-research-prize/) - -### Key makefile rules: - -**`make`** : compiles the current project. If no - project has been defined, it first - populates the cancer heterogeneity 2D - sample project and compiles it - -**`make project-name`**: populates the indicated sample project. - Use "make" to compile it. - - * **`project-name`** choices: - * template - * biorobots-sample - * cancer-biorobots-sample - * cancer-immune-sample - * celltypes3-sample - * heterogeneity-sample - * pred-prey-farmer - * virus-macrophage-sample - * worm-sample - * ode-energy-sample - * physiboss-cell-lines-sample - * cancer-metabolism-sample - * interaction-sample - -**`make list-projects`** : list all available sample projects - -**`make clean`** : removes all .o files and the executable, so that the next "make" recompiles the entire project - -**`make data-cleanup`** : clears out all simulation data - -**`make reset`** : de-populates the sample project and returns to the original PhysiCell state. Use this when switching to a new PhysiCell sample project. - -**`make jpeg`** : uses ImageMagick to convert the SVG files in the output directory to JPG (with appropriate sizing to make movies). Supply `OUTPUT=foldername` to select a different folder. - -**`make movie`** : uses ffmpeg to convert the JPG files in the output directory an mp4 movie. Supply `OUTPUT=foldername` to select a different folder, or `FRAMERATE=framerate` to override the frame rate. - -**`make upgrade`** : fetch the latest release of PhysiCell and overwrite the core library and sample projects. - -### Key Links -**Homepage:** http://PhysiCell.MathCancer.org - -**Downloads:** http://PhysiCell.sf.net - -**Support:** https://sourceforge.net/p/physicell/tickets/ - -**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 - -**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ - -**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) - -See changes.md for the full change log. - -* * * -## Release summary: -Version 1.10.4 primarily fixes bugs in file output and the ode-energy sample, and refines thread safety in cell phagocytosis. - -The 1.10.0 release introduced major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety. - -A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations. -A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries. - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.10.z versions -#### 1.10.4 -+ None in this version. See 1.10.0 -#### 1.10.3 -+ None in this version. See 1.10.0 -#### 1.10.2 -+ None in this version. See 1.10.0 -#### 1.10.1 -+ None in this version. See 1.10.0 -#### 1.10.0 -+ Created `Cell_Interactions` in `Phenotype` as a standard representation of essential cell-cell interactions, including phagocytosis, "attack", and fusion. - + Users can set phagocytosis rates for dead cells via `phenotype.cell_interactions.dead_phagocytosis_rate`. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. - + Users can set phagocytosis rates for each live cell type via `phenotype.cell_interactions.live_phagocytosis_rates`. There is one rate for each cell type in the simulation. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. Phagocytosis absorbs the target cell's volume and internal contents and flags the target for removal. The cell will eventually shrink back towards its target volume. - + For convenience, the phagocytosis rates can be accessed (read or written) via `phenotype.cell_interactions.live_phagocytosis_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set attack rates for live cells via `phenotype.cell_interactions.attack_rates`. There is one rate for each cell type in the simulation. Cells automaticaly attack neighbors at each mechanics time step based upon the rates. An attack event increases the target cell's `cell.state.damage` by `damage_rate * dt_mechanics` and `cell.state.total_attack_time` by `dt_mechanics`. It is up to the scientist user to set additional hypotheses that increases cell death with accumulated damage or attack time. - + For convenience, the attack rates can be accessed via `phenotype.cell_interactions.attack_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set fusion rates for live cells via `phenotype.cell_interactions.fusion_rates`. There is one rate for each cell type in the simulation. Cells automaticaly fuse with at each mechanics time step based upon the rates. Fusion will merge the two cells' volumes and internal contents, add their nuclei (recorded in `cell.state.number_of_nuclei`), and move the combine cell to the prior center of volume. The combined cell's new target volume is the sum of the two original cells' target volumes. - + For convenience, the fusion rates can be accessed via `phenotype.cell_interactions.fusion_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Created `Cell_Transformations` in `Phenotype` as a standard representation of cell transformations such as differentation or transdifferentiation. - + Users can set transformation rates for each live cell type via `phenotype.cell_transformations_transformation_rates`. There is one rate for each cell type in the simulation. Cells automatically attempt to transform to these types at each phenotype time step based upon the phagocytosis rates. - + For convenience, the transformation rates can be accessed (read or written) via `phenotype.cell_transformations.transformation_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Updated `Cell_State` to track the number of nuclei (for fusion), total damage (e.g., for cell attack) and total attack time. - -+ Added a new `advanced_chemotaxis` function with data stored in `phenotype.motility` to allow chemotaxis up a linear combination of gradients. - + `cell.phenotype.motility.chemotactic_sensitivities` is a vector of chemotactic sensitivies, one for each substrate in the environment. By default, these are all zero for backwards compatibility. A positive sensitivity denotes chemotaxis up a corresponding substrate's gradient (towards higher values), whereas a negative sensitivity gives chemotaxis against a gradient (towards lower values). - + For convenience, you can access (read and write) a substrate's chemotactic sensitivity via `phenotype.motility.chemotactic_sensitivity(name)`, where `name` is the human-readable name of a substrate in the simulation. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * grad(rho_0) + sensitivity_1 * grad(rho_1) + ... + sensitivity_n * grad(rho_n)`. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function_normalized`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * |grad(rho_0)| + sensitivity_1 * |grad(rho_1)| + ... + sensitivity_n * |grad(rho_n)|.` - -+ Added a new `adhesion_affinities` to `phenotype.mechanics` to allow preferential adhesion. - + `cell.phenotype.mechanics.adhesion_affinities` is a vector of adhesive affinities, one for each cell type in the simulation. By default, these are all one for backwards compatibility. - + For convenience, you can access (read and write) a cell's adhesive affinity for a specific cell type via `phenotype.mechanics.adhesive_affinity(name)`, where `name` is the human-readable name of a cell type in the simulation. - + The standard mechanics function (based on potentials) uses this as follows. If cell `i` has an cell-cell adhesion strength `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has a cell-cell adhesion strength of `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - + The standard elastic spring function (`standard_elastic_contact_function`) uses this as follows. If cell `i` has an elastic constant `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has an elastic constant `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - -+ `PhysiCell_basic_signaling` now includes standard Hill and linear response functions: - + `Hill_response_function( double s, double half_max , double hill_power )` is a Hill function responding to signal `s` with a half-max of `half_max` and Hill coefficient of `hill_power`. We note that this function is an order of magnitude faster when the `hill_power` is an integer (e.g., 1 or 2) rather than a non-integer power (e.g., 1.4). - + `double linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 0.0 (for inputs `s` below `s_min`) to 1.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - + `double decreasing_linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 1.0 (for inputs `s` below `s_min`) to 0.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - -+ We introduced a "dictionary" of standard signals that can be used as inputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of signals include: - + extracellular and intracellular substrate concentrations - + substrate gradients - + contact with dead cells - + contact with cells (of type X) - + damage - + pressure - + Use `display_signal_dictionary()` to quickly display a list of available signals. - + Substantial functionality to query signals - + `int find_signal_index( std::string signal_name )` : get the index of the named signal - + `std::vector find_signal_indices( std::vector signal_names );` get a vector of indices for a vector of named signals - + `std::string signal_name( int i );` display the name of the signal with the given index - + `std::vector get_signals( Cell* pCell );` get a vector of all known signals for the cell - + `std::vector get_cell_contact_signals( Cell* pCell );` get a vector of the cell contact associated signals for the cell - + `std::vector get_selected_signals( Cell* pCell , std::vector indices );` get a vector of signals for the cell, with the supplied indices - + `std::vector get_selected_signals( Cell* pCell , std::vector names );` get a vector of signals for the cell, with the supplied human-readable names of the signals - + `double get_single_signal( Cell* pCell, int index );` get a single signal for the cell with the indicated index - + `double get_single_signal( Cell* pCell, std::string name );` get a single signal for the cell with the indicated human-readable name - -+ We introduced a "dictionary" of standard behaviors that can be used as outputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of behaviors include: - + secretion, secretion target, uptake, and export rates - + cycle progression - + death rates - + motility parameters - + chemotactic parameters - + cell-cell adhesion and repulsion parameters - + cell adhesion affinities - + cell-BM adhesion and repulsion parameters - + phagocytosis rates - + attack rates - + fusion rates - + transformation rates - + Use `display_behavior_dictionary()` to quickly see a list of posible behaviors. - + Substantial functionality to query and set behaviors - + `int find_behavior_index( std::string response_name )` : get the index of the named behavior - + `std::vector find_behavior_indices( std::vector behavior_names )` get the indices for the given vector of behavior names. - + `std::string behavior_name( int i );` get the name of the behavior with the given index - + `std::vector create_empty_behavior_vector();` create an empty vector for the full set of behaviors - + `void set_behaviors( Cell* pCell , std::vector parameters );` write the full set of behaviors to the cell's phentoype - + `void set_selected_behaviors( Cell* pCell , std::vector indices , std::vector parameters );` write the selected set of behaviors (with supplied indices) to the cell's phenotype - + `void set_selected_behaviors( Cell* pCell , std::vector names , std::vector parameters );` write the selected set of behaviors (with supplied names) to the cell's phenotype - + `void set_single_behavior( Cell* pCell, int index , double parameter );` write a single behavior (by index) to the cell phentoype - + `void set_single_behavior( Cell* pCell, std::string name , double parameter );` write a single behavior (by name) to the cell phentoype - + Substantial functionality to query the cell's current behavior - + `std::vector get_behaviors( Cell* pCell );` get all the cell's current behaviors - + `std::vector get_behaviors( Cell* pCell , std::vector indices );` get a subset of behaviors (with given indices) - + `std::vector get_behaviors( Cell* pCell , std::vector names );` get a subset of behaviors (with given names) - + `double get_single_behavior( Cell* pCell , int index );` get a single behavior (by index) - + `double get_single_behavior( Cell* pCell , std::string name );` get a single behavior (by name) - + Substantial functionality to query the cell's referece behaviors (from its cell definition) - + `std::vector get_base_behaviors( Cell* pCell );` get all the cell's base behaviors - + `std::vector get_base_behaviors( Cell* pCell , std::vector indices );` get a subset of base behaviors (with given indices) - + `std::vector get_base_behaviors( Cell* pCell , std::vector names );` get a subset of base behaviors (with given names) - + `double get_single_base_behavior( Cell* pCell , int index );` get a single base behavior (by index) - + `double get_single_base_behavior( Cell* pCell , std::string name );` get a single base behavior (by name) - -+ Created a new `interaction-sample` project to illustrate the new interactions and transformations: - + Blood vessels release resource - + Virulet bacteria colonize near vessels (by chemotaxis up towards a secreted quorum factor and resource) - + Stem cells divide and differentiate into differentiated cells - + Differentiated cells divide until experiencing elevated pressure (to detect confluence) - + Bacteria-secreted virulence factor kills stem and differentiated cells. Dead cells release debris. - + Macrophages chemotax towards quorum factor and debris and secrete pro-inflammatory factor in presence of dead cells or bacteria - + Macrophages phagocytose dead cells - + CD8+ T cells chemotax towards pro-inflamatory factor and attack bacteria - + Neutrophils chemotax towards pro-inflammatory factor and phagocytose live bacteria - + Accumulated damage kills bacteria. - + With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow. - -### Minor new features and changes: -#### 1.10.4 -+ None in this version. -#### 1.10.3 -+ Added `attachment_rate` and `detachment_rate` to `phenotype.mechanics` for use in a future standard attachment and detachment model. -+ Modernized output format: - + More complete cell data saved for each cell agent. - + Merged the previously separate cell matlab files for each time save - + Added more metadata to outputs -+ `Variables` and `Vector_Variables` in `Custom_Cell_Data` now have a new Boolean attribute `conserved_quantity` (defaulted to false). If this value is set to true, then the custom variable is divided evenly between daughter cells at division. -+ Custom cell data can now be designated as conserved by settings an attribute `conserved="true"` in the XMO configuration file. -+ Improved support for Apple M1 and M2 chips. -+ Refinements to PhysiBoSS. - -#### 1.10.2 -+ Added `operator<<` for vectors of ints and vectors of strings. So that `std::cout << v << std::endl;` will work if `v` is `std::vector` of `std::vector`. It was truly annoying that these were missing, so sorry! -+ Added `dead` to the signals dictionaries, which returns 0.0 or 1.0 based on `phenotype.death.dead`. -+ Added `time` to the signals dictionaries, which returns the current simulation time based on `PhysiCell_Globals.current_time`. -+ Added a brief protocol on how to add new signals and behaviors to the dictionaries in the `/protocols` directory. -+ Added new functions `double& apoptosis_rate()` and `double& necrosis_rate()` to easily read and write these rates. Access via `cell.phenotype.death.apoptosis_rate()` and `cell.phenotype.death.necrosis_rate()`. -+ Added new ease of access functions for secretion: - + `double& Secretion::secretion_rate( std::string name )` allows you to easily read/write the secretion rate of a substrate by name. For example: - ```pCell->phenotype.secretion.secretion_rate("oxygen") = 0.1``` - + `double& Secretion::uptake_rate( std::string name )` allows you to easily read/write the uptake rate of a substrate by name. For example: - ```pCell->phenotype.secretion.uptake_rate("oxygen") = 0.1``` - + `double& Secretion::saturation_density( std::string name )` allows you to easily read/write the secretion target of a substrate by name. For example: - ```pCell->phenotype.secretion.saturation_density("oxygen") = 38``` - + `double& Secretion::net_export_rate( std::string name )` allows you to easily read/write the net export rate of a substrate by name. For example: - ```pCell->phenotype.secretion.net_export_rate("oxygen") = -100``` - -+ Added new ease of access function for internalized substrates: - + `double& Molecular::internalized_total_substrate( std::string name )` allows you to easily read/write the total amount of internalized substrate by name. For example: - ```pCell->phenotype.molecular.internalized_total_substrate( "oxygen" ) = 0.01`` -#### 1.10.1 -+ None in this version. See 1.10.0. -#### 1.10.0 -+ All sample projects have a new rule "make name" to tell you the name of the executable. - -+ All sample projects output the executable name to screen for easier reference. - -+ `Cell_Definition` has a new Boolean `is_movable`, so that all cells of a type can be set to non-movable. (Default: `is_movable = true`;) This allows you to use agents as rigid objects or barriers. - -+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition. - -### Beta features (not fully supported): -#### 1.10.4 -+ None in this version. -#### 1.10.3 -+ Each time outputs two cell interaction graphs (as text files): - + neighbor graph records which cells are within interaction distance for each cell agent, with format; - ID: ID1, ID2, ID3, ... (Cell ID: and the IDs of interacting cells) - + attached cell graph records which cells are attached for each cell agent, with format; - ID: ID1, ID2, ID3, ... (Cell ID: and the IDs of attached cells) - + We might split these into 3 files: - + an ID list that has the ID of each cell in order of appearence. - + neighbor list omits the preceding "ID:" since now each row corresponds to the index in the ID list - + attached cell list omits the preceding "ID:" since now each row corresponds to the index in the ID list - + Began experimenting with a planned `integrity` subclass to `phenotype` that will record multiple types of cell damage and associated damage and repair rates. It is not yet clear if we wil provide built-in support for damaged-driven apoptotic death and cycle arrest, as these are generally better left to modeler-driven hypotheses. - -None in this version. See 1.10.0. -#### 1.10.2 -+ None in this version. See 1.10.0. -#### 1.10.1 - + None in this version. See 1.10.0. - #### 1.10.0 -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -#### 1.10.4 -+ Fixed vectorized outputs in MultiCellDS that incorrectly assumed linear data ordering in std::vector. Thank you Randy Heiland! -+ Fixed errors in the ode-energy-sample project. Thank you Randy Heiland, Furkan Kurtoglu, and John Metzcar! -+ Improved thread safety in phagocytosis. Thank you Michael Getz! - -#### 1.10.3 -+ Fixed bug in `get_single_behavior` and `get_single_base_behavior` where querying any cycle exit rate or cycle entry mistakenly returned -1. -+ Corrected declaration of `standard_add_basement_membrane_interactions` in `PhysiCell_standard_models.h` to properly use phenotype by reference. Thank you Inês Gonçalves! -+ Removed the OpenMP pragma in `void Microenvironment::apply_dirichlet_conditions( void )` (around line 272) that tends to perform more poorly than serial code. - -#### 1.10.2 -+ Fixed error in `double get_single_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed error in `double get_single_base_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed bug in `add_PhysiCell_cells_to_open_xml_pugi()` that mistakenly used the wrong size (number of cell species rather than number of substrate species) when writing the chemotactic sensitivities. - -+ The cell `neighbors` list did not add non-adhesive cells within interaction distance. This is now fixed. - -#### 1.10.1 -+ XML parsing has been made more robust to "survive" using an incorrect substrate in the `chemotactic_sensitivities` section. - -+ Missing PhysiBoSS makefiles have been replaced. - -+ Fixed broken makefile for worms sample project. - -#### 1.10.0 -+ When the `cell_defaults` definition has been altered, new cell types may unwittingly copy nonzero parameter values from this default. Now, immediately after copying `cell_defaults`, the XML parsing will reset motility to off (with `NULL` function for bias direction), reset all secretion/uptake/export to zero, reset all cell interactions and transformations to zero. It will then continue to parse the XML file. Set `legacy_cell_defaults_copy = true` in the config file to override this bugfix. - -+ We refactored the pseudorandom number generator (at the basis of `UniformRandom()`) to improve thread safety. Previously, all threads shared a single PRNG, which was not thread safe. For newer fast processors with many threads, this could lead to sufficiently many "collisions" to introduce subtle biases in some cases (particularly for purely Brownian motion that is not dominated by chemotaxis, proliferation, and other behaviors). This is now corrected by creating a PRNG for each thread, each with its own seed. We used `std::seed_seq` to determinstically set a good spread of seeds to prevent correlation between the PRNGs, with the convention that the 0th thread's seed is either the user-specified seed or a random seed. This preserves original single-thread behavior from prior versions. - -+ Random motility now uses `UniformOnUnitCircle()` (in 2D) and `UniformOnUnitSphere()` (in 3D) to choose the random component of the migration direction, rather than hand-coding selection of the random vector. - -+ In response to PR 91 (https://github.com/MathCancer/PhysiCell/pull/91): Previoulsy, if the make jpeg rule fails, the `__*.txt` temporary files are left in place, so a subsequent "make jpeg" fails until these files are manually removed. Replacing `>>` (append) with `>` (overwrite) fixes the problem. Thanks [saikiRA1011](https://github.com/saikiRA1011)! - -### Notices for intended changes that may affect backwards compatibility: -+ We intend to deprecate the unused phenotype variables `relative_maximum_attachment_distance`, `relative_detachment_distance`, and `maximum_attachment_rate` from `phenotype.mechanics.` - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the very near future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - - -**Version:** 1.10.3 - -**Release date:** 25 June 2022 - -## Overview: -PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. - -**Reference:** A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellular Systems, PLoS Comput. Biol. 14(2): e1005991, 2018. DOI: [10.1371/journal.pcbi.1005991](https://dx.doi.org/10.1371/journal.pcbi.1005991) - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -**Notable recognition:** -+ [2019 PLoS Computational Biology Research Prize for Public Impact](https://blogs.plos.org/biologue/2019/05/31/announcing-the-winners-of-the-2019-plos-computational-biology-research-prize/) - -### Key makefile rules: - -**`make`** : compiles the current project. If no - project has been defined, it first - populates the cancer heterogeneity 2D - sample project and compiles it - -**`make project-name`**: populates the indicated sample project. - Use "make" to compile it. - - * **`project-name`** choices: - * template - * biorobots-sample - * cancer-biorobots-sample - * cancer-immune-sample - * celltypes3-sample - * heterogeneity-sample - * pred-prey-farmer - * virus-macrophage-sample - * worm-sample - * ode-energy-sample - * physiboss-cell-lines-sample - * cancer-metabolism-sample - * interaction-sample - -**`make list-projects`** : list all available sample projects - -**`make clean`** : removes all .o files and the executable, so that the next "make" recompiles the entire project - -**`make data-cleanup`** : clears out all simulation data - -**`make reset`** : de-populates the sample project and returns to the original PhysiCell state. Use this when switching to a new PhysiCell sample project. - -**`make jpeg`** : uses ImageMagick to convert the SVG files in the output directory to JPG (with appropriate sizing to make movies). Supply `OUTPUT=foldername` to select a different folder. - -**`make movie`** : uses ffmpeg to convert the JPG files in the output directory an mp4 movie. Supply `OUTPUT=foldername` to select a different folder, or `FRAMERATE=framerate` to override the frame rate. - -**`make upgrade`** : fetch the latest release of PhysiCell and overwrite the core library and sample projects. - -### Key Links -**Homepage:** http://PhysiCell.MathCancer.org - -**Downloads:** http://PhysiCell.sf.net - -**Support:** https://sourceforge.net/p/physicell/tickets/ - -**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 - -**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ - -**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) - -See changes.md for the full change log. - -* * * -## Release summary: -Version 1.10.3 primarily fixes bugs and further refines the signal and behavior dictionaries, particularly with access to custom variables. It also allows users to designate custom variables as _conserved quantities_ that are divided evenly among daughter cells as division (e.g., melanosomes). Lastly, this release continues updates to PhysiBoSS and libRoadrunner to leverage newer core features and improve compatibiltiy, while also improving support for newer Mac (M1 and M2) architectures. - -The 1.10.0 release introduced major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety. - -A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations. -A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries. - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.10.z versions -#### 1.10.3 -+ None in this version. See 1.10.0 -#### 1.10.2 -+ None in this version. See 1.10.0 -#### 1.10.1 -+ None in this version. See 1.10.0 -#### 1.10.0 -+ Created `Cell_Interactions` in `Phenotype` as a standard representation of essential cell-cell interactions, including phagocytosis, "attack", and fusion. - + Users can set phagocytosis rates for dead cells via `phenotype.cell_interactions.dead_phagocytosis_rate`. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. - + Users can set phagocytosis rates for each live cell type via `phenotype.cell_interactions.live_phagocytosis_rates`. There is one rate for each cell type in the simulation. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. Phagocytosis absorbs the target cell's volume and internal contents and flags the target for removal. The cell will eventually shrink back towards its target volume. - + For convenience, the phagocytosis rates can be accessed (read or written) via `phenotype.cell_interactions.live_phagocytosis_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set attack rates for live cells via `phenotype.cell_interactions.attack_rates`. There is one rate for each cell type in the simulation. Cells automaticaly attack neighbors at each mechanics time step based upon the rates. An attack event increases the target cell's `cell.state.damage` by `damage_rate * dt_mechanics` and `cell.state.total_attack_time` by `dt_mechanics`. It is up to the scientist user to set additional hypotheses that increases cell death with accumulated damage or attack time. - + For convenience, the attack rates can be accessed via `phenotype.cell_interactions.attack_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set fusion rates for live cells via `phenotype.cell_interactions.fusion_rates`. There is one rate for each cell type in the simulation. Cells automaticaly fuse with at each mechanics time step based upon the rates. Fusion will merge the two cells' volumes and internal contents, add their nuclei (recorded in `cell.state.number_of_nuclei`), and move the combine cell to the prior center of volume. The combined cell's new target volume is the sum of the two original cells' target volumes. - + For convenience, the fusion rates can be accessed via `phenotype.cell_interactions.fusion_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Created `Cell_Transformations` in `Phenotype` as a standard representation of cell transformations such as differentation or transdifferentiation. - + Users can set transformation rates for each live cell type via `phenotype.cell_transformations_transformation_rates`. There is one rate for each cell type in the simulation. Cells automatically attempt to transform to these types at each phenotype time step based upon the phagocytosis rates. - + For convenience, the transformation rates can be accessed (read or written) via `phenotype.cell_transformations.transformation_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Updated `Cell_State` to track the number of nuclei (for fusion), total damage (e.g., for cell attack) and total attack time. - -+ Added a new `advanced_chemotaxis` function with data stored in `phenotype.motility` to allow chemotaxis up a linear combination of gradients. - + `cell.phenotype.motility.chemotactic_sensitivities` is a vector of chemotactic sensitivies, one for each substrate in the environment. By default, these are all zero for backwards compatibility. A positive sensitivity denotes chemotaxis up a corresponding substrate's gradient (towards higher values), whereas a negative sensitivity gives chemotaxis against a gradient (towards lower values). - + For convenience, you can access (read and write) a substrate's chemotactic sensitivity via `phenotype.motility.chemotactic_sensitivity(name)`, where `name` is the human-readable name of a substrate in the simulation. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * grad(rho_0) + sensitivity_1 * grad(rho_1) + ... + sensitivity_n * grad(rho_n)`. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function_normalized`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * |grad(rho_0)| + sensitivity_1 * |grad(rho_1)| + ... + sensitivity_n * |grad(rho_n)|.` - -+ Added a new `adhesion_affinities` to `phenotype.mechanics` to allow preferential adhesion. - + `cell.phenotype.mechanics.adhesion_affinities` is a vector of adhesive affinities, one for each cell type in the simulation. By default, these are all one for backwards compatibility. - + For convenience, you can access (read and write) a cell's adhesive affinity for a specific cell type via `phenotype.mechanics.adhesive_affinity(name)`, where `name` is the human-readable name of a cell type in the simulation. - + The standard mechanics function (based on potentials) uses this as follows. If cell `i` has an cell-cell adhesion strength `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has a cell-cell adhesion strength of `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - + The standard elastic spring function (`standard_elastic_contact_function`) uses this as follows. If cell `i` has an elastic constant `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has an elastic constant `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - -+ `PhysiCell_basic_signaling` now includes standard Hill and linear response functions: - + `Hill_response_function( double s, double half_max , double hill_power )` is a Hill function responding to signal `s` with a half-max of `half_max` and Hill coefficient of `hill_power`. We note that this function is an order of magnitude faster when the `hill_power` is an integer (e.g., 1 or 2) rather than a non-integer power (e.g., 1.4). - + `double linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 0.0 (for inputs `s` below `s_min`) to 1.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - + `double decreasing_linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 1.0 (for inputs `s` below `s_min`) to 0.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - -+ We introduced a "dictionary" of standard signals that can be used as inputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of signals include: - + extracellular and intracellular substrate concentrations - + substrate gradients - + contact with dead cells - + contact with cells (of type X) - + damage - + pressure - + Use `display_signal_dictionary()` to quickly display a list of available signals. - + Substantial functionality to query signals - + `int find_signal_index( std::string signal_name )` : get the index of the named signal - + `std::vector find_signal_indices( std::vector signal_names );` get a vector of indices for a vector of named signals - + `std::string signal_name( int i );` display the name of the signal with the given index - + `std::vector get_signals( Cell* pCell );` get a vector of all known signals for the cell - + `std::vector get_cell_contact_signals( Cell* pCell );` get a vector of the cell contact associated signals for the cell - + `std::vector get_selected_signals( Cell* pCell , std::vector indices );` get a vector of signals for the cell, with the supplied indices - + `std::vector get_selected_signals( Cell* pCell , std::vector names );` get a vector of signals for the cell, with the supplied human-readable names of the signals - + `double get_single_signal( Cell* pCell, int index );` get a single signal for the cell with the indicated index - + `double get_single_signal( Cell* pCell, std::string name );` get a single signal for the cell with the indicated human-readable name - -+ We introduced a "dictionary" of standard behaviors that can be used as outputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of behaviors include: - + secretion, secretion target, uptake, and export rates - + cycle progression - + death rates - + motility parameters - + chemotactic parameters - + cell-cell adhesion and repulsion parameters - + cell adhesion affinities - + cell-BM adhesion and repulsion parameters - + phagocytosis rates - + attack rates - + fusion rates - + transformation rates - + Use `display_behavior_dictionary()` to quickly see a list of posible behaviors. - + Substantial functionality to query and set behaviors - + `int find_behavior_index( std::string response_name )` : get the index of the named behavior - + `std::vector find_behavior_indices( std::vector behavior_names )` get the indices for the given vector of behavior names. - + `std::string behavior_name( int i );` get the name of the behavior with the given index - + `std::vector create_empty_behavior_vector();` create an empty vector for the full set of behaviors - + `void set_behaviors( Cell* pCell , std::vector parameters );` write the full set of behaviors to the cell's phentoype - + `void set_selected_behaviors( Cell* pCell , std::vector indices , std::vector parameters );` write the selected set of behaviors (with supplied indices) to the cell's phenotype - + `void set_selected_behaviors( Cell* pCell , std::vector names , std::vector parameters );` write the selected set of behaviors (with supplied names) to the cell's phenotype - + `void set_single_behavior( Cell* pCell, int index , double parameter );` write a single behavior (by index) to the cell phentoype - + `void set_single_behavior( Cell* pCell, std::string name , double parameter );` write a single behavior (by name) to the cell phentoype - + Substantial functionality to query the cell's current behavior - + `std::vector get_behaviors( Cell* pCell );` get all the cell's current behaviors - + `std::vector get_behaviors( Cell* pCell , std::vector indices );` get a subset of behaviors (with given indices) - + `std::vector get_behaviors( Cell* pCell , std::vector names );` get a subset of behaviors (with given names) - + `double get_single_behavior( Cell* pCell , int index );` get a single behavior (by index) - + `double get_single_behavior( Cell* pCell , std::string name );` get a single behavior (by name) - + Substantial functionality to query the cell's referece behaviors (from its cell definition) - + `std::vector get_base_behaviors( Cell* pCell );` get all the cell's base behaviors - + `std::vector get_base_behaviors( Cell* pCell , std::vector indices );` get a subset of base behaviors (with given indices) - + `std::vector get_base_behaviors( Cell* pCell , std::vector names );` get a subset of base behaviors (with given names) - + `double get_single_base_behavior( Cell* pCell , int index );` get a single base behavior (by index) - + `double get_single_base_behavior( Cell* pCell , std::string name );` get a single base behavior (by name) - -+ Created a new `interaction-sample` project to illustrate the new interactions and transformations: - + Blood vessels release resource - + Virulet bacteria colonize near vessels (by chemotaxis up towards a secreted quorum factor and resource) - + Stem cells divide and differentiate into differentiated cells - + Differentiated cells divide until experiencing elevated pressure (to detect confluence) - + Bacteria-secreted virulence factor kills stem and differentiated cells. Dead cells release debris. - + Macrophages chemotax towards quorum factor and debris and secrete pro-inflammatory factor in presence of dead cells or bacteria - + Macrophages phagocytose dead cells - + CD8+ T cells chemotax towards pro-inflamatory factor and attack bacteria - + Neutrophils chemotax towards pro-inflammatory factor and phagocytose live bacteria - + Accumulated damage kills bacteria. - + With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow. - -### Minor new features and changes: -#### 1.10.3 -+ Added `attachment_rate` and `detachment_rate` to `phenotype.mechanics` for use in a future standard attachment and detachment model. -+ Modernized output format: - + More complete cell data saved for each cell agent. - + Merged the previously separate cell matlab files for each time save - + Added more metadata to outputs -+ `Variables` and `Vector_Variables` in `Custom_Cell_Data` now have a new Boolean attribute `conserved_quantity` (defaulted to false). If this value is set to true, then the custom variable is divided evenly between daughter cells at division. -+ Custom cell data can now be designated as conserved by settings an attribute `conserved="true"` in the XMO configuration file. -+ Improved support for Apple M1 and M2 chips. -+ Refinements to PhysiBoSS. - -#### 1.10.2 -+ Added `operator<<` for vectors of ints and vectors of strings. So that `std::cout << v << std::endl;` will work if `v` is `std::vector` of `std::vector`. It was truly annoying that these were missing, so sorry! -+ Added `dead` to the signals dictionaries, which returns 0.0 or 1.0 based on `phenotype.death.dead`. -+ Added `time` to the signals dictionaries, which returns the current simulation time based on `PhysiCell_Globals.current_time`. -+ Added a brief protocol on how to add new signals and behaviors to the dictionaries in the `/protocols` directory. -+ Added new functions `double& apoptosis_rate()` and `double& necrosis_rate()` to easily read and write these rates. Access via `cell.phenotype.death.apoptosis_rate()` and `cell.phenotype.death.necrosis_rate()`. -+ Added new ease of access functions for secretion: - + `double& Secretion::secretion_rate( std::string name )` allows you to easily read/write the secretion rate of a substrate by name. For example: - ```pCell->phenotype.secretion.secretion_rate("oxygen") = 0.1``` - + `double& Secretion::uptake_rate( std::string name )` allows you to easily read/write the uptake rate of a substrate by name. For example: - ```pCell->phenotype.secretion.uptake_rate("oxygen") = 0.1``` - + `double& Secretion::saturation_density( std::string name )` allows you to easily read/write the secretion target of a substrate by name. For example: - ```pCell->phenotype.secretion.saturation_density("oxygen") = 38``` - + `double& Secretion::net_export_rate( std::string name )` allows you to easily read/write the net export rate of a substrate by name. For example: - ```pCell->phenotype.secretion.net_export_rate("oxygen") = -100``` - -+ Added new ease of access function for internalized substrates: - + `double& Molecular::internalized_total_substrate( std::string name )` allows you to easily read/write the total amount of internalized substrate by name. For example: - ```pCell->phenotype.molecular.internalized_total_substrate( "oxygen" ) = 0.01`` -#### 1.10.1 -+ None in this version. See 1.10.0. -#### 1.10.0 -+ All sample projects have a new rule "make name" to tell you the name of the executable. - -+ All sample projects output the executable name to screen for easier reference. - -+ `Cell_Definition` has a new Boolean `is_movable`, so that all cells of a type can be set to non-movable. (Default: `is_movable = true`;) This allows you to use agents as rigid objects or barriers. - -+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition. - -### Beta features (not fully supported): -#### 1.10.3 -+ Each time outputs two cell interaction graphs (as text files): - + neighbor graph records which cells are within interaction distance for each cell agent, with format; - ID: ID1, ID2, ID3, ... (Cell ID: and the IDs of interacting cells) - + attached cell graph records which cells are attached for each cell agent, with format; - ID: ID1, ID2, ID3, ... (Cell ID: and the IDs of attached cells) - + We might split these into 3 files: - + an ID list that has the ID of each cell in order of appearence. - + neighbor list omits the preceding "ID:" since now each row corresponds to the index in the ID list - + attached cell list omits the preceding "ID:" since now each row corresponds to the index in the ID list - + Began experimenting with a planned `integrity` subclass to `phenotype` that will record multiple types of cell damage and associated damage and repair rates. It is not yet clear if we wil provide built-in support for damaged-driven apoptotic death and cycle arrest, as these are generally better left to modeler-driven hypotheses. - -None in this version. See 1.10.0. -#### 1.10.2 -+ None in this version. See 1.10.0. -#### 1.10.1 - + None in this version. See 1.10.0. - #### 1.10.0 -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -#### 1.10.3 -+ Fixed bug in `get_single_behavior` and `get_single_base_behavior` where querying any cycle exit rate or cycle entry mistakenly returned -1. -+ Corrected declaration of `standard_add_basement_membrane_interactions` in `PhysiCell_standard_models.h` to properly use phenotype by reference. Thank you Inês Gonçalves! -+ Removed the OpenMP pragma in `void Microenvironment::apply_dirichlet_conditions( void )` (around line 272) that tends to perform more poorly than serial code. - -#### 1.10.2 -+ Fixed error in `double get_single_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed error in `double get_single_base_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed bug in `add_PhysiCell_cells_to_open_xml_pugi()` that mistakenly used the wrong size (number of cell species rather than number of substrate species) when writing the chemotactic sensitivities. - -+ The cell `neighbors` list did not add non-adhesive cells within interaction distance. This is now fixed. - -#### 1.10.1 -+ XML parsing has been made more robust to "survive" using an incorrect substrate in the `chemotactic_sensitivities` section. - -+ Missing PhysiBoSS makefiles have been replaced. - -+ Fixed broken makefile for worms sample project. - -#### 1.10.0 -+ When the `cell_defaults` definition has been altered, new cell types may unwittingly copy nonzero parameter values from this default. Now, immediately after copying `cell_defaults`, the XML parsing will reset motility to off (with `NULL` function for bias direction), reset all secretion/uptake/export to zero, reset all cell interactions and transformations to zero. It will then continue to parse the XML file. Set `legacy_cell_defaults_copy = true` in the config file to override this bugfix. - -+ We refactored the pseudorandom number generator (at the basis of `UniformRandom()`) to improve thread safety. Previously, all threads shared a single PRNG, which was not thread safe. For newer fast processors with many threads, this could lead to sufficiently many "collisions" to introduce subtle biases in some cases (particularly for purely Brownian motion that is not dominated by chemotaxis, proliferation, and other behaviors). This is now corrected by creating a PRNG for each thread, each with its own seed. We used `std::seed_seq` to determinstically set a good spread of seeds to prevent correlation between the PRNGs, with the convention that the 0th thread's seed is either the user-specified seed or a random seed. This preserves original single-thread behavior from prior versions. - -+ Random motility now uses `UniformOnUnitCircle()` (in 2D) and `UniformOnUnitSphere()` (in 3D) to choose the random component of the migration direction, rather than hand-coding selection of the random vector. - -+ In response to PR 91 (https://github.com/MathCancer/PhysiCell/pull/91): Previoulsy, if the make jpeg rule fails, the `__*.txt` temporary files are left in place, so a subsequent "make jpeg" fails until these files are manually removed. Replacing `>>` (append) with `>` (overwrite) fixes the problem. Thanks [saikiRA1011](https://github.com/saikiRA1011)! - -### Notices for intended changes that may affect backwards compatibility: -+ We intend to deprecate the unused phenotype variables `relative_maximum_attachment_distance`, `relative_detachment_distance`, and `maximum_attachment_rate` from `phenotype.mechanics.` - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the very near future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems - -**Version:** 1.10.2 - -**Release date:** 24 May 2022 - -## Overview: -PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. - -**Reference:** A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellular Systems, PLoS Comput. Biol. 14(2): e1005991, 2018. DOI: [10.1371/journal.pcbi.1005991](https://dx.doi.org/10.1371/journal.pcbi.1005991) - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -**Notable recognition:** -+ [2019 PLoS Computational Biology Research Prize for Public Impact](https://blogs.plos.org/biologue/2019/05/31/announcing-the-winners-of-the-2019-plos-computational-biology-research-prize/) - -### Key makefile rules: - -**`make`** : compiles the current project. If no - project has been defined, it first - populates the cancer heterogeneity 2D - sample project and compiles it - -**`make project-name`**: populates the indicated sample project. - Use "make" to compile it. - - * **`project-name`** choices: - * template - * biorobots-sample - * cancer-biorobots-sample - * cancer-immune-sample - * celltypes3-sample - * heterogeneity-sample - * pred-prey-farmer - * virus-macrophage-sample - * worm-sample - * ode-energy-sample - * physiboss-cell-lines-sample - * cancer-metabolism-sample - * interaction-sample - -**`make list-projects`** : list all available sample projects - -**`make clean`** : removes all .o files and the executable, so that the next "make" recompiles the entire project - -**make data-cleanup** : clears out all simulation data - -**make reset** : de-populates the sample project and returns to the original PhysiCell state. Use this when switching to a new PhysiCell sample project. - -**make jpeg** : uses ImageMagick to convert the SVG files in the output directory to JPG (with appropriate sizing to make movies). Supply `OUTPUT=foldername` to select a different folder. - -**make movie** : uses ffmpeg to convert the JPG files in the output directory an mp4 movie. Supply `OUTPUT=foldername` to select a different folder, or `FRAMERATE=framerate` to override the frame rate. - -**make upgrade** : fetch the latest release of PhysiCell and overwrite the core library and sample projects. - -**Homepage:** http://PhysiCell.MathCancer.org - -**Downloads:** http://PhysiCell.sf.net - -**Support:** https://sourceforge.net/p/physicell/tickets/ - -**Quick Start:** Look at QuickStart.md in the documentation folder. - -**User Guide:** Look at UserGuide.pdf in the documentation folder. - -**Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ - -**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) - -See changes.md for the full change log. - -* * * -## Release summary: -Version 1.10.2 introduces bugfixes to the behavior "dictionary" functiouns, data saves, and updating neighbor lists for nearby non-adhesive cells. It also introduces a number of ease-of-access functions to the phenotype for death rates, secretion, and internalized substrates. - -The 1.10.0 release introduced major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety. - -A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations. - -A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries. - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.10.z versions -#### 1.10.2 -+ None in this version. See 1.10.0 -#### 1.10.1 -+ None in this version. See 1.10.0 -#### 1.10.0 -+ Created `Cell_Interactions` in `Phenotype` as a standard representation of essential cell-cell interactions, including phagocytosis, "attack", and fusion. - + Users can set phagocytosis rates for dead cells via `phenotype.cell_interactions.dead_phagocytosis_rate`. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. - + Users can set phagocytosis rates for each live cell type via `phenotype.cell_interactions.live_phagocytosis_rates`. There is one rate for each cell type in the simulation. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. Phagocytosis absorbs the target cell's volume and internal contents and flags the target for removal. The cell will eventually shrink back towards its target volume. - + For convenience, the phagocytosis rates can be accessed (read or written) via `phenotype.cell_interactions.live_phagocytosis_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set attack rates for live cells via `phenotype.cell_interactions.attack_rates`. There is one rate for each cell type in the simulation. Cells automaticaly attack neighbors at each mechanics time step based upon the rates. An attack event increases the target cell's `cell.state.damage` by `damage_rate * dt_mechanics` and `cell.state.total_attack_time` by `dt_mechanics`. It is up to the scientist user to set additional hypotheses that increases cell death with accumulated damage or attack time. - + For convenience, the attack rates can be accessed via `phenotype.cell_interactions.attack_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set fusion rates for live cells via `phenotype.cell_interactions.fusion_rates`. There is one rate for each cell type in the simulation. Cells automaticaly fuse with at each mechanics time step based upon the rates. Fusion will merge the two cells' volumes and internal contents, add their nuclei (recorded in `cell.state.number_of_nuclei`), and move the combine cell to the prior center of volume. The combined cell's new target volume is the sum of the two original cells' target volumes. - + For convenience, the fusion rates can be accessed via `phenotype.cell_interactions.fusion_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Created `Cell_Transformations` in `Phenotype` as a standard representation of cell transformations such as differentation or transdifferentiation. - + Users can set transformation rates for each live cell type via `phenotype.cell_transformations_transformation_rates`. There is one rate for each cell type in the simulation. Cells automatically attempt to transform to these types at each phenotype time step based upon the phagocytosis rates. - + For convenience, the transformation rates can be accessed (read or written) via `phenotype.cell_transformations.transformation_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Updated `Cell_State` to track the number of nuclei (for fusion), total damage (e.g., for cell attack) and total attack time. - -+ Added a new `advanced_chemotaxis` function with data stored in `phenotype.motility` to allow chemotaxis up a linear combination of gradients. - + `cell.phenotype.motility.chemotactic_sensitivities` is a vector of chemotactic sensitivies, one for each substrate in the environment. By default, these are all zero for backwards compatibility. A positive sensitivity denotes chemotaxis up a corresponding substrate's gradient (towards higher values), whereas a negative sensitivity gives chemotaxis against a gradient (towards lower values). - + For convenience, you can access (read and write) a substrate's chemotactic sensitivity via `phenotype.motility.chemotactic_sensitivity(name)`, where `name` is the human-readable name of a substrate in the simulation. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * grad(rho_0) + sensitivity_1 * grad(rho_1) + ... + sensitivity_n * grad(rho_n)`. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function_normalized`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * |grad(rho_0)| + sensitivity_1 * |grad(rho_1)| + ... + sensitivity_n * |grad(rho_n)|.` - -+ Added a new `adhesion_affinities` to `phenotype.mechanics` to allow preferential adhesion. - + `cell.phenotype.mechanics.adhesion_affinities` is a vector of adhesive affinities, one for each cell type in the simulation. By default, these are all one for backwards compatibility. - + For convenience, you can access (read and write) a cell's adhesive affinity for a specific cell type via `phenotype.mechanics.adhesive_affinity(name)`, where `name` is the human-readable name of a cell type in the simulation. - + The standard mechanics function (based on potentials) uses this as follows. If cell `i` has an cell-cell adhesion strength `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has a cell-cell adhesion strength of `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - + The standard elastic spring function (`standard_elastic_contact_function`) uses this as follows. If cell `i` has an elastic constant `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has an elastic constant `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - -+ `PhysiCell_basic_signaling` now includes standard Hill and linear response functions: - + `Hill_response_function( double s, double half_max , double hill_power )` is a Hill function responding to signal `s` with a half-max of `half_max` and Hill coefficient of `hill_power`. We note that this function is an order of magnitude faster when the `hill_power` is an integer (e.g., 1 or 2) rather than a non-integer power (e.g., 1.4). - + `double linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 0.0 (for inputs `s` below `s_min`) to 1.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - + `double decreasing_linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 1.0 (for inputs `s` below `s_min`) to 0.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - -+ We introduced a "dictionary" of standard signals that can be used as inputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of signals include: - + extracellular and intracellular substrate concentrations - + substrate gradients - + contact with dead cells - + contact with cells (of type X) - + damage - + pressure - + Use `display_signal_dictionary()` to quickly display a list of available signals. - + Substantial functionality to query signals - + `int find_signal_index( std::string signal_name )` : get the index of the named signal - + `std::vector find_signal_indices( std::vector signal_names );` get a vector of indices for a vector of named signals - + `std::string signal_name( int i );` display the name of the signal with the given index - + `std::vector get_signals( Cell* pCell );` get a vector of all known signals for the cell - + `std::vector get_cell_contact_signals( Cell* pCell );` get a vector of the cell contact associated signals for the cell - + `std::vector get_selected_signals( Cell* pCell , std::vector indices );` get a vector of signals for the cell, with the supplied indices - + `std::vector get_selected_signals( Cell* pCell , std::vector names );` get a vector of signals for the cell, with the supplied human-readable names of the signals - + `double get_single_signal( Cell* pCell, int index );` get a single signal for the cell with the indicated index - + `double get_single_signal( Cell* pCell, std::string name );` get a single signal for the cell with the indicated human-readable name - -+ We introduced a "dictionary" of standard behaviors that can be used as outputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of behaviors include: - + secretion, secretion target, uptake, and export rates - + cycle progression - + death rates - + motility parameters - + chemotactic parameters - + cell-cell adhesion and repulsion parameters - + cell adhesion affinities - + cell-BM adhesion and repulsion parameters - + phagocytosis rates - + attack rates - + fusion rates - + transformation rates - + Use `display_behavior_dictionary()` to quickly see a list of posible behaviors. - + Substantial functionality to query and set behaviors - + `int find_behavior_index( std::string response_name )` : get the index of the named behavior - + `std::vector find_behavior_indices( std::vector behavior_names )` get the indices for the given vector of behavior names. - + `std::string behavior_name( int i );` get the name of the behavior with the given index - + `std::vector create_empty_behavior_vector();` create an empty vector for the full set of behaviors - + `void set_behaviors( Cell* pCell , std::vector parameters );` write the full set of behaviors to the cell's phentoype - + `void set_selected_behaviors( Cell* pCell , std::vector indices , std::vector parameters );` write the selected set of behaviors (with supplied indices) to the cell's phenotype - + `void set_selected_behaviors( Cell* pCell , std::vector names , std::vector parameters );` write the selected set of behaviors (with supplied names) to the cell's phenotype - + `void set_single_behavior( Cell* pCell, int index , double parameter );` write a single behavior (by index) to the cell phentoype - + `void set_single_behavior( Cell* pCell, std::string name , double parameter );` write a single behavior (by name) to the cell phentoype - + Substantial functionality to query the cell's current behavior - + `std::vector get_behaviors( Cell* pCell );` get all the cell's current behaviors - + `std::vector get_behaviors( Cell* pCell , std::vector indices );` get a subset of behaviors (with given indices) - + `std::vector get_behaviors( Cell* pCell , std::vector names );` get a subset of behaviors (with given names) - + `double get_single_behavior( Cell* pCell , int index );` get a single behavior (by index) - + `double get_single_behavior( Cell* pCell , std::string name );` get a single behavior (by name) - + Substantial functionality to query the cell's referece behaviors (from its cell definition) - + `std::vector get_base_behaviors( Cell* pCell );` get all the cell's base behaviors - + `std::vector get_base_behaviors( Cell* pCell , std::vector indices );` get a subset of base behaviors (with given indices) - + `std::vector get_base_behaviors( Cell* pCell , std::vector names );` get a subset of base behaviors (with given names) - + `double get_single_base_behavior( Cell* pCell , int index );` get a single base behavior (by index) - + `double get_single_base_behavior( Cell* pCell , std::string name );` get a single base behavior (by name) - -+ Created a new `interaction-sample` project to illustrate the new interactions and transformations: - + Blood vessels release resource - + Virulet bacteria colonize near vessels (by chemotaxis up towards a secreted quorum factor and resource) - + Stem cells divide and differentiate into differentiated cells - + Differentiated cells divide until experiencing elevated pressure (to detect confluence) - + Bacteria-secreted virulence factor kills stem and differentiated cells. Dead cells release debris. - + Macrophages chemotax towards quorum factor and debris and secrete pro-inflammatory factor in presence of dead cells or bacteria - + Macrophages phagocytose dead cells - + CD8+ T cells chemotax towards pro-inflamatory factor and attack bacteria - + Neutrophils chemotax towards pro-inflammatory factor and phagocytose live bacteria - + Accumulated damage kills bacteria. - + With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow. - -### Minor new features and changes: -#### 1.10.2 -+ Added `operator<<` for vectors of ints and vectors of strings. So that `std::cout << v << std::endl;` will work if `v` is `std::vector` of `std::vector`. It was truly annoying that these were missing, so sorry! -+ Added `dead` to the signals dictionaries, which returns 0.0 or 1.0 based on `phenotype.death.dead`. -+ Added `time` to the signals dictionaries, which returns the current simulation time based on `PhysiCell_Globals.current_time`. -+ Added a brief protocol on how to add new signals and behaviors to the dictionaries in the `/protocols` directory. -+ Added new functions `double& apoptosis_rate()` and `double& necrosis_rate()` to easily read and write these rates. Access via `cell.phenotype.death.apoptosis_rate()` and `cell.phenotype.death.necrosis_rate()`. -+ Added new ease of access functions for secretion: - + `double& Secretion::secretion_rate( std::string name )` allows you to easily read/write the secretion rate of a substrate by name. For example: - ```pCell->phenotype.secretion.secretion_rate("oxygen") = 0.1``` - + `double& Secretion::uptake_rate( std::string name )` allows you to easily read/write the uptake rate of a substrate by name. For example: - ```pCell->phenotype.secretion.uptake_rate("oxygen") = 0.1``` - + `double& Secretion::saturation_density( std::string name )` allows you to easily read/write the secretion target of a substrate by name. For example: - ```pCell->phenotype.secretion.saturation_density("oxygen") = 38``` - + `double& Secretion::net_export_rate( std::string name )` allows you to easily read/write the net export rate of a substrate by name. For example: - ```pCell->phenotype.secretion.net_export_rate("oxygen") = -100``` - -+ Added new ease of access function for internalized substrates: - + `double& Molecular::internalized_total_substrate( std::string name )` allows you to easily read/write the total amount of internalized substrate by name. For example: - ```pCell->phenotype.molecular.internalized_total_substrate( "oxygen" ) = 0.01`` - -#### 1.10.1 -+ None in this version. See 1.10.0. -#### 1.10.0 -+ All sample projects have a new rule "make name" to tell you the name of the executable. - -+ All sample projects output the executable name to screen for easier reference. - -+ `Cell_Definition` has a new Boolean `is_movable`, so that all cells of a type can be set to non-movable. (Default: `is_movable = true`;) This allows you to use agents as rigid objects or barriers. - -+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition. - -### Beta features (not fully supported): -#### 1.10.2 -+ None in this version. See 1.10.0. -#### 1.10.1 - + None in this version. See 1.10.0. - #### 1.10.0 -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -#### 1.10.2 -+ Fixed error in `double get_single_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed error in `double get_single_base_behavior()` where the `cell-cell adhesion elastic constant` behavior was not found. - -+ Fixed bug in `add_PhysiCell_cells_to_open_xml_pugi()` that mistakenly used the wrong size (number of cell species rather than number of substrate species) when writing the chemotactic sensitivities. - -+ The cell `neighbors` list did not add non-adhesive cells within interaction distance. This is now fixed. - -#### 1.10.1 -+ XML parsing has been made more robust to "survive" using an incorrect substrate in the `chemotactic_sensitivities` section. - -+ Missing PhysiBoSS makefiles have been replaced. - -+ Fixed broken makefile for worms sample project. - -#### 1.10.0 -+ When the `cell_defaults` definition has been altered, new cell types may unwittingly copy nonzero parameter values from this default. Now, immediately after copying `cell_defaults`, the XML parsing will reset motility to off (with `NULL` function for bias direction), reset all secretion/uptake/export to zero, reset all cell interactions and transformations to zero. It will then continue to parse the XML file. Set `legacy_cell_defaults_copy = true` in the config file to override this bugfix. - -+ We refactored the pseudorandom number generator (at the basis of `UniformRandom()`) to improve thread safety. Previously, all threads shared a single PRNG, which was not thread safe. For newer fast processors with many threads, this could lead to sufficiently many "collisions" to introduce subtle biases in some cases (particularly for purely Brownian motion that is not dominated by chemotaxis, proliferation, and other behaviors). This is now corrected by creating a PRNG for each thread, each with its own seed. We used `std::seed_seq` to determinstically set a good spread of seeds to prevent correlation between the PRNGs, with the convention that the 0th thread's seed is either the user-specified seed or a random seed. This preserves original single-thread behavior from prior versions. - -+ Random motility now uses `UniformOnUnitCircle()` (in 2D) and `UniformOnUnitSphere()` (in 3D) to choose the random component of the migration direction, rather than hand-coding selection of the random vector. - -+ In response to PR 91 (https://github.com/MathCancer/PhysiCell/pull/91): Previoulsy, if the make jpeg rule fails, the `__*.txt` temporary files are left in place, so a subsequent "make jpeg" fails until these files are manually removed. Replacing `>>` (append) with `>` (overwrite) fixes the problem. Thanks [saikiRA1011](https://github.com/saikiRA1011)! - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the very near future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * -**Version:** 1.10.1 - -**Release date:** 15 May 2022 - -## Release summary: - -Version 1.10.1 introduces bugfixes to increase XML parser robustness and to fix missing PhysiBoSS makefiles. - -The 1.10.0 release introduced major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety. - -A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations. - -A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries. - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.10.z versions -#### 1.10.1 -+ None in this version. See 1.10.0 -#### 1.10.0 -+ Created `Cell_Interactions` in `Phenotype` as a standard representation of essential cell-cell interactions, including phagocytosis, "attack", and fusion. - + Users can set phagocytosis rates for dead cells via `phenotype.cell_interactions.dead_phagocytosis_rate`. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. - + Users can set phagocytosis rates for each live cell type via `phenotype.cell_interactions.live_phagocytosis_rates`. There is one rate for each cell type in the simulation. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. Phagocytosis absorbs the target cell's volume and internal contents and flags the target for removal. The cell will eventually shrink back towards its target volume. - + For convenience, the phagocytosis rates can be accessed (read or written) via `phenotype.cell_interactions.live_phagocytosis_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set attack rates for live cells via `phenotype.cell_interactions.attack_rates`. There is one rate for each cell type in the simulation. Cells automaticaly attack neighbors at each mechanics time step based upon the rates. An attack event increases the target cell's `cell.state.damage` by `damage_rate * dt_mechanics` and `cell.state.total_attack_time` by `dt_mechanics`. It is up to the scientist user to set additional hypotheses that increases cell death with accumulated damage or attack time. - + For convenience, the attack rates can be accessed via `phenotype.cell_interactions.attack_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set fusion rates for live cells via `phenotype.cell_interactions.fusion_rates`. There is one rate for each cell type in the simulation. Cells automaticaly fuse with at each mechanics time step based upon the rates. Fusion will merge the two cells' volumes and internal contents, add their nuclei (recorded in `cell.state.number_of_nuclei`), and move the combine cell to the prior center of volume. The combined cell's new target volume is the sum of the two original cells' target volumes. - + For convenience, the fusion rates can be accessed via `phenotype.cell_interactions.fusion_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Created `Cell_Transformations` in `Phenotype` as a standard representation of cell transformations such as differentation or transdifferentiation. - + Users can set transformation rates for each live cell type via `phenotype.cell_transformations_transformation_rates`. There is one rate for each cell type in the simulation. Cells automatically attempt to transform to these types at each phenotype time step based upon the phagocytosis rates. - + For convenience, the transformation rates can be accessed (read or written) via `phenotype.cell_transformations.transformation_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Updated `Cell_State` to track the number of nuclei (for fusion), total damage (e.g., for cell attack) and total attack time. - -+ Added a new `advanced_chemotaxis` function with data stored in `phenotype.motility` to allow chemotaxis up a linear combination of gradients. - + `cell.phenotype.motility.chemotactic_sensitivities` is a vector of chemotactic sensitivies, one for each substrate in the environment. By default, these are all zero for backwards compatibility. A positive sensitivity denotes chemotaxis up a corresponding substrate's gradient (towards higher values), whereas a negative sensitivity gives chemotaxis against a gradient (towards lower values). - + For convenience, you can access (read and write) a substrate's chemotactic sensitivity via `phenotype.motility.chemotactic_sensitivity(name)`, where `name` is the human-readable name of a substrate in the simulation. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * grad(rho_0) + sensitivity_1 * grad(rho_1) + ... + sensitivity_n * grad(rho_n)`. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function_normalized`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * |grad(rho_0)| + sensitivity_1 * |grad(rho_1)| + ... + sensitivity_n * |grad(rho_n)|.` - -+ Added a new `adhesion_affinities` to `phenotype.mechanics` to allow preferential adhesion. - + `cell.phenotype.mechanics.adhesion_affinities` is a vector of adhesive affinities, one for each cell type in the simulation. By default, these are all one for backwards compatibility. - + For convenience, you can access (read and write) a cell's adhesive affinity for a specific cell type via `phenotype.mechanics.adhesive_affinity(name)`, where `name` is the human-readable name of a cell type in the simulation. - + The standard mechanics function (based on potentials) uses this as follows. If cell `i` has an cell-cell adhesion strength `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has a cell-cell adhesion strength of `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - + The standard elastic spring function (`standard_elastic_contact_function`) uses this as follows. If cell `i` has an elastic constant `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has an elastic constant `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - -+ `PhysiCell_basic_signaling` now includes standard Hill and linear response functions: - + `Hill_response_function( double s, double half_max , double hill_power )` is a Hill function responding to signal `s` with a half-max of `half_max` and Hill coefficient of `hill_power`. We note that this function is an order of magnitude faster when the `hill_power` is an integer (e.g., 1 or 2) rather than a non-integer power (e.g., 1.4). - + `double linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 0.0 (for inputs `s` below `s_min`) to 1.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - + `double decreasing_linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 1.0 (for inputs `s` below `s_min`) to 0.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - -+ We introduced a "dictionary" of standard signals that can be used as inputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of signals include: - + extracellular and intracellular substrate concentrations - + substrate gradients - + contact with dead cells - + contact with cells (of type X) - + damage - + pressure - + Use `display_signal_dictionary()` to quickly display a list of available signals. - + Substantial functionality to query signals - + `int find_signal_index( std::string signal_name )` : get the index of the named signal - + `std::vector find_signal_indices( std::vector signal_names );` get a vector of indices for a vector of named signals - + `std::string signal_name( int i );` display the name of the signal with the given index - + `std::vector get_signals( Cell* pCell );` get a vector of all known signals for the cell - + `std::vector get_cell_contact_signals( Cell* pCell );` get a vector of the cell contact associated signals for the cell - + `std::vector get_selected_signals( Cell* pCell , std::vector indices );` get a vector of signals for the cell, with the supplied indices - + `std::vector get_selected_signals( Cell* pCell , std::vector names );` get a vector of signals for the cell, with the supplied human-readable names of the signals - + `double get_single_signal( Cell* pCell, int index );` get a single signal for the cell with the indicated index - + `double get_single_signal( Cell* pCell, std::string name );` get a single signal for the cell with the indicated human-readable name - -+ We introduced a "dictionary" of standard behaviors that can be used as outputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of behaviors include: - + secretion, secretion target, uptake, and export rates - + cycle progression - + death rates - + motility parameters - + chemotactic parameters - + cell-cell adhesion and repulsion parameters - + cell adhesion affinities - + cell-BM adhesion and repulsion parameters - + phagocytosis rates - + attack rates - + fusion rates - + transformation rates - + Use `display_behavior_dictionary()` to quickly see a list of posible behaviors. - + Substantial functionality to query and set behaviors - + `int find_behavior_index( std::string response_name )` : get the index of the named behavior - + `std::vector find_behavior_indices( std::vector behavior_names )` get the indices for the given vector of behavior names. - + `std::string behavior_name( int i );` get the name of the behavior with the given index - + `std::vector create_empty_behavior_vector();` create an empty vector for the full set of behaviors - + `void set_behaviors( Cell* pCell , std::vector parameters );` write the full set of behaviors to the cell's phentoype - + `void set_selected_behaviors( Cell* pCell , std::vector indices , std::vector parameters );` write the selected set of behaviors (with supplied indices) to the cell's phenotype - + `void set_selected_behaviors( Cell* pCell , std::vector names , std::vector parameters );` write the selected set of behaviors (with supplied names) to the cell's phenotype - + `void set_single_behavior( Cell* pCell, int index , double parameter );` write a single behavior (by index) to the cell phentoype - + `void set_single_behavior( Cell* pCell, std::string name , double parameter );` write a single behavior (by name) to the cell phentoype - + Substantial functionality to query the cell's current behavior - + `std::vector get_behaviors( Cell* pCell );` get all the cell's current behaviors - + `std::vector get_behaviors( Cell* pCell , std::vector indices );` get a subset of behaviors (with given indices) - + `std::vector get_behaviors( Cell* pCell , std::vector names );` get a subset of behaviors (with given names) - + `double get_single_behavior( Cell* pCell , int index );` get a single behavior (by index) - + `double get_single_behavior( Cell* pCell , std::string name );` get a single behavior (by name) - + Substantial functionality to query the cell's referece behaviors (from its cell definition) - + `std::vector get_base_behaviors( Cell* pCell );` get all the cell's base behaviors - + `std::vector get_base_behaviors( Cell* pCell , std::vector indices );` get a subset of base behaviors (with given indices) - + `std::vector get_base_behaviors( Cell* pCell , std::vector names );` get a subset of base behaviors (with given names) - + `double get_single_base_behavior( Cell* pCell , int index );` get a single base behavior (by index) - + `double get_single_base_behavior( Cell* pCell , std::string name );` get a single base behavior (by name) - -+ Created a new `interaction-sample` project to illustrate the new interactions and transformations: - + Blood vessels release resource - + Virulet bacteria colonize near vessels (by chemotaxis up towards a secreted quorum factor and resource) - + Stem cells divide and differentiate into differentiated cells - + Differentiated cells divide until experiencing elevated pressure (to detect confluence) - + Bacteria-secreted virulence factor kills stem and differentiated cells. Dead cells release debris. - + Macrophages chemotax towards quorum factor and debris and secrete pro-inflammatory factor in presence of dead cells or bacteria - + Macrophages phagocytose dead cells - + CD8+ T cells chemotax towards pro-inflamatory factor and attack bacteria - + Neutrophils chemotax towards pro-inflammatory factor and phagocytose live bacteria - + Accumulated damage kills bacteria. - + With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow. - -### Minor new features and changes: -#### 1.10.1 -+ None in this version. See 1.10.0. -#### 1.10.0 -+ All sample projects have a new rule "make name" to tell you the name of the executable. - -+ All sample projects output the executable name to screen for easier reference. - -+ `Cell_Definition` has a new Boolean `is_movable`, so that all cells of a type can be set to non-movable. (Default: `is_movable = true`;) This allows you to use agents as rigid objects or barriers. - -+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition. - -### Beta features (not fully supported): - #### 1.10.1 - + None in this version. See 1.10.0. - #### 1.10.0 -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -#### 1.10.1 -+ XML parsing has been made more robust to "survive" using an incorrect substrate in the `chemotactic_sensitivities` section. - -+ Missing PhysiBoSS makefiles have been replaced. - -+ Fixed broken makefile for worms sample project. - -#### 1.10.0 -+ When the `cell_defaults` definition has been altered, new cell types may unwittingly copy nonzero parameter values from this default. Now, immediately after copying `cell_defaults`, the XML parsing will reset motility to off (with `NULL` function for bias direction), reset all secretion/uptake/export to zero, reset all cell interactions and transformations to zero. It will then continue to parse the XML file. Set `legacy_cell_defaults_copy = true` in the config file to override this bugfix. - -+ We refactored the pseudorandom number generator (at the basis of `UniformRandom()`) to improve thread safety. Previously, all threads shared a single PRNG, which was not thread safe. For newer fast processors with many threads, this could lead to sufficiently many "collisions" to introduce subtle biases in some cases (particularly for purely Brownian motion that is not dominated by chemotaxis, proliferation, and other behaviors). This is now corrected by creating a PRNG for each thread, each with its own seed. We used `std::seed_seq` to determinstically set a good spread of seeds to prevent correlation between the PRNGs, with the convention that the 0th thread's seed is either the user-specified seed or a random seed. This preserves original single-thread behavior from prior versions. - -+ Random motility now uses `UniformOnUnitCircle()` (in 2D) and `UniformOnUnitSphere()` (in 3D) to choose the random component of the migration direction, rather than hand-coding selection of the random vector. - -+ In response to PR 91 (https://github.com/MathCancer/PhysiCell/pull/91): Previoulsy, if the make jpeg rule fails, the `__*.txt` temporary files are left in place, so a subsequent "make jpeg" fails until these files are manually removed. Replacing `>>` (append) with `>` (overwrite) fixes the problem. Thanks [saikiRA1011](https://github.com/saikiRA1011)! - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the very near future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -**Version:** 1.10.0 - -**Release date:** 13 May 2022 - -## Release summary: - -This release introduces major new phenotype functionality, including standardized support for cell-cell interactions (phagocytosis, cell attack that increases a tracked damage variable, and cell fusion), cell transformations, advanced chemotaxis, and cell adhesion affinities for preferential adhesion. This release also includes new, auto-generated "dictionaries" of signals and behaviors to facilitate writing cell behavioral models and intracellular models, as well as standardized Hill and linear response functions for use in intracellular models. Lastly, this release includes a number of bugfixes, most notably pseudorandom number generators with improved thread safety. - -A blog post and tutorial on the new phenotype elements can be found at http://www.mathcancer.org/blog/introducing-cell-interactions-and-transformations - -A blog post and tutorial on the new signal and behavior dictionaries can be found at http://www.mathcancer.org/blog/introducing-cell-signal-and-behavior-dictionaries. - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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.10.z versions -#### 1.10.0 - -+ Created `Cell_Interactions` in `Phenotype` as a standard representation of essential cell-cell interactions, including phagocytosis, "attack", and fusion. - + Users can set phagocytosis rates for dead cells via `phenotype.cell_interactions.dead_phagocytosis_rate`. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. - + Users can set phagocytosis rates for each live cell type via `phenotype.cell_interactions.live_phagocytosis_rates`. There is one rate for each cell type in the simulation. Cells automatically phagocytose live and dead neighbors at each mechancis time step based upon the phagocytosis rates. Phagocytosis absorbs the target cell's volume and internal contents and flags the target for removal. The cell will eventually shrink back towards its target volume. - + For convenience, the phagocytosis rates can be accessed (read or written) via `phenotype.cell_interactions.live_phagocytosis_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set attack rates for live cells via `phenotype.cell_interactions.attack_rates`. There is one rate for each cell type in the simulation. Cells automaticaly attack neighbors at each mechanics time step based upon the rates. An attack event increases the target cell's `cell.state.damage` by `damage_rate * dt_mechanics` and `cell.state.total_attack_time` by `dt_mechanics`. It is up to the scientist user to set additional hypotheses that increases cell death with accumulated damage or attack time. - + For convenience, the attack rates can be accessed via `phenotype.cell_interactions.attack_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - + Users can set fusion rates for live cells via `phenotype.cell_interactions.fusion_rates`. There is one rate for each cell type in the simulation. Cells automaticaly fuse with at each mechanics time step based upon the rates. Fusion will merge the two cells' volumes and internal contents, add their nuclei (recorded in `cell.state.number_of_nuclei`), and move the combine cell to the prior center of volume. The combined cell's new target volume is the sum of the two original cells' target volumes. - + For convenience, the fusion rates can be accessed via `phenotype.cell_interactions.fusion_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Created `Cell_Transformations` in `Phenotype` as a standard representation of cell transformations such as differentation or transdifferentiation. - + Users can set transformation rates for each live cell type via `phenotype.cell_transformations_transformation_rates`. There is one rate for each cell type in the simulation. Cells automatically attempt to transform to these types at each phenotype time step based upon the phagocytosis rates. - + For convenience, the transformation rates can be accessed (read or written) via `phenotype.cell_transformations.transformation_rate(name)` where `name` (a `std::string`) is the human-readable name of a cell type. - -+ Updated `Cell_State` to track the number of nuclei (for fusion), total damage (e.g., for cell attack) and total attack time. - -+ Added a new `advanced_chemotaxis` function with data stored in `phenotype.motility` to allow chemotaxis up a linear combination of gradients. - + `cell.phenotype.motility.chemotactic_sensitivities` is a vector of chemotactic sensitivies, one for each substrate in the environment. By default, these are all zero for backwards compatibility. A positive sensitivity denotes chemotaxis up a corresponding substrate's gradient (towards higher values), whereas a negative sensitivity gives chemotaxis against a gradient (towards lower values). - + For convenience, you can access (read and write) a substrate's chemotactic sensitivity via `phenotype.motility.chemotactic_sensitivity(name)`, where `name` is the human-readable name of a substrate in the simulation. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * grad(rho_0) + sensitivity_1 * grad(rho_1) + ... + sensitivity_n * grad(rho_n)`. - + If the user sets `cell.cell_functions.update_migration_bias = advanced_chemotaxis_function_normalized`, then these sensitivities are used to set the migration bias direction via `d_mot = sensitivity_0 * |grad(rho_0)| + sensitivity_1 * |grad(rho_1)| + ... + sensitivity_n * |grad(rho_n)|.` - -+ Added a new `adhesion_affinities` to `phenotype.mechanics` to allow preferential adhesion. - + `cell.phenotype.mechanics.adhesion_affinities` is a vector of adhesive affinities, one for each cell type in the simulation. By default, these are all one for backwards compatibility. - + For convenience, you can access (read and write) a cell's adhesive affinity for a specific cell type via `phenotype.mechanics.adhesive_affinity(name)`, where `name` is the human-readable name of a cell type in the simulation. - + The standard mechanics function (based on potentials) uses this as follows. If cell `i` has an cell-cell adhesion strength `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has a cell-cell adhesion strength of `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - + The standard elastic spring function (`standard_elastic_contact_function`) uses this as follows. If cell `i` has an elastic constant `a_i` and an adhesive affinity `p_ij` to cell type `j` , and if cell `j` has an elastic constant `a_j` and an adhesive affinity `p_ji` to cell type `i`, then the strength of their adhesion is `sqrt( a_i p_ij a_j p_ji )`. Notice that if `a_i = a_j` and `p_ij = p_ji`, then this reduces to `a_i a_pj`. - -+ `PhysiCell_basic_signaling` now includes standard Hill and linear response functions: - + `Hill_response_function( double s, double half_max , double hill_power )` is a Hill function responding to signal `s` with a half-max of `half_max` and Hill coefficient of `hill_power`. We note that this function is an order of magnitude faster when the `hill_power` is an integer (e.g., 1 or 2) rather than a non-integer power (e.g., 1.4). - + `double linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 0.0 (for inputs `s` below `s_min`) to 1.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - + `double decreasing_linear_response_function( double s, double s_min , double s_max )` is a linear ramping from 1.0 (for inputs `s` below `s_min`) to 0.0 (for inputs `s` above `s_max`). The outputs are clamped to the range [0,1]. - -+ We introduced a "dictionary" of standard signals that can be used as inputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of signals include: - + extracellular and intracellular substrate concentrations - + substrate gradients - + contact with dead cells - + contact with cells (of type X) - + damage - + pressure - + Use `display_signal_dictionary()` to quickly display a list of available signals. - + Substantial functionality to query signals - + `int find_signal_index( std::string signal_name )` : get the index of the named signal - + `std::vector find_signal_indices( std::vector signal_names );` get a vector of indices for a vector of named signals - + `std::string signal_name( int i );` display the name of the signal with the given index - + `std::vector get_signals( Cell* pCell );` get a vector of all known signals for the cell - + `std::vector get_cell_contact_signals( Cell* pCell );` get a vector of the cell contact associated signals for the cell - + `std::vector get_selected_signals( Cell* pCell , std::vector indices );` get a vector of signals for the cell, with the supplied indices - + `std::vector get_selected_signals( Cell* pCell , std::vector names );` get a vector of signals for the cell, with the supplied human-readable names of the signals - + `double get_single_signal( Cell* pCell, int index );` get a single signal for the cell with the indicated index - + `double get_single_signal( Cell* pCell, std::string name );` get a single signal for the cell with the indicated human-readable name - -+ We introduced a "dictionary" of standard behaviors that can be used as outputs to intracellular and rule-based models. This dictionary is automatically constructed at the start of each simulation based upon the combinations of signaling substrates and cell types. - + Major classes of behaviors include: - + secretion, secretion target, uptake, and export rates - + cycle progression - + death rates - + motility parameters - + chemotactic parameters - + cell-cell adhesion and repulsion parameters - + cell adhesion affinities - + cell-BM adhesion and repulsion parameters - + phagocytosis rates - + attack rates - + fusion rates - + transformation rates - + Use `display_behavior_dictionary()` to quickly see a list of posible behaviors. - + Substantial functionality to query and set behaviors - + `int find_behavior_index( std::string response_name )` : get the index of the named behavior - + `std::vector find_behavior_indices( std::vector behavior_names )` get the indices for the given vector of behavior names. - + `std::string behavior_name( int i );` get the name of the behavior with the given index - + `std::vector create_empty_behavior_vector();` create an empty vector for the full set of behaviors - + `void set_behaviors( Cell* pCell , std::vector parameters );` write the full set of behaviors to the cell's phentoype - + `void set_selected_behaviors( Cell* pCell , std::vector indices , std::vector parameters );` write the selected set of behaviors (with supplied indices) to the cell's phenotype - + `void set_selected_behaviors( Cell* pCell , std::vector names , std::vector parameters );` write the selected set of behaviors (with supplied names) to the cell's phenotype - + `void set_single_behavior( Cell* pCell, int index , double parameter );` write a single behavior (by index) to the cell phentoype - + `void set_single_behavior( Cell* pCell, std::string name , double parameter );` write a single behavior (by name) to the cell phentoype - + Substantial functionality to query the cell's current behavior - + `std::vector get_behaviors( Cell* pCell );` get all the cell's current behaviors - + `std::vector get_behaviors( Cell* pCell , std::vector indices );` get a subset of behaviors (with given indices) - + `std::vector get_behaviors( Cell* pCell , std::vector names );` get a subset of behaviors (with given names) - + `double get_single_behavior( Cell* pCell , int index );` get a single behavior (by index) - + `double get_single_behavior( Cell* pCell , std::string name );` get a single behavior (by name) - + Substantial functionality to query the cell's referece behaviors (from its cell definition) - + `std::vector get_base_behaviors( Cell* pCell );` get all the cell's base behaviors - + `std::vector get_base_behaviors( Cell* pCell , std::vector indices );` get a subset of base behaviors (with given indices) - + `std::vector get_base_behaviors( Cell* pCell , std::vector names );` get a subset of base behaviors (with given names) - + `double get_single_base_behavior( Cell* pCell , int index );` get a single base behavior (by index) - + `double get_single_base_behavior( Cell* pCell , std::string name );` get a single base behavior (by name) - -+ Created a new `interaction-sample` project to illustrate the new interactions and transformations: - + Blood vessels release resource - + Virulet bacteria colonize near vessels (by chemotaxis up towards a secreted quorum factor and resource) - + Stem cells divide and differentiate into differentiated cells - + Differentiated cells divide until experiencing elevated pressure (to detect confluence) - + Bacteria-secreted virulence factor kills stem and differentiated cells. Dead cells release debris. - + Macrophages chemotax towards quorum factor and debris and secrete pro-inflammatory factor in presence of dead cells or bacteria - + Macrophages phagocytose dead cells - + CD8+ T cells chemotax towards pro-inflamatory factor and attack bacteria - + Neutrophils chemotax towards pro-inflammatory factor and phagocytose live bacteria - + Accumulated damage kills bacteria. - + With default parameters, bacteria kill off cells ot form abscesses, until death attracts macrophages to activate immune response to kill the invaders, after which the tissue can regrow. - -### Minor new features and changes: - -+ All sample projects have a new rule "make name" to tell you the name of the executable. - -+ All sample projects output the executable name to screen for easier reference. - -+ `Cell_Definition` has a new Boolean `is_movable`, so that all cells of a type can be set to non-movable. (Default: `is_movable = true`;) This allows you to use agents as rigid objects or barriers. - -+ `create_cell( Cell_Definition )` now uses "`is_movable`" from the cell definition. - -### Beta features (not fully supported): - -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -+ When the `cell_defaults` definition has been altered, new cell types may unwittingly copy nonzero parameter values from this default. Now, immediately after copying `cell_defaults`, the XML parsing will reset motility to off (with `NULL` function for bias direction), reset all secretion/uptake/export to zero, reset all cell interactions and transformations to zero. It will then continue to parse the XML file. Set `legacy_cell_defaults_copy = true` in the config file to override this bugfix. - -+ We refactored the pseudorandom number generator (at the basis of `UniformRandom()`) to improve thread safety. Previously, all threads shared a single PRNG, which was not thread safe. For newer fast processors with many threads, this could lead to sufficiently many "collisions" to introduce subtle biases in some cases (particularly for purely Brownian motion that is not dominated by chemotaxis, proliferation, and other behaviors). This is now corrected by creating a PRNG for each thread, each with its own seed. We used `std::seed_seq` to determinstically set a good spread of seeds to prevent correlation between the PRNGs, with the convention that the 0th thread's seed is either the user-specified seed or a random seed. This preserves original single-thread behavior from prior versions. - -+ Random motility now uses `UniformOnUnitCircle()` (in 2D) and `UniformOnUnitSphere()` (in 3D) to choose the random component of the migration direction, rather than hand-coding selection of the random vector. - -+ In response to PR 91 (https://github.com/MathCancer/PhysiCell/pull/91): Previoulsy, if the make jpeg rule fails, the `__*.txt` temporary files are left in place, so a subsequent "make jpeg" fails until these files are manually removed. Replacing `>>` (append) with `>` (overwrite) fixes the problem. Thanks [saikiRA1011](https://github.com/saikiRA1011)! - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the very near future. - -+ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. - -+ 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. - -+ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. - -+ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -**Version:** 1.9.1 - -**Release date:** 13 September 2021 - -## Release summary: - -This release focuses primarily on bug fixes. It fixes memory leaks and other bugs in intracellular modeling, as well as several small bugs in parsing cell definitions in the XML configuration file. It also implements a basic_volume_model that only models total volume. (For internal consistency, it treats the entire cell as cytoplasm.) - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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: - -+ None in this release. - -### Minor new features and changes: - -+ Implemented basic_volume_model (see standard models), where nuclear volumes are set to zero, and cytoplasmic volumes are updated as normal. - -### Beta features (not fully supported): - -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: -+ Fixed bug in legend function where on some rare occasions, the temporary cell could adversely interact with other cells prior to deletion. - -+ Remove an old error printout from standard_elastic_contact_function that causes problem with the ANCIENT version of gcc (4.8.x) that nanoHUB refuses to upgrade. - -+ Fixed Libroadrunner memory leak issue. - -+ Made minor bugfixes to parsing cell definitions in the XML configuration files: - + verify motility enabled flag is present before parsing its value - + fix bug when parsing multiple death models - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -+ We will most probably merge all of "core" and "modules" into "core." - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -**Version:** 1.9.0 - -**Release date:** 12 July 2021 - -## Release summary: - -This release introduces intracellular modeling, i.e., models inside individual cells, for PhysiCell. We support three types of intracellular models: boolean networks, ordinary differential equations (ODEs), and dynamic flux balance analysis (dFBA). An intracellular model is part of a cell type's phenotype specification. Currently, we only support a single intracellular model per cell type; however, different *types* of models can be used for different cell types, e.g., a boolean network for cell type A and ODEs for cell type B. - -This new functionality has been a collaborative effort with the Institut Curie, the Barcelona Supercomputing Center, and the University of Washington. -We provide a unified C++ interface between each intracellular model and PhysiCell. - -The Systems Biology Markup Language (SBML) is used to define both the ODEs and FBA models; boolean networks are defined using MaBoSS's custom -configuration (.cfg and .bnd) files. (NOTE: PhysiCell does *not* support the full SBML specification; details are provided elsewhere.) - - -**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. - -**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: - -+ First full support for intracellular models: boolean networks, ordinary differential equations (ODEs), and dynamic flux balance analysis (dFBA). - -+ Added an abstract `Intracellular` class in core/PhysiCell_phenotype.h. Concrete classes for the supported intracellular models provide the functionality in the abstract class. - -+ Added an `/addons` directory in the root directory. This is where the intracellular concrete classes and code are located. - -+ We adopt existing software for intracellular model solvers: MaBoSS for boolean networks, libRoadrunner for ODEs, and Clp for dFBA. However, to make it easier for modelers to use these solvers in PhysiCell, we provide automatic downloads of libraries (see next bullet). - -+ If a PhysiCell model uses an intracellular model, the PhysiCell Makefile will run a Python script (in the /beta directory) that checks to see if you have already downloaded the software (library) for the intracellular solver and, if not, downloads it and puts it in a directory within your PhysiCell project where it can be found and linked. The Python script will download the appropriate library for your operating system. - -### Minor new features and changes: - -+ Added `intracellular` XML element (inside `phenotype`) that specifies the type of intracellular model, its model definition file, its PhysiCell dt value to be evaluated, and relevant mappings between it and PhysiCell data. - -+ Added Python scripts in /beta to download intracellular solver libraries: setup_libroadrunner.py, setup_libmaboss.py, setup_fba.py - -+ Added new sample intracellular projects: physiboss_cell_lines, ode_energy, and cancer_metabolism - -+ Added parsing of `dt_intracellular` XML element in modules/PhysiCell_settings.cpp (associated with the `intracellular_dt` global parameter in PhysiCell_constants.{h,cpp}). -However, it is up to each intracellular model as to how, or if, it will be used. - -+ Added parsing of `intracellular_data` XML element in modules/PhysiCell_settings.cpp to determine. However, it is not currently used by the intracellular sample models. It may be used for debugging in the future. - -+ Updated the [Quickstart](documentation/Quickstart.md) guide, primarily to reflect necessary changes for intracellular solver libraries. - -+ Added `UniformInt()` to core/PhysiCell_utilities.cpp (used by intracellular boolean models) - -+ Added new functions to ./modules/PhysiCell_geometry to draw (unfilled) circles of cells - -+ Added new sample project: celltypes3 - -+ Removed sample projects: template2D, template3D - -+ Deleted deprecated code in core/PhysiCell_cell_container.cpp - -+ Bug fix and improvements to /beta/params_run.py to perform parameter explorations of models. - -### Beta features (not fully supported): - -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ [Model Builder Tool](https://github.com/PhysiCell-Tools/PhysiCell-model-builder/releases) - -+ Added a simple Qt GUI for plotting cells only (plot_cells.py and vis_tab_cells_only.py in /beta) - -+ Added a simple Qt GUI for plotting substrates and cells (plot_data.py and vis_tab.py in /beta) - -+ Added simple contour plotting of a substrate (anim_substrate2D.py in /beta; copy to /output) - -### Bugfixes: - -+ In core/PhysiCell_cell.cpp, replace `switch` statement with `if`/`else if` to prevent compiler errors related to `static const int` from PhysiCell_constants. - -+ core/PhysiCell_cell.cpp: assign_position(double x, double y, double z): make sure the current mechanics voxel is initialized. - -+ bug fix to update phenotype geometry when parsing and processing `volume` XML element - -+ The Makefile `reset` target now includes a `touch ./core/PhysiCell_cell.cpp` since its `.o` file can have intracellular dependencies. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -**Version:** 1.8.0 - -**Release date:** 9 March 2021 - -## Release summary: - -This release formally introduces Cell Definitions: a way to fully create cell types in the XML configuration file, including each cell type's initial phenotype and custom variables. This extends our recent work to shift specification of the microenvironment and boundary conditions to XML, and continues our trend towards a future release when many models can be designed and run without compiling any C++ at all. Most of the sample projects have been updated to use this new paradigm, including the a unified 2D/3D `template` project. We recommend using that template as the starting point for any new PhysiCell model. - -This release also introduces contact functions: a way to specify cell-cell contact interactions for any cells that you attach (using new, standardized attach and detach functions). Look at the `cancer-biorobots` and `biorobots` sample projects for examples for examples of the newly-introduced, standardized "spring" contact functions. The new `worm` sample project shows a more sophisticated example where cells exchange a differentiation factor across their contacts to model juxtacrine signaling. To help support contact interaction modeling, we include new search functions to easily report a vector of Cells that are nearby for use in your contact interactions. The default mechanics function also records a list of all currently (mechanically) interacting cells in state.neighbors. - -The release also add a number of features to improve the ease of code use: a copy of the XML configuration file is now saved in your output directory to help keep track of what parameters and settings generated the data. We auto-generate a `legend.svg` file (also in output) based on your coloring function and cell defintions. The sample projects' Makefiles now include new rules to create animated GIFs, convert SVG to JPG, create a MP4 movie, and even auto-download the latest version of PhysiCell to update an existing project. A key new feature is the ability to pre-specify cell locations in a CSV file. The template projects will auto-parse this list if enabled to place cells at the start of the simulation. We also provide new functionality to add a virtual wall to the simulation domain to help keep cells from leaving; this can be enabled or disabled from the XML configuration file. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ Full rollout of `Cell_Definition` in the XML configuration files. Many basic models can now be fully defined in XML with minimal or no C++. - -+ Unified the 2D and 3D template projects into a single "template" project. - -+ New `predator-prey-farmer` sample project. Prey look for and consume food that's released by farmers. Prey avoid predators, predators hunt and eat prey. - -+ Improved thread safety, particularly when cells ingest cells. - -+ Introduced new cell-cell contact functions with syntax: - -`void contact( Cell* pME, Phenotype& my_phenotype , Cell* pOther, Phenotype& other_phenotype, double dt )` - -These are exexcuted once per mechanics time step. Best practice is to either only read `pOther` and `other_phenotype`, or use OMP critical locks if writing data to `pOther` and `other_phenotype`. - -For any cell (`this`), the contact function will be executed for any other cell (other) in `this->state.attached_cells`. The modeler will still need to decide which cells to attach. - -All attached cells are automatically removed when a cell dies or divides. - -+ Added new attachment and detachment functions to the `Cell` class: -++ `void attach_cell( Cell* pAddMe );` Add `pAddme` to the cell's `state.attached_cells` for use in contact functions. -++ `void detach_cell( Cell* pRemoveMe );` Remove `pRemoveMe` from the cell's `state.attached_cells` list. -++ `void remove_all_attached_cells( void );` Remove all attached cells. - -+ Added additional attachment and detachment functions outside the `Cell` class: -++ `void attach_cells( Cell* pCell_1, Cell* pCell_2 );` Add `pCell_2` to `pCell_1->state.attached_cells` and add `pCell_1` to `pCell_2->state.attached_cells` -++ `void detach_cells( Cell* pCell_1 , Cell* pCell_2 );` Remove the attachments. - -+ Introduced a standardized cell-cell spring-like adhesion contact function: `standard_elastic_contact_function.` - -This will add an additional Hookean spring attraction to cells in `state.attached_cells`. The modeler will still need to decide when to attach or detach cells. (Recommended practice: use the `custom` function that is evaluated once per mechanics time step.) - -+ Introduced two new member search funtions for cells to facilitate contact functions: -++ `std::vector nearby_cells(void)` returns a vector of all cells in the nearby mechanics voxels, excluding the cell (`this`). -Users should still test the distance to these cells in their interaction functions. -++ `std::vector nearby_interacting_cells(void)` returns a vector of all cells in the nearby mechanics voxels that are within interaction distance, excluding the cell (`this`). This uses the same distance testing as in the default mechanics functions. - -+ Introduced two new search funtions outside the `Cell` class to facilitate contact functions: -++ `std::vector nearby_cells(Cell* pCell)` returns a vector of all cells in the nearby mechanics voxels, excluding the cell (`pCell`). -Users should still test the distance to these cells in their interaction functions. -++ `std::vector nearby_interacting_cells(Cell* pCell)` returns a vector of all cells in the nearby mechanics voxels that are within interaction distance, excluding the cell (`pCell`). This uses the same distance testing as in the default mechanics functions. - -+ The default mechanics function now automatically updates `state.neighbors` with a list of all cells which had non-zero mechanical interactions in the last mechanics time step. Use this as an inexpensive (``prepaid``) method to find nearby cells for your own contact functions. - -+ Introduced a new sample project `worm` which shows advanced interaction testing and contact testing. Individual cells aggregate based on chemotaxis towards a secreted quorum factor and test for contacts. Cells can form a maximum of `n` (default: 2) attachments with the built-in spring functions. Cells on the ends (1 attachment) hold a steady expression of a differentiation function (`head`). This factor is exchanged between interior cells (2 attachments) to model juxtacrine signaling, using a contact function. End cells determine if they are a head or a tail based by comparing their expresoin with their linked neibhbor. This introduces asymmmetry that allows the "worms" to crawl directionally. - -+ All sample projects now copy the configuration file to the output directory, to help keep track of settings and parameters used to create a simulation result. - -+ Updated the sample projects to use the new Cell_Definitions and contact functions. - -+ Users can now pre-specify cell positions by creating a CSV file: -++ Each row corresponds to a cell: x,y,z,typeID -++ TypeID is the integer index of a `Cell_Definition` (ideally defined in XML!) -++ Call the function `load_cells_csv( std::string filename )` to load these possitions and place the cells in corresponding positions. Ideally, cally this function at the end of `setup_tissue()`. The template projects will call this function automatically if a cell CSV file is specified in the `initial_conditions` section of the XML configuration file. -++ The `template` project already uses this function in the right place. See `worm-sample` for project that uses it. - -### Minor new features and changes: - -+ 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. - -+ All sample projects have a `make jpeg` rule that uses ImageMagick to convert SVG snapshots into JPG files. - -+ All sample projects have a `make movie` that uses ffmepg to convert JPG snapshots to an mp4 animation. - -+ The `make upgrade` rule will check for and download the most recent version of PhysiCell, overwriting these core functions (and sample projects) without overwriting your project code. - -+ A new `paint_by_number_cell_coloring` coloring function colors each cell type with a unique color. (Currently there is a maximum of 13 pre-defined colors for 13 cell types.) Apoptotic cells are black, and necrotic cells are brown. - -+ Cycle and Death in the XML `Cell_Definitions` no longer require a `code` as long as the `name` is correct. - -+ Revised template project to a barebones minimum. - -+ Removed beta-testing sample project. - -+ Added functionality to auto-generate an SVG legend based on the currently defined XML funtions and coloring function. - -### Beta features (not fully supported): - -+ Started writing a standardized set of functions for Hill functions and promoter/inhibitor signaling. - -+ Started creating new functions to fill geometric shapes with cells of a chosen type. - -### Bugfixes: - -+ In response to SourceForge ticket #43, fixed the bug where Dirichlet conditions weren't properly applied to individual boundaries. - -+ Cleaned up code as suggested in SourceForge Ticket #42. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ Read saved simulation states (as MultiCellDS digital snapshots) - -+ Integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ Integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ Create an angiogenesis sample project - -+ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ Improved plotting options in SVG - -+ Further update sample projects to make use of more efficient interaction testing available - -+ Major refresh of documentation. - -* * * - -**Version:** 1.7.1 - -**Release date:** 2 June 2020 - -## Release summary: - -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. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ No major changes. See 1.7.0 for most recent major changes. - -### Minor new features and changes: - -+ Created new function std::vector UniformOnUnitSphere( void ) that returns a (uniformly) random vector (x,y,z) on the unit sphere. - -+ Created new function std::vector UniformOnUnitCircle( void ) that returns a (uniformly) random vector (x,y,0) on the unit circle (in the z = 0 plane). - -+ Created std::vector 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. - -+ 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." - -+ All sample projects now check for in their XML config files. - -+ Template projects calculate gradients and perform internal substrate tracking by default. - -+ 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. - -+ Changed beta implementation of XML cell definitions: - + 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. - + In death, rates renamed to death_rates. PhysiCell will give a deprecatoin warning for transition_rates until the official release of XML cell definitions. - + In cycle and death, "phase_durations" can now be used in place of phase_transition rates. This may be more intuitive for some modelers. - -+ See 1.7.0 for other recent minor changes. - -### Beta features (not fully supported): - -+ 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. - -### Bugfixes: - -+ In response to SourceForge ticket 26, fixed placement of parent cell in Cell::divide() - -+ Removed errant Cell_Definition in the new template sample project. - -+ Added an extra check for bad chemotaxis definitions in response ot SourceForge ticket 28. - -+ Fixed bugs in processing of the "death" section of XML cell definitions. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Methods or scripts to make "upgrading" PhysiCell easier for existing projects (to avoid overwriting the config file, Makefile, or custom files. - -+ Current "template" project will be rolled into a new "predator-prey" sample project, and "template" will be tidied up. - -+ Further XML-based simulation setup. - -+ current sample projects will be refactored to use XML cdell definitions. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.7.0 - -**Release date:** 12 May 2020 - -## Release summary: - -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. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ 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. - -+ Added new helper functions to help users to more easily set the *target* cell size: - + 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. - + void Cell::set_target_radius( double new_radius ) behaves similarly, but using a radius instead. - -+ 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. - -+ 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: - - microenvironment.diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_LOD_1D - - 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. - -+ Added a standardized chemotaxis function to the standard models: - - void chemotaxis_direction( Cell* pCell , Phenotype& phenotype , double dt ); - - This sets: - - phenotype.motility.motility_bias_direction = direction * grad( index ), where - - direction = phenotype.motility.chemotaxis_direction - (1 to go up gradient, -1 to go down gradient) - index = phenotype.motility.chemotaxis_index - (the index of one of hte diffusing substrates) - -+ 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. - -### Minor new features and changes: - -+ Created get_cell_definition(std::string) to return by reference the matching cell definition (search by name). Returns cell_defaults if nothing found. - -+ Created get_cell_definition(int) to return by reference the matching cell definition (search by type). Returns cell_defaults if nothing found. - -+ added int chemotaxis_index and chemotaxis_direction to the Motility class to assist with a new standard chemotaxis function. - -+ scale_all_secretion_by_factor also scales net_export_rates. - -+ sync_to_current_microenvironment and sync_to_microenvironment set up net_export_rates - -+ Secretion::advance now updates net_export processes - -+ Secretion::set_all_secretion_to_zero and Secretion::scale_all_secretion_by_factor act on net_export_rates as well. - -+ Cell::turn_off_reactions acts on net_export_rates as well. - -+ 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. - -+ Updated documentation to reflect the new net export rates. - -+ Updated the documentation to fully state the biotransport PDEs (for better clarity), including notes on the dimensions of the parameters. - -+ Deprecated the following (unimplemented) function from the Volume class definition, as promised: -``` - void update( Cell* pCell, Phenotype& phenotype, double dt ) -``` - -+ 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. - -+ The Cell_Definition default constructor and copy constructor automatically register all new cell definitions in cell_definitions_by_index; - -+ Created a display_cell_definitions(std::ostream&) function to quickly list all cell definitions and key information. - -+ 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(). - -+ Created find_cell_definition(std::string) to return a pointer to the matching cell definition (search by name). Returns NULL if nothing found. - -+ Created find_cell_definition(int) to return a pointer to the matching cell definition (search by type). Returns NULL if nothing found. - -+ Created unit tests for cell definitions - -+ Deprecated oxygen_index, glucose_index, TUMOR_TYPE, and VESSEL_TYPE from PhysiCell_Constants as promised. - -+ Minor source code cleanup in PhysiCell_settings.cpp. - -+ All sample projects now automatically build (and display) the registries of cell definitions via build_cell_definitions_maps() and display_cell_definitions(). - -+ added the following std::vector 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. - -+ Minor cleanup in BioFVM_microenvironment.cpp - -+ Microenvironment::update_dirichlet_node(voxel_index,substrate_index,value) now sets dirichlet_activation_vectors[voxel_index][substrate_index] = true; - -+ Microenvironment::set_substrate_dirichlet_activation( int substrate_index , bool new_value ) now sets dirichlet_activation_vectors[voxel_index][substrate_index] for ALL Dirichlet nodes. - -+ Microenvironment::apply_dirichlet_conditions() now checks the Dirichlet activation vector of the individual voxel. - -+ 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. - -+ 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. - -+ The various Microenvironment::add_density() functions now - -+ Added function Microenvironment::set_substrate_dirichlet_activation( int index, std::vector& new_value ) to set the entire vector of activation at a specific voxel. - - -### Beta features (not fully supported): - -+ 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. - - -### Bugfixes: - -+ In response to SourceForge ticket 25, added cell_defaults.phenotype.molecular.sync_to_microenvironment( µenvironment ); to the create_cell_types() functions in the 2D and 3D template projects. - -+ In response to SourceForge ticket 18, update_cell_and_death_parameters_O2_based() now checks for deterministic necrosis. - -+ 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. - -``` -data-cleanup: - rm -f *.mat - rm -f *.xml - rm -f *.svg - rm -rf ./output - mkdir ./output - touch ./output/empty.txt -``` -+ 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. - -+ Removed the false statement from the user manual that stated that the cytoplasmic:nuclear ratio is between 0 and 1. - -+ Removed the false statement from the user manual that stated that relative cell rupture volume is between 0 and 1. - -+ Updated the list of PhysiCell_Constants in response to SourceForge ticket 11. - -+ 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. - -+ Microenvironment::get_substrate_dirichlet_activation() mistakenly returned a double. Now it returns bool. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.6.1 - -**Release date:** 26 January 2020 - -## Release summary: - -This release fixes minor bugs and improves the documentation. It also adds some minor new capabilities, such as setting time step sizes in the XML configuration file. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ List here. - -### Minor new features and changes: - -+ "make list-projects" now displayed to standard output a list of all the sample projects. - -+ dt_diffusion, dt_mechanics, and dt_phenotype can now be set via the XML configuration file in the options section. - -+ Added documentation on the time step sizes to the User Guide. - -+ Preliminary work to support Travis CI testing. - -+ Updated documentation to note that Cell::start_death is the preferred method to trigger cell death, and NOT Death::trigger_death. - -+ Updated Microenvironment::compute_all_gradient_vectors to now compute one-sized gradients on edge voxels. (Previously, no gradient was computed here.) - -+ Updated Microenvironment::compute_all_gradient_vectors to check if there is no z-direction (i.e., 2D) and exit early if so. - -+ Updated Microenvironment::compute_all_gradient_vectors to check if there is no y-direction (i.e., 1D) and exit early if so. - -+ Made PhysiCell_constants.cpp (and added this to the core of all project makefiles) so that dt and other variables can be non-static (i.e., set by XML options). - -+ Added "make checkpoint" rule to makefiles. This zips up the user-custom stuff (./config, ./, ./custom_modules) into a timestamped zip file. Use this before upgrading PhysiCell to make sure you keep your own Makefile, etc. - -### Beta features (not fully supported): - -+ List here. - -### Bugfixes: - -+ BioFVM's diffusion_decay_solver__constant_coefficients_LOD_3D, diffusion_decay_solver__constant_coefficients_LOD_2D check for regular meshes instead of uniform meshes. - -+ Biorobots sample project fixed bugs on searching for substrates vs. searching for cell types. - -+ In BioFVM_vectors, the normalize functions now return a zero vector if the vector's norm is less than 1e-16. This is for John Metzcar. - -+ In PhysiCell_Cell.cpp, made fixes to Cell::divide() and Cell::assign_position() to fix a bug where cells dividing on the edge of the domain woudl place a daughter cell at (0,0,0). Thanks, Andrew Eckel! - -+ Code cleanup in PhysiCell_cell_container in Cell_Container::update_all_cells() as suggested by Andrew Eckel. Thanks! - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -+ 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. - -+ We might make "trigger_death" clear out all the cell's functions, or at least add an option to do this. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -**Version:** 1.6.0 - -**Release date:** 20 August 2019 - -## Release summary: - -This release introduces a new XML-based configuration for the chemical microenvironment. All -the sample projects have been updated to use this new functionality. There is no change -in APIs or high-level usage / syntax for end users; old projects should continue to work without -modification, although we highly recommend migrating to the simplified microenvironment setup. -A short blog tutorial on this new functionality can be found at - -http://mathcancer.org/blog/setting-up-the-physicell-microenvironment-with-xml - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ XML-based setup of the chemical microenvironment. - -### Minor new features and changes: - -+ Updated template2D sample project: - + Refined "reset" and "data-cleanup" rules in Makefile - + Converted project to use the new XML-based microenvironment setup. - -+ Updated template3D sample project: - + Refined "reset" and "data-cleanup" rules in Makefile - + Converted project to use the new XML-based microenvironment setup. - -+ Updated heterogeneity sample project: - + Refined "reset" and "data-cleanup" rules in Makefile - + Converted project to use the new XML-based microenvironment setup. - -+ Updated cancer immune sample rpoject: - + Refined "reset" and "data-cleanup" rules in Makefile - + Converted project to use the new XML-based microenvironment setup. - -+ Updated virus macrophage sample project: - + Refined "reset" and "data-cleanup" rules in Makefile - + Converted project to use the new XML-based microenvironment setup. - + Enabled gradient calculations (were previously off, although we wanted macrophage chemotaxis) - -+ Updated biorobots sample project: - + Refined "reset" and "data-cleanup" rules in Makefile. - + Converted project to use the new XML-based microenvironment setup. - + Note that values in user_parameters will override values in microenvironment_setup. - + Improved project to properly search for substrate indices instead of hard coding them. - -+ Updated cancer biorobots sample project: - + Refined "reset" rule in Makefile. - + Converted project to use the new XML-based microenvironment setup. - + Improved project to properly search for substrate indices instead of hard coding them. - -+ Refined "reset" and "data-cleanup" rules in default Makefile - -+ Created new function to access the (private) microenvironment dirichlet_activation_vector: - - double Microenvironment::get_substrate_dirichlet_activation( int substrate_index ); - -+ Updated the main microenvironment display function Microenvironment::display_information to summarize the initial and boundary conditions for each substrate - -+ Wrote two new functions to parse the XML in microenvironment_setup to add substrates and -options: - + bool setup_microenvironment_from_XML( pugi::xml_node root_node ) - + bool setup_microenvironment_from_XML( void ) -The second one assumes you already defined the root node and access the -global (pugi)xml node for it. - -+ The main XML parsing function now calls setup_microenvironment_from_XML(), just before processing user-defined parameters. - -### Beta features (not fully supported): - -+ anim_svg.py - now plots correctly sized cells; manually step via arrow keys - -+ anim_svg_cycle.py - same as above, but automatically cycles through .svg files - -### Bugfixes: - -+ None. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -**Version:** 1.5.2 - -**Release date:** 11 June 2019 - -## Release summary: - -This minor release fixes bugs that affected the release of internalized substrates at cell death on Linux and OSX operating systems, relating to system differences in order of evaluating destructor functions. The release of internalized substrates has been moved to a new function, and placed in cell death functions. There is no change in APIs or high-level usage / syntax for end users. - -Users should also consult the release notes for 1.5.0. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ None - -### Minor new features and changes: - -+ Introduced new function Basic_Agent::release_internalized_substrates() to explicitly release a cell's internalized substrates, rather assuming it can be properly done in the Basic_Agent destructor function. - -+ Removed the Basic_Agent destructor function to allow the compiler to automatically generate this. - -+ Very minor revisions to the release protocol. - -+ Minor updates to the user guide to reflect the release_internalized_substrates() function. - -### Beta features (not fully supported): - -+ anim_svg.py - now plots correctly sized cells; manually step via arrow keys - -+ anim_svg_cycle.py - same as above, but automatically cycles through .svg files - -### Bugfixes: - -+ Move code for internalized substrate release from the Basic_Agent destructor to the new Basic_Agent::release_internalized_substrates() function. - -+ Basic_Agent::release_internalized_substrates() is now called from delete_cell(int) in PhysiCell_cell.cpp. - -+ Basic_Agent::release_internalized_substrates() explicitly sets internalized_substrates to a zero vector, just in case users want to call this function on non-dead cells. - -+ Cell::Cell() now initializes updated_current_mechanics_voxel_index = 0 (avoids a possible segfault in GDB) - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.5.1 - -**Release date:** 7 June 2019 - -## Release summary: - -This minor release fixes bugs in the new virus-macrophage sample project. Users should also consult the reslease notes for 1.5.0. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ None - -### Minor new features and changes: - -+ None - -### Beta features (not fully supported): - -+ None - -### Bugfixes: - -+ In the virus-macrophage sample project, switch cell death (in epithelial_function) from apoptosis to cell_lysis to demonstrate the new function. - -+ In the virus-macrophage sample project, enable internalized substrate tracking in the setup_microenvironment() function. - -+ In the virus-macrophage sample project, use a slower viral replication rate. (Should take 240 minutes to reach the lysis threshold.) - -+ In the virus-macrophage sample project, switched to a maximum simulation time of 24 hours (1440 minutes). - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ improved plotting options in SVG - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.5.0 - -**Release date:** 7 June 2019 - -## Release summary: - -This release introduces the ability to track the net internalization of diffusible substrates from the microenvironment, conserving mass with the diffusion-reaction partial differentiatial equations in BioFVM. This is part of longer-term plans to support molecular-scale models (e.g., as encoded by SBML). It also introduces the ability for cells to ingest other cells (and acquire their internalized substrates and volume), the ability for cells to release their internalized substrates back to the microenvironment after death, and a new cell death model (lysis). - -To illustrate these new capabilities, this release introduces a new sample project called virus-macrophage-sample. In this project, virus particles diffuse through the microenvironment, are uptaken by cells, replicate within cells, and trigger lytic death after reaching a threshold. Lysed cells release their virus particles to further diffuse through the environment. Macrophages move by random migration, test for contact with cells, and ingest / phagocytose cells based upon their viral load. Macrophages degrade their internalized viral particles. - -This release also added clearer methods to specify the microenvironment initial conditions, and improved documentation. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ Added functionality in BioFVM to (optionally) track the total amount of substrates in each cell, based upon tracking uptake and secretion. Note that without additional, user-defined functions to internally create or consume substrate (e.g., synthesizing proteins, or using oxygen in metabolism), this can result in negative internal values (if cells only secrete but no internal creation functions have been set) or unbounded positive values (if cells uptake a substrate but do not consume it). In particular, Basic_Agents (and hence Cells) now have: -++ std::vector* internalized_substrates (tracks internalized substrates) -++ std::vector* fraction_released_at_death (sets the fraction of each substrate that is released at cell death) -++ std::vector* fraction_transferred_when_ingested (sets the fraction of each substrate that is transferred to a predatory cell if the cell is eaten). - -Users should access these via the cell's (new) molecular portion of the phenotype. See below. - -In BioFVM::Microenvironment_Options class, we added: -++ bool track_internalized_substrates_in_each_agent. Set this to true to enable the tracking. - -+ In BioFVM::Microenvironment_Options, we added the ability to set the (uniform) microenvironment initial conditions, via: -++ std::vector initial_condition_vector. - -If this has size zero, then BioFVM will use the std::vector Dirichlet_condition_vector as a reasonable guess at initial conditions as in prior versions. - -+ We added a new function to Basic_Agent (and hence Cell) to facilitate registering with the microenvironment: -++ void Basic_Agent::register_microenvironment( Microenvironment* microenvironment_in ) - -This function will ensure that the secretion, uptake, and internalization tracking data structures of the individual cell agent are properly matched to the microenvironment. - -+ Added new "Molecular" block to Phenotype, for storing internalized substrates and for eventual inclusion of molecular-scale models (via SBML). The major elements are: -++ std::vector internalized_substrates (tracks internalized substrates) -++ std::vector fraction_released_at_death (sets the fraction of each substrate that is released at cell death) -++ std::vector fraction_transferred_when_ingested (sets the fraction of each substrate that is transferred to a predatory cell if the cell is eaten). - -+ Added lyse_cell() to Cell, to allow a cell to immediately be lysed and potentially release its internalized substrates. Lysed cells are removed from the simulation. - -+ Added ingest_cell(Cell*) to Cell, to allow a cell to ingest (e.g., phagocytose) another cell, acquire its volume, and also (optionally) acquire its internalized substrates. This should be useful for immunology. - -### Minor new features and changes: - -+ Added void Microenvironment::update_dirichlet_node( int voxel_index , int substrate_index , double new_value ) based on pc4nanobio changes, which allows you to update a single substrate's dirichlet condition at specific voxel, rather than all of them. - -+ Added void sync_to_microenvironment( Microenvironment* pMicroenvironment ) to Phenotype to facilitate syncing the cell's phenotype to the microenvironment (and subsequently calls the functions in phenotype.secretion and phenotype.molecular). This isn't used yet, but perhaps it should be. - -### Beta features (not fully supported): - -+ None - -### Bugfixes: - -+ Updated BioFVM's operator<< on std::vector so that it doesn't output x="value", y="value", z = "value" for 3-D vectors. - -+ Fixed the search for cycle phase indices in the 2D and 3D template projects, to make sure it searches teh flow_cytometry_separated_cycle_model model and not the Ki67_advanced model, as part of the create_cell_types() function in the custom.cpp files. - -+ In PhysiCell_standard_models, standard_volume_update_function is now fixed to update phenotype.volume.fluid. (This was not used in any mechanics or other calculations, so it does not affect prior modeling results.) - -+ Removed repeated parameters (attached_worker_migration_bias, unattached_worker_migration_bias) in the cancer biorobots sample project. - -+ trigger_death() now works. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -+ We will introduce improvements to placement of daughter cells after division. - -+ 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. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.4.1 - -**Release date:** 2 October 2018 - -## Release summary: - -This release improves includes minor bug fixes for compiling in older versions of MinGW, and simplified XML MultiCellDS outputs that no longer record the relative pathing to .mat files. (This allows users to read data from their actual locations, rather than from a parent directory.) This release includes minor code cleanups in BioFVM for cleaner compiling in Ubuntu. Lastly, we have make small refinements to the sample projects and makefiles to default data saving to the ./output directory, and to prevent future releases from excluding the output directory from the zip releases. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ None - -### Minor new features and changes: - -+ Changed the MultiCellDS outputs to only store the filename, and not the full relative path, in the tags. This makes it simpler to load MultiCellDS outputs from matlab and other platforms. (No longer need to read from a directory higher up to make the relative pathing correct.) - -+ Did major cleanup on BioFVM so that it compiles cleanly on Ubuntu. - -+ All sample projects output to the ./output directory - -### Beta features (not fully supported): - -+ None - -### Bugfixes: - -+ Updated the Parameter constructor functions to create a specialized version for std::string, to fix odd compiling bugs on older versions of MinGW. (Worked in 7.1.0, but not in 5.3.0.) Now, Parameter for T = bool, int, or double get initialized to value = (T) 0. And Parameter for T = std::string gets initialized to "none". I had hoped to do a unified version, but value = (T) 0 for std::string acts like a NULL pointer. - -+ All Makefiles ensure that the reset and data-cleanup rules leave at least empty.txt in ./output, so that future releases are never missing the output directory. - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -+ We may change the role of operator() and operator[] in Custom_Variable to more closely mirror the functionality in Parameters. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. (Likely in next release.) - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -+ (optionally) track internalized substrate, coupled with BioFVM - -* * * - -# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems. - -**Version:** 1.4.0 - -**Release date:** 26 September 2018 - -## Release summary: - -This release improves the use of XML parsing in configuring simulations, notably (1) reading the domain parameters instead of hard-coded values, and (2) parsing a block in the XML config files to populate a global parameters data structure of Boolean, integer, double, and std::string variables. Users can efficiently query these from within any function anywhere in a PhysiCell project. - -**NOTE:** OSX users must now define PHYSICELL_CPP system variable. See the documentation. - -### Major new features and changes: - -+ User Parameters! - -+ Parsing XML to set domain size for all sample projects. - -### Minor new features and changes: - -+ Updated all the sample projects to use the improved XML parsing; - -+ New functions in PhysiCell_pugixml: - - 1) std::string xml_get_my_name( pugi::xml_node node ); - - This helps to easily extract the name of an XML node. (e.g., returns bob.) - - 2) bool xml_get_my_bool_value( pugi::xml_node node ); - - This gets the Boolean value of an XML node. (e.g., true returns true.) - - 3) int xml_get_my_int_value( pugi::xml_node node ); - - This gets the integer value of an XML node. (e.g., 42 returns 42.) - - 4) double xml_get_my_double_value( pugi::xml_node node ); - - This gets the double value of an XML node. (e.g., 42.03 returns 42.03.) - - 5) std::string xml_get_my_string_value( pugi::xml_node node ); - -+ Updated all Makefiles to copy main.cpp, the Makefile, and ./config/PhysiCell_settings.xml to backup copies prior to populating any sample project. - -+ Updated the heterogeneity sample project: - - 1) Use the domain settings from the XML config file - - 2) Use the XML config file options to set the initial tumor size and oncoprotein distribution. - - 3) Get the random seed from the XML config file. - - 4) Rewrote the custom coloring function to scale from min oncoprotein value (blue) to max oncoprotein value (yellow). - -+ Updated template2D sample project: - - 1) Use the domain settings from the XML config file - - 2) Use the XML config file to set the motile cell parameters - - 3) Get the random seed from the XML config file. - - 4) Updated to use the my_coloring_function coloring function. Made sure the my_coloring_function used false_cell_coloring_cytometry as its starting point. - -+ Updated template3D sample project: - - 1) Use the domain settings from the XML config file - - 2) Use the XML config file to set the motile cell parameters - - 3) Get the random seed from the XML config file. - - 4) Updated to use the my_coloring_function coloring function. Made sure the my_coloring_function used false_cell_coloring_cytometry as its starting point. - -+ Updated biorobots sample project: - - 1) Use the domain settings from the XML config file - - 2) Use the XML config file to set parameters and colors throughout the biorobots.cpp file - - 3) Get the random seed from the XML config file - -+ Updated cancer immune sample project: - - 1) Use the domain settings from the XML config file - - 2) Use the XML config file to set parameters throughout the cancer_immune_3D.cpp file - - 3) Get the random seed from the XML config file - -+ New function in ./core/PhysiCell_utilities: - - int choose_event( std::vector ); - - If probabilities is a vector of n probabilities (for n events), and the sum of the probabilities is 1, then this chooses one of those n events according to these probabilities and returns the index of the selected event. - -+ Moved from README.txt to README.md to support markdown and improve releases on both SourceForge and GitHub. - -+ Moved from changes.txt to changes.md to support markdown and improve releases on both SourceForge and GitHub. - -### Beta features (not fully supported): - -+ None - -### Bugfixes: - -+ Updated the "reset" rules so that the default config file is restored (in all the sample makefiles). - -+ Removed a cout from Mechanics::set_relative_equilibrium_distance() from ./core/PhysiCell_phenotype.* - -### Notices for intended changes that may affect backwards compatibility: - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the very near future. - -### Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. (Likely in next release.) - -+ Add cell differentiation functionality to Phenotype, to be executed during cell division events. - -+ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) - -+ Add module for standardized pharmacodynamics, as prototyped in the nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) - -* * * - -PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.3.3 -Release date: 16 September 2018 - -Release summary: - -This release introduces simplifications in versioning to facilitate -faster release cycles. It also introduces functions to register and -list citations for third-part add-ons. The goal is to encourage end- -users to properly cite PhysiCell and add-on products used in their -projects. - -NOTE: OSX users must now define PHYSICELL_CPP system variable. - See the documentation. - -Major new features and changes: - -+ none - -Minor new features and changes: - -+ Moved all version information to VERSION.txt to facilitate - faster release cycles. - -+ Updated all the Makefiles to set VERSION via - - VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) - -+ Moved detailed citation information to CITATION.txt to - facilitate faster release cycles. - -+ Changed std::string PhysiCell_version to - std::string PhysiCell_Version for more consistency with - prior BioFVM work. - -+ Added new static string to PhysiCell.h: - static std::string PhysiCell_DOI - -+ Added new functions to PhysiCell_utilities to query - PhysiCell versioning: - - std::string get_PhysiCell_version( void ); - - void get_PhysiCell_version( std::string& pString ); - -+ Added the following function to PhysiCell_utilities to - display a list of all software versions and citations - used in the code: - - void display_citations( std::ostream& os ); - void display_citations( void ); - - For example, use display_citations( std::cout ), or use - an output file stream. Note that display_citations(void) - calls display_citation(std::cout); - -+ Updated all the sample projects to use display_citations(); - -Beta features (not fully supported): - -+ Added ./protocols/ directory to include release and other - instructions, to help train new developer contributors. - Perhaps this should be called "checklists" ? - -+ Added the following functions to PhysiCell_utilities to - register third-party software citations in a global list, - ready for query and display: - - void add_software_citation( std::string name , - std::string version, std::string DOI, std::string URL ); - -Bugfixes: - -+ None - -Notices for intended changes that may affect backwards compatibility: - -+ We will probably move from README.txt to README.md to support - markdown and improve releases on both SourceForge and GitHub. - -+ We will probably move from changes.txt to changes.md to support - markdown in the long-term change logs. - -+ We intend to merge Custom_Variable and Custom_Vector_Variable in the - very near future. - -Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models - (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions - for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code - (See http://dx.doi.org/10.1093/bioinformatics/bty766. ) - -+ Develop contact-based cell-cell interactions. (Likely in next release.) - -+ Add a new standard phenotype function that uses mechanobiology, - where high pressure can arrest cycle progression. - (See https://twitter.com/MathCancer/status/1022555441518338048.) - (Likely in next release.) - -+ Add module for standardized pharmacodynamics, as prototyped in the - nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as - an optional standard module in ./modules (but not as a core component) - -======================================================================= - -PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.3.2 -Release date: 24 August 2018 - -Release summary: - -This release fixes a small gradient bug that I swear I had fixed before. - -NOTE: OSX users must now define PHYSICELL_CPP system variable. - See the documentation. - -Major new features and changes: - -+ none - -Minor new features and changes: - -+ none - -Beta features (not fully supported): - -+ none - -Bugfixes: - -+ In BioFVM, Microenvironment::compute_gradient_vector(int), removed "static" - from "static std::vector indices(3,0)" to prevent rare segfaults. - -+ In BioFVM, Microenvironment::compute_gradient_vector(int), replaced "static" - for "bool gradient_constants_defined = false". Yep, I removed static from - the wrong line in 1.3.1 - -+ Correct some errors in both the README.txt and changes.txt files. - -Notices for intended changes that may affect backwards compatibility: - -+ None. - -Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models - (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions - for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code - (See https://doi.org/10.1101/267070.) - -+ Develop contact-based cell-cell interactions. (Likely in next release.) - -+ Add a new standard phenotype function that uses mechanobiology, - where high pressure can arrest cycle progression. - (See https://twitter.com/MathCancer/status/1022555441518338048.) - (Likely in next release.) - -+ Add module for standardized pharmacodynamics, as prototyped in the - nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as - an optional standard module in ./modules (but not as a core component) - -======================================================================= - -PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.3.1 -Release date: 31 July 2018 - -Release summary: - -This release introduces a new cycle model with an active cycling -state and a quiescent state. It also adds new functions to the -Mechanics class to make it easier to modify the cell-cell interaction -distance (while maintaining equilibrium cell-cell spacing), or -to modify the equilibrium cell-cell spacing. The release also -includes major reliability and performance improvements to -how gradients are calculated. - -As usual, the release also contains minor bugfixes and -improvements. - -NOTE: OSX users must now define PHYSICELL_CPP system variable. - See the documentation. - -Major new features and changes: - -+ Implemented a new cell cycle model (cycling_quiescent), - where quiescent cells can enter a cycling state. This - model uses identical parameters to the Ki67-basic cycle - model, but decouples the conceptual model from Ki67 - immunohistochemistry. - - Updated the documentation and coloring functions accordingly. - - Updated update_cell_and_death_parameters_O2_based() to - support the new cycling_quiescent cycle model. - -+ update_all_cells(t,dt,dt,dt) now checks to see if gradient - calculations are enabled, and if so, computes it once per dt_mechanics. - - This improves code performance by 2x to 3x in gradient-enabled codes, - because we no longer need to calculate gradients once per dt_diffusion - time step. (Gradients are only needed for cell velocity calculations, - and occasionally for phenotype decisions.) - - All sample projects have been updated to make use of this. - - Also, removed the explicit gradient calculations from the template - and sample projects. - -+ Added a new function to Mechanics class to simplify changes to cell - interaction distances: - - void set_relative_maximum_adhesion_distance( double new_value ); - - Here, new_value is a multiple of the cell's (mean equivalent) radius. - Our default is 1.25. This function preserves the cell's "repulsion" - strength and adjusts the strength of cell-cell adhesion to maintain - its prior equilibrium cell-cell spacing. - -+ Added a new function to Mechanics class to simplify changes to cell - equilibrium distances. - - void set_relative_equilibrium_distance( double new_value ); - - Here, new_value is a multiple of the cell's (mean equivalent) radius. - The default is around 1.9. This function preserves the cell's "repulsion" - and the maximum interaction distance, and it adjusts the strength of - cell-cell adhesion to match the new equilibrium cell-cell spacing. - - Note that this function performs a "sanity check" to ensure that you have - not given a value greater than 2.0. - -+ Added a new function to Mechanics class to simplify changes to cell - equilibrium distances. - - void Mechanics::set_absolute_equilibrium_distance( Phenotype& phenotype, - double new_value ) - - Here, new_value is the new equilibrium spacing (in units of microns). - The function internally requires the cell's mean equivalent radius, - and so you pass the cell's phenotype (by reference) as an additional - argument. - - Note that this function performs a "sanity check" to ensure that you have - not given a value greater than 2.0 * mean_cell_radius. - - Also note that PhysiCell internally uses a relative spacing, so the - absolute spacing will change from the value you set, over time. - -+ Updated User_Guide to reflect new cell cycle model, - including reference parameters chosen for consistency with - the other cycle models. - -Minor new features and changes: - -+ Added the following constants to support the new cycle model - - static const int cycling = 17; - static const int quiescent = 18; - static const int cycling_quiescent_model = 7; - -+ Added new coloring function: false_cell_coloring_cycling_quiescent - -+ Removed the (never-used) Mechanics.maximum_adhesion_distance. - -+ Removed the legacy template_projects folder. - -Beta features (not fully supported): - -+ Added a function pointer to the Cell_Functions class for intended - contact-based cell-cell interaction, like delta-Notch signaling. - - void (*contact_function)(Cell* pMyself, Phenotype& my_phenotype, - Cell* pOther, Phenotype& other_phenotype, double dt ); - - It would be up to the user to define these functions and decide - if the functions modify pMyself, pOther, or both. For now, - the code will initialize the pointer to NULL and won't use it. - -+ Open to comments on handling cell-cell contact functions. Here's what - I have in mind: - - notation: cell i interacts with cell j with function f(i,j). - - Each cell agent can hold one contact-based interaction function f, - to be stored as a pointer in the cell's instance of the Cell_Functions - class. - - We use the containers (and their interaction testing structures) to - identify all interactions (i,j,f), and add it to a vector of interactions. - The interaction (i,j,f) is added to the list so long as (j,i,f) is not - already in the list, to avoid double-counting the interaction. - - The code will seek through the "container" interaction testing - data structure, probably at the cell mechanics time scale, and update / - recreate the vector of contact-based interactions (i,j,f). - - The code would likely go through the vector of interactions and - execute the codes once per dt_diffusion time step, since I would - imagine molecular biology (with faster time scales) is intended here. - - Since f(i,j) can potentially modify both cell i and cell j, it's probably - not thread-safe. So we'll probably need that in a non-parallel loop. - - We will probably add a new time scale for interactions, dt_interactions, - and update the interaction list on that time scale. - - For faster checking if (i,j,f) or (j,i,f) is already in the vector, - we'll probably want some sort of hash map in addition to the vector - of interactions. - - We'll probably implement this all in something like - PhysiCell_contact_interctions.*, and add a global enable/disable option. - I'd imagine we'd add code to the "update_all_cells" to keep this - as simple to the users as possible. - - We should probably update each cell's "neighbors" data structure at - when we're doing all this testing. - - In a longer-term update, we could leverage that for simpler interaction - testing during velocity updates. - -Bugfixes: - -+ Added missing "omp_set_num_threads(PhysiCell_settings.omp_num_threads)" - in the main-heterogeneity.cpp file for the heterogeneity sample project. - -+ In BioFVM, Microenvironment::compute_gradient_vector(int), removed "static" - from "static std::vector indices(3,0)" to prevent rare segfaults. - -+ Changed root above the comment lines in output files for - better Python parsing compatibility. Thanks, rheiland! - -+ MultiCellDS outputs used size 3 for all custom vector variables, instead - of actual size. Fixed to read the size from the vector. - -+ Fixed the ostream operator for Vector_Variable to correctly output all - the vector.value elements, rather than the original hard-coded output - of 3 elements regardless of size. - -Notices for intended changes that may affect backwards compatibility: - -+ None - -Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models - (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions - for molecular-scale modeling - -+ integrate Boolean network support from PhysiBoSS into the mainline code - (See https://doi.org/10.1101/267070.) - -+ Develop contact-based cell-cell interactions. (Likely in next release.) - -+ Add a new standard phenotype function that uses mechanobiology, - where high pressure can arrest cycle progression. - (See https://twitter.com/MathCancer/status/1022555441518338048.) - (Likely in next release.) - -+ Add module for standardized pharmacodynamics, as prototyped in the - nanobio project. (See https://nanohub.org/resources/pc4nanobio.) - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as - an optional standard module in ./modules (but not as a core component) - -======================================================================= - -PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.3.0 -Release date: 23 February 2018 - -Overview: -PhysiCell is a flexible open source framework for building -agent-based multicellular models in 3-D tissue environments. - -Reference: A Ghaffarizadeh, R Heiland, SH Friedman, - SM Mumenthaler, and P Macklin, PhysiCell: an Open Source - Physics-Based Cell Simulator for Multicellular Systems, - PLoS Comput. Biol. 14(2): e1005991, 2018. - DOI: 10.1371/journal.pcbi.1005991 - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -Release summary: -This release introduces two new cell cycle models (G0/G1 -> -S -> G2/M) and (G0/G1 -> S -> G2 -> M), introduces XML-based -configuration files, and allows new user control on how -often and where data are stored. - -As usual, the release also contains minor bugfixes and -improvements. - -NOTE: OSX users must now define PHYSICELL_CPP system variable. - See the documentation. - -Major new features and changes: -+ implemented new cell cycle models: - - flow_cytometry_cycle_model: G0/G1 -> S -> G2/M - flow_cytometry_separated_cycle_model: G0/G1 -> S -> G2 -> M - - along with documentation and updated coloring functions - -+ The oxygen-based phenotype models now support the new cycle - model. - -+ Added XML file parsing for use in settings files. - -+ XML configuration file (in ./config/PhysiCell_settings.xml) - sets data destination (as a subfolder) and save - frequency. Legacy saves are now off by default. - -+ Users can select a different XML file at command line - - ./project_name settings_file.xml - - (Assuming you preserved the structure of the template - projects.) - -+ Updated User_Guide to reflect new XML parsing capabilities. - -+ Updated User_Guide to reflect new cell cycle models, - including reference parameters chosen for consistency with - the other cycle models. - -Minor new features and changes: -+ Added PhysiCell_pugixml.* for easier extraction of parameter - arguments from XML files - -+ Added PhysiCell_settings.* to include parsing of XML parameter - files, and parameter values stored in a unified data structure. - -+ Added parsing of settings file to separately set frequency of - saving full output (MultiCellDS), SVG outputs, and "legacy" - outputs from USC era. - -+ Added options to specify the folder of saved data. - -+ Added option to read the number of OMP threads from a setting file. - -+ Added "beta" directory where we will put new features that are still - undergoing testing - -+ Minor updates to the Quickstart guide. - -+ Added new function: to display the simulation status: - - void display_simulation_status( std::ostream& os ); - - e.g., display_simulation_status( std::cout ); - -+ writePov() uses a user-specified output folder. - -+ log_output() uses a user-specified output folder. - -+ added "beta-testing" sample project. Populate it by the rule: - make beta-testing - -+ added flow_cytometry_separated_cycle_model to the PhysiCell constants. - -+ added G1pm_phase and G1ps_phase to the PhysiCell constants. - -+ Added new coloring function: false_cell_coloring_cytometry - -+ added support for the new cytometry cycle models to the oxygen-based - phenotype model (update_cell_and_death_parameters_O2_based) - -+ updated user manual to reflect new cytometry models - -+ updated template2D and template3D projects to use to use the - new cytometry models and coloring schemes. Also reduced to - 1 mm x 1 mm (2D) and 1 mm^3 (3D) for faster demos. - -+ removed archives directory - -Beta features (not fully supported): - -+ XML functions moved from beta to production. - -Bugfixes: - -+ Changed instances of uniform_random() (from BioFVM) to - UniformRandom() (from PhysiCell) so that all calls to the PRNG - used the same random seed and same PRNG. Thanks, olliemcdonald! - -+ Fixed typo in "Dirichlet" in user documentation. Thanks, luissv7! - -+ Removed .git directory that was accidentally included in releases - -+ Updated PhysiCell_MultiCellDS.cpp - (add_PhysiCell_cells_to_open_xml_pugi) so that we exit(-1) with a - meaningful error message if we cannot open a matlab subfile - for writing. - -+ Updated PhysiCell_pathology.cpp (SVG_plot) so that we exit(-1) - with a meaningful error message if we cannot open an SVG file - for writing. - -Notices for intended changes that may affect backwards compatibility: - -+ template_projects folder will be removed - -Planned future improvements: - -+ Further XML-based simulation setup. - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models - (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions - for molecular-scale modeling - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as - an optional standard module in ./modules (but not as a core component) - -======================================================================= - -PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.2.2 -Release date: 4 November 2017 - -Overview: -PhysiCell is a flexible open source framework for building -agent-based multicellular models in 3-D tissue environments. - -Reference: Ghaffarizadeh et al., PLoS Comput Biol (2017) - preprint URL: https://doi.org/10.1101/088773 - -Visit http://MathCancer.org/blog for the latest tutorials and help. - -Key makefile rules: - -make : compiles the current project. If no - project has been defined, it first - populates the cancer heterogeneity 2D - sample project and compiles it - -make : populates the indicated sample project. - Use "make" to compile it. - - choices: - template2D - template3D - biorobots-sample - cancer-biorobots-sample - heterogeneity-sample - cancer-immune-sample - -make clean : removes all .o files and the executable, so that - the next "make" recompiles the entire project - -make data-cleanup : clears out all simulation data - -make reset : de-populates the sample project and returns to - the original PhysiCell state. Use this when - switching to a new PhysiCell sample project. - - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net -Support: https://sourceforge.net/p/physicell/tickets/ - -Quick Start: Look at QuickStart.pdf in the documentation folder. -User Guide: Look at UserGuide.pdf in the documentation folder. - -Tutorials: http://www.mathcancer.org/blog/physicell-tutorials/ - -Latest info: follow @MathCancer on Twitter (http://twitter.com/MathCancer) - -See changes.txt for the full change log. - -Release summary: -This release reduces the complexity of Makefiles (especially for -OSX users), restructures the 2D and 3D project templates as -sample projects, fixes a minor bug in SVG pathology outputs, -improves copying of Cell_Definitions, and fixes minor bugs in -BioFVM (primarily related to Dirichlet conditions). - -NOTE: OSX users must now define PHYSICELL_CPP system variable. - See the documentation. - -PhysiCell is currently under scientific peer review. - -Major new features and changes: -+ none - -Minor new features and changes: -+ Restructured the 2D template project to have the same structure as a - typical project, with setup functions related functions in - ./custom_modules/*, etc. Moved it to ./sample_projects/template2D/ - ./template_projects/ will be deprecated. - - To populate this project, use: - - make template2D - - To compile: - - make - - To de-populate the sample project and return to the "clean"PhysiCell state: - - make reset - make clean (to remove object files) - -+ Restructured the 3D template project to have the same structure as a - typical project, with setup functions related functions in - ./custom_modules/*, etc. Moved it to ./sample_projects/template3D/ - ./template_projects/ will be deprecated. - - To populate this project, use: - - make template3D - - To compile: - - make - - To de-populate the sample project and return to the "clean"PhysiCell state: - - make reset - make clean (to remove object files) - -+ Simplified Makefiles: populating a sample project and compiling it - - make - - To compile: - - make - - To reset to original state: - - make reset - - Current values: - template2D - template3D - biorobots-sample - cancer-biorobots-sample - heterogeneity-sample - cancer-immune-sample - -+ Simplified Makefiles: Makefiles check for system variable - PHYSICELL_CPP to set the compiler (CC). OSX users must set - this environment variables. See the online tutorials and the - user guide. - -+ Simplified Makefiles: "make data-cleanup" removes .svg, .mat, .xml, and - data inside ./data - -+ Updated documentation on how to add new substrates. - -+ Updated documentation on applying Dirichlet conditions to only - specific substrates. - -+ Added new function to copy the properties of a Cell Definition to - the cell. - - void Cell::convert_to_cell_definition( Cell_Definition& cd ) - -Bugfixes: - -+ Fixed a small error in SVG plots, where tissues were flipped with - y was vertically flipped. - -+ Used register_microenvironment(Microenvironment*) to improve - compatibiltiy with other operating systems and compilers. - -+ Added copy constructor and copy assignnment functions to the - Cell_Definition is. - -+ Removed the unnecessary "wha???" from BioFVM_microenvironment.cpp. - -+ Updated Dirichlet_condition_vector = ones (instead of zeros) in - Microenvironment_Options::Microenvironment_Options() default - constructor. - -+ Microenvironment::resize_densities( int new_size ) no longer - overwrites previous dirichlet values when extending the size. - -+ No longer overwrites existing Dirichlet_condition_vector elements - or set default_microenvironment_options.use_oxygen_as_first_field - to false. - -+ Microenvironment::set_density(int,std::string,std::string) and - Microenvironment::set_density(int,std::string,std::string,double,double) - were modified to be compatibility. - -+ Only set default_microenvironment_options.use_oxygen_as_first_field = false - if index = 0, when samplign the oxygen. - -+ Updated save_PhysiCell_to_MultiCellDS_xml_pugi() to save much more - phenotype information and all custom variables for each cell. - -+ Updated read_MultiCellDS_XML.m (in ./matlab) to read these - newly expanded data files. - -+ Includes a sneak preview of BioFVM 1.1.7, which includes bugfixes - mentioned above. - -Notices for intended changes that may affect backwards compatibility: - -+ None at this time - -Planned future improvements: - -+ parse XML configuration files - -+ read saved simulation states (as MultiCellDS digital snapshots) - -+ "mainline" prototype cell attach/detach mechanics as standard models - (currently in the biorobots and immune examples) - -+ integrate SBML-encoded systems of ODEs as custom data and functions - for molecular-scale modeling - -+ create an angiogenesis sample project - -+ create a small library of angiogenesis and vascularization codes as - an optional standard module in ./modules (but not as a core component) - -======================================================================= - -PhysiCell: PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.2.1 -Release date: 1 September 2017 - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -This release introduces a improved MultiCellDS outputs, new matlab -functions to read the MultiCellDS outputs, experimental functions -for povray routines (for 3-D raytracing), some bugfixes, and -new sample projects in cancer heterogeneity, synthetic multicellular -bioengineering, and cancer immunology. - -PhysiCell is currently under scientific peer review. - -Major new features and changes: -+ Updated save_PhysiCell_to_MultiCellDS_xml_pugi() to save much more - phenotype information and all custom variables for each cell. - -+ Updated read_MultiCellDS_XML.m (in ./matlab) to read these - newly expanded data files. - -+ Included new matlab functions for fast 3-D data exploration: - - simple_plot.m -- quickly plots (as a surface) all the cells - simple_cutaway_plot.m -- same as above, but with a cutaway view - composite_cutaway_plot.m -- plots cutaway view of live and dead - cells, colored separately. - -+ Wrote new POV-ray functions for future raytracing utilities. See - ./modules/PhysiCell_POV.* - -+ Add the following new sample projects: - - biorobots: simulates a system of director, worker, and cargo - cells that coordinate to deliver cellular cargo to the - directors. Uses motility, custom mechanics, and other functions. - - build via: make biorobots-sample && make project - - cancer biorobots: modifies the above project so that worker - cells take cargo to hypoxic tumor regions. cargo cells - release a drug once they are detached from worker cells. - tumor cells have a damage and apoptosis model. - - build via: make cancer-biorobots-sample && make project - - heterogeneity: simulates proliferation of a heterogeneous - tumor. Note the loss of symmetry and selection/evolution. - - build via: make heterogeneity-sample && make project - - cancer immunology: simulates an immune system attack on a - tumor with heterogeneous proliferation and immunogenicity - characteristics. In 3D! - - build via: make cancer-immune-sample && make project - -Minor new features and changes: - -+ Added double NormalRandom( double mean, double standard_deviation ) - to PhysiCell_utilities.* This will generate normally-distributed - random numbers. - -+ Includes a sneak preview of BioFVM 1.1.7, which includes bugfixes on - how boundary conditions were initialized. - -bugfixes: - -+ Removed annoying "cout" lines in: - - void standard_live_phase_entry_function(Cell*,Phenotype&,double). - - They were leftover from debugging. Sorry! - -+ In the templates, we updated to: - - while( t < t_max + 0.1*diffusion_dt ) - { - - so that the simulations run all the way to the final time, - instead of exiting too early by dt time. - -+ Fixed a bug in Motility::Motility() where the migration bias was - initialized to (1,0,0). - -+ Made adhesion and repulsion symmetric across cells (in add_potentials) - -+ got rid of debug_temp_a in (in add_potentials) - -+ if default_microenvironment_options.simulate_2D == true, we now - set velocity[2] = 0.0 in the velocity functions. - -======================================================================= - -Version: 1.2.0 -Release date: 30 July 2017 - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -This release introduces a major reworking to simplify cell pheno- -types and cells. It includes a generalized cell cycle model that -can also be used to represent death cycle models. It includes an -improved motility representation. Changing cell secretion and -uptake rates is more straightforward, because all interfacing -with BioFVM is automated. - -A new, comprehensive user guide is included on all the major -functions and classes in PhysiCell, including examples. - -This release also includes bugfixes and corrections. Due -to the extensive redevelopment, this change log is not 100% -fine-grained. - -PhysiCell is currently under scientific peer review. - -Major new features and changes: -+ Completely reworked the Phenoytype class to be much more - straightforward, and safe to change throughout the - simulation. - -+ The Phenotype class includes elements on cell cycling, death, - volume, geometry, mechanics, motility, and secretion (and uptake). - -+ Completely reworked representation of cell cycle models as - Cycle_Model: a directed graph of Phases, linked by Phase_Links. - A Cycle_Model is bundled with key parameters (Cycle_Data) into - the Cycle element of the Phenotype. - -+ Cycle models can include user-specified arrest functions between - Phases (e.g., contact inhibition). - -+ Cycle Phases can have user-specified "entry" and "exit" functions - to be executed upon entering or leaving a Phase (e.g., mutations). - -+ Created new classes Death_Parameters and Death to represent - cell death models as Cycle_Model. - -+ Updated the classes for Mechanics, Volume, and Geometry. - -+ Completely reworked the Motility class to represent cell - migration as a combination of random and directed motility. - Notions of persistence time are included. Users can supply - custom functions to update the cell's migration bias. - -+ Added the cell calcification model to the general volume update - function. - -+ Deprecated all code in core/PhysiCell_digital_cell_line.* - -+ Added apoptosis_death_model, necrosis_death_model, - autophagy_death_model, and live_cells_cycle_model to - PhysiCell_Constants. - -+ Added new function Cell::flag_for_division() for simpler - construction of cycle models, and to allow users to push a cell - to divide at any time. - -+ Added new function Cell::flag_for_removal() for simpler - construction of cycle models, and to allow users to push a cell - to be removed at any time. - -+ Volume::multiply_by_ratio() now also divides the target volumes by - this ratio. - -+ Created a new Cell_Functions class to more readily bundle the - Cell object's function pointers. - -+ Rewrote the Custom_Cell_Data class, so that custom data are no - longer hard-coded by the user in the class, but instead added - during runtime. Moved PhysiCell_custom.h/cpp into the core - directory. - -+ The Cell_Definition class includes a pointer to the default - Microenvironment, as well as a default Cell_Functions, - Cell_Parameters, Custom_Cell_Data, and Phenotype. Newly created - cells all copy from the Cell_Defaults. - -+ Bundled the following phenotype update functions into a single - Phenotype::advance_all_nonmechanics_models( Cell* , double ) - function: - Phenotype::update_function() // update cell phenotype parameters - Phenotype::volume.update() // update cell volume - Phenotype::geometry.update() // update radius, etc. - Phenotype::death.check_for_death() // check for death - Phenotype::cycle.advance_cycle() // advance the current cycle model - -+ PhysiCell_Container uses the above function on each cell to - ensure that the correct custom functions are used. It also uses - the cell's Cell::Cell_Functions::update_velocity() to update - the cell's state. For now, users need to remember to include - the motility update functions in their update_velocity() function - if they replace the default. Lastly, PhysiCell_Container calls teh - Cell::Cell_Functions::custom_cell_rule at the end of the main loop. - -+ Created new functions to directly trigger cell death. - -+ Created new functions to access cell neighbor information. - -+ Updated the examples for compatibility. - -Minor new features and changes: -+ Added PhysiCell_constants::custom_phase to the constants. - -+ Changed Cell:is_movable to Cell_is_movable to better express its - purpose of setting a cell to rigid (unmovable) or movable. - -+ Fixed Cell:turn_off_reactions(double) to completely turn off all - BioFVM uptake/secretion, rather than cut them by an order of - magnitude. - -+ Replaced scores of (if some_double == 0) conditionals with - if( fabs( some_double ) < tolerance ), since you it is best practice - to never check for equality of a floating point or double. - -+ Started substituting more efficient axpy and += operators - (from BioFVM) for many of the vector operations in PhysiCell_cell.cpp. - -+ Where possible, inserted { } into if / then / else logic for - increased code clarity and robustness to newline and whitespace - changes. - -+ Moved most default / standard mechanics functions from PhysiCell_cell.* to - PhysiCell_standard_models.*. - -+ Added constants for time step sizes, time units, and spatial units to - PhysiCell_constants.h, and removed isolated (and sometimes non- - synchronized) timestep constants throughout the code. - -+ Added State::simple_pressure for future use in mechanics-induced cycle - regulation. - -+ Added std::vector& Cell:cells_in_my_container(void) to more - easily access a list of cells in the cell's current mechanics voxel. - -+ and more. - -+ Simplified the Makefile for easier cross-platform compiling. Users - do not need to change MARCH any more. - -Bugfixes and Corrections: - -+ Fixed typo "max_cell_interactive_ditstance_in_voxel" to - "max_cell_interactive_ditstance_in_voxel" in the Cell_Container class. - -+ Throughout the code, replaced any logic of the form - (if some_double == some_other_double ) with better practice of - if( fabs( some_double - some_other_double ) < tolerance ), since - floating point numbers aren't often equal. - -+ In PhysiCell_cell_container, the function find_escaping_face_index() - had a return type of int, but it was possible for none of the statements - to evaulate "true". The function now returns -1 for the case that - there is no escaping_face_index. Thus, the return type is always defined. - -+ Cell::assign_position() now sets: - is_out_of_domain = true; - is_active = false; - is_movable = false; - if the cell is out of bounds. This should prevent segfaults when cells - are assigned positions out of bounds (e.g., during division). - -+ Cell::update_position() now sets: - is_out_of_domain = true; - is_active = false; - is_movable = false; - if the cell moves out of bounds. This should prevent segfaults when cells - move out of bounds (e.g., by mechanics). - -======================================================================= - -Version: 1.1.1 -Release date: 16 May 2017 - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -This release includes usability fixes and enhancements, including -more basic "template" projects, simpler project startup, improved SVG -visualization support, and cleanup on the Makefile. - -PhysiCell is currently under scientific peer review. - -Major new features and changes: -+ Added template3D.cpp and template2D.cpp template projects. See the - template_projects directory. - -+ Added Makefile rules to seed the 2D projects. To create and compile - the 2D template: - make template2D && make - To create and compile the 3D template: - make template3D && make - - To further edit your project, modify main.cpp in the root PhysiCell - directory. Follow the online tutorials for further functionality. - -+ Added preliminary MultiCellDS support, with MultiCellDS outputs. These - are added via modules/PhysiCell_MultiCellDS.cpp - -+ Many usability improvements listed in "minor new features" below. - -+ Finished implementation of SVG support, to plot the simulation through a - cross-section (fixed z-value). - -+ Digital pathology: Improved coloring functions for the main cell cycle - models, and virtual H&E (hematoxylin and eosin): - -Minor new features and changes: -+ Created new function in PhysiCell_cell_container to simplify initialization - of the mechanics data structures: - - Cell_Container* create_cell_container_for_microenvironment( - BioFVM::Microenvironment& m , double mechanics_voxel_size ); - -+ Usability feature: If BioFVM::default_microenvironment has not yet been - declared when calling create_cell_container_for_microenvironment(), then - it is set to "m" in the new function above. - -+ Usability feature: If the BioFVM::default_microenvironment has been set - then Cell* create_cell( void ) now uses this to call - Cell::register_microenvironment(µenvironment). - -+ Changed Cell_Parameters from a struct to a class. - -+ Usability feature: Created a new Cell_Defaults class, with a - global PhysiCell::cell_defaults. Now, you can set these - default functions and parameters at the start of your program, and - all new cells are set to use these defaults. - -+ Usability feature: Traced code and determined that calling Cell::set_phenotype() - calls Basic_Agent::set_total_volume() (Cell extends Basic_Agent), which sets - Basic_Agent::volume_is_changed to true. This, in turn, makes the next call - to Basic_Agent::simulate_secretion_and_uptake() call - Basic_Agent::set_internal_uptake_constants(). So, it is unnecessary to - call this function in typical initialization. - -+ Usability feature: Cell:set_phenotype() now automatically calls - Basic_Agent::set_internal_uptake_constants(). You no longer need to - manually call this function *if* using the set_phenotype() function. - -+ Usability feature: The default Cell constructor (Cell::Cell) uses - the default functions in PhysiCell::default_cell_functions, instead - of hard-coded defaults. The default constructor for Default_Cell_Functions - has sensible defaults for cell mechanics and volume regulation to - match the PhysiCell method paper. Phenotype-related functions are left - empty. - -+ Usability feature: The create_cell() function now assigns the default - microenvironment to the newly created cell, and assigns the - cell functions in PhysiCell::default_cell_functions. - -+ Changed default -march flag to -march=native, according to benchmarks - on gcc 5x at phoronix: - http://www.phoronix.com/scan.php?page=news_item&px=GCC-Optimizations-E3V5-Levels - -+ Changed the -O3 flag to -Ofast, which tends to produce slightly faster - code by the phoronix link above. - -+ Updated to a pre-release copy of BioFVM 1.1.6. - -+ Included the matlab functions first created for BioFVM, which can now be - found in the matlab directory. - -+ Fixed read_MultiCellDS_xml.m function to work when there are no cells. - -+ Fixed read_MultiCellDS_xml.m function to display the current number of - cells, when there are < 3 cells. - -+ Added modules/PhysiCell_standard_modules.h to start organizing non-core, - standard parts of MultiCellDS. This will inintially include SVG, - pathology, and MultiCellDS modules. - -+ Removed matlab output from log_output in PhysiCell_utilities.cpp. This - only saved the microenvironment (but not cells), and it is no longer - needed with new MultiCellDS output support. - -+ Changed the default SVG length scale bar in PhysiCell_pathology to - 100 microns (previously 1000 microns). - -+ Updated the archive rules to use the more-common "tar" command. Use - "make tar" and "make untar". Archives are stored in the archives - directory. - -+ Added a void up_orientation( Cell* pCell, double dt ) to - PhysiCell_standard_models.cpp, which sets orientation = [0,0,1] - and polarity = 1.0. This is useful for 2-D simulations. - -+ Digital Pathology coloring functions: - simple_cell_coloring: cell nucleus is blue, cytoplasm is red, and - outlines are black - - false_cell_coloring_Ki67: for any Ki67-based cell cycle model, - green cells are Ki67+ prior to mitosis (or any Ki67+ cell in - the simplified Ki67 models), magenta cells are Ki67+ after - mitosis, red cells are apoptotic, and brown cells are necrotic. - - hematoxylin_and_eosin_cell_coloring: "stains" nuclear solids with - hematoxylin, "stains" cytoplasmic solids with eosin, and simulates - light transmission / absorbtion through a thin slice to approximate - microscopy and image acquisition. Note that cells with little water - will appear dark (e.g., apoptotic debris, especially after the - cytoplasm has blebbed), and cells with lots of water (e.g., onsosis - in early necrotic cells) will appear faint. - - false_cell_coloring_live_dead: live cells are green, apoptotic cells - are red, and necrotic cells are brown. - -+ Added Phenotype::get_current_phase_code(void) to - PhysiCell_digital_cell_line.cpp to more easily get the cell's current - phenotypic state. (Especially useful for virtual pathology.) - -Bugfixes and Corrections: -+ Fixed typo Time_Settings.cell_cylce_dt_default to - Time_Settings.cell_cycle_dt_default in PhysiCell_cell_container. - -+ Removed unused declaration Cell::initialize_functions( void ); - -+ Changed the default "update_cell_and_death_parameters" function from - "update_cell_and_death_parameters_O2_based" to "empty_function". - Examples and models should choose this *explicitly*. - -+ Cell::set_orientation( Cell* pCell ) changed to - Cell::set_orientation( Cell* pCell, double dt ) to be consistent with other - cell member functions. - -+ In void Cell::assign_orientation(), set polarity = 0.0 if a - set_orientation(Cell*,double) function is not set (NULL). - -+ Removed irrelevant data elements in the Custom_Cell_Data class. - -Notices for intended changes that may affect backwards compatibility: - -+ Will rename the current "Phenotype" class to "Old_Phenotype" - -+ Will introduce a new Phenotype class with a much simpler structure. - -+ Will rewrite the represetation of cell cycle and death phases. - -+ Will rewrite the standard phenotype models in the simpler representatio. - -+ Will stop requiring use of the Digital_Cell_Line class for initializing - simulations. - -+ Will deprecate update_cell_and_death_parameters, and instead use - update_phenotype_parameters. - -+ Will stop using the oxygen-dependent phenotype rule as default. - -PhysiCell 1.1.1 includes an advance copy of BioFVM 1.1.6. Here are the changes: - -/* fixes and changes in BioFVM 1.1.6 */ - -+ correct typos in citation information in all source files - -+ updated citation information - -+ added void set_default_microenvironment( Microenvironment* M ) declaration to - BioFVM_Microenvironment.h - -+ set volume_is_changed = false in Basic_Agent::set_internal_uptake_constants(); - -+ Set the MultiCellDS options Booleans to extern bool in BioFVM_MultiCellDS.h - so that PhysiCell can read these options. - -+ Updated the simlified_data field in MultiCellDS XML output to include a - new "source" attribute with value "BioFVM". - -+ Added Microenvironment::find_substrate_index( std::string ) to make it - easier to find . - -+ Added Basic_Agent::nearest_gradient( int substrate_index ) to directly - access the gradient of the indicated substrate at the agent's - current_voxel_index. - -+ Added Basic_Agent::nearest_gradient_vector( void ) to directly - access a vector of gradients (one for each substrate in the - microenvironment) at the agent's current_voxel_index. - -+ Added Microenvironment::is_dirichlet_node( int voxel_index ) to - easily check if the voxel is a Dirichlet node. - -+ Updated Microenvironment::update_dirichlet_node() and - Microenvironment::remove_dirichlet_node() to check against - mesh.voxels[].is_Dirichlet to provide a cheap and early exit - if the node isn't Dirichlet in the first place. - -+ Changed to a thread-safe data structure for Dirichlet nodes - (e.g., if a custom cell function in an OMP loop adds or removes - Dirichlet nodes). - -+ Added new class Microenvironment_Options, with a default - default_microenvironment_options, to simplify Microenvironment - setup. The defaults are dx = dy = dz = 20 microns, on 1 cubic mm. - -+ Added function initialize_microenvironment() to set up the - microenvironment using the options in - default_microenvironment_options. The code sets oxygen as the - default field, with D = 1e5 micron^2/min, and decay rate = 0.1 1/min - (a 1 mm diffusion length scale). If - default_microenvironment_options.outer_Dirichlet_conditions = true, - then we set a 38 mmHg condition on the outer edges, corresponding to - 5% oxygenation (physioxic conditions). - -======================================================================= - -PhysiCell: PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.1.0 -Release date: 16 May 2017 - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -This release includes usability fixes and enhancements, including -more basic "template" projects, simpler project startup, improved SVG -visualization support, and cleanup on the Makefile. - -PhysiCell is currently under scientific peer review. - -Major new features and changes: -+ Added template3D.cpp and template2D.cpp template projects. See the - template_projects directory. - -+ Added Makefile rules to seed the 2D projects. To create and compile - the 2D template: - make template2D && make - To create and compile the 3D template: - make template3D && make - - To further edit your project, modify main.cpp in the root PhysiCell - directory. Follow the online tutorials for further functionality. - -+ Added preliminary MultiCellDS support, with MultiCellDS outputs. These - are added via modules/PhysiCell_MultiCellDS.cpp - -+ Many usability improvements listed in "minor new features" below. - -+ Finished implementation of SVG support, to plot the simulation through a - cross-section (fixed z-value). - -+ Digital pathology: Improved coloring functions for the main cell cycle - models, and virtual H&E (hematoxylin and eosin): - -Minor new features and changes: -+ Created new function in PhysiCell_cell_container to simplify initialization - of the mechanics data structures: - - Cell_Container* create_cell_container_for_microenvironment( - BioFVM::Microenvironment& m , double mechanics_voxel_size ); - -+ Usability feature: If BioFVM::default_microenvironment has not yet been - declared when calling create_cell_container_for_microenvironment(), then - it is set to "m" in the new function above. - -+ Usability feature: If the BioFVM::default_microenvironment has been set - then Cell* create_cell( void ) now uses this to call - Cell::register_microenvironment(µenvironment). - -+ Changed Cell_Parameters from a struct to a class. - -+ Usability feature: Created a new Cell_Defaults class, with a - global PhysiCell::cell_defaults. Now, you can set these - default functions and parameters at the start of your program, and - all new cells are set to use these defaults. - -+ Usability feature: Traced code and determined that calling Cell::set_phenotype() - calls Basic_Agent::set_total_volume() (Cell extends Basic_Agent), which sets - Basic_Agent::volume_is_changed to true. This, in turn, makes the next call - to Basic_Agent::simulate_secretion_and_uptake() call - Basic_Agent::set_internal_uptake_constants(). So, it is unnecessary to - call this function in typical initialization. - -+ Usability feature: Cell:set_phenotype() now automatically calls - Basic_Agent::set_internal_uptake_constants(). You no longer need to - manually call this function *if* using the set_phenotype() function. - -+ Usability feature: The default Cell constructor (Cell::Cell) uses - the default functions in PhysiCell::default_cell_functions, instead - of hard-coded defaults. The default constructor for Default_Cell_Functions - has sensible defaults for cell mechanics and volume regulation to - match the PhysiCell method paper. Phenotype-related functions are left - empty. - -+ Usability feature: The create_cell() function now assigns the default - microenvironment to the newly created cell, and assigns the - cell functions in PhysiCell::default_cell_functions. - -+ Changed default -march flag to -march=native, according to benchmarks - on gcc 5x at phoronix: - http://www.phoronix.com/scan.php?page=news_item&px=GCC-Optimizations-E3V5-Levels - -+ Changed the -O3 flag to -Ofast, which tends to produce slightly faster - code by the phoronix link above. - -+ Updated to a pre-release copy of BioFVM 1.1.5. - -+ Included the matlab functions first created for BioFVM, which can now be - found in the matlab directory. - -+ Fixed read_MultiCellDS_xml.m function to work when there are no cells. - -+ Fixed read_MultiCellDS_xml.m function to display the current number of - cells, when there are < 3 cells. - -+ Added modules/PhysiCell_standard_modules.h to start organizing non-core, - standard parts of MultiCellDS. This will inintially include SVG, - pathology, and MultiCellDS modules. - -+ Removed matlab output from log_output in PhysiCell_utilities.cpp. This - only saved the microenvironment (but not cells), and it is no longer - needed with new MultiCellDS output support. - -+ Changed the default SVG length scale bar in PhysiCell_pathology to - 100 microns (previously 1000 microns). - -+ Updated the archive rules to use the more-common "tar" command. Use - "make tar" and "make untar". Archives are stored in the archives - directory. - -+ Added a void up_orientation( Cell* pCell, double dt ) to - PhysiCell_standard_models.cpp, which sets orientation = [0,0,1] - and polarity = 1.0. This is useful for 2-D simulations. - -+ Digital Pathology coloring functions: - simple_cell_coloring: cell nucleus is blue, cytoplasm is red, and - outlines are black - - false_cell_coloring_Ki67: for any Ki67-based cell cycle model, - green cells are Ki67+ prior to mitosis (or any Ki67+ cell in - the simplified Ki67 models), magenta cells are Ki67+ after - mitosis, red cells are apoptotic, and brown cells are necrotic. - - hematoxylin_and_eosin_cell_coloring: "stains" nuclear solids with - hematoxylin, "stains" cytoplasmic solids with eosin, and simulates - light transmission / absorbtion through a thin slice to approximate - microscopy and image acquisition. Note that cells with little water - will appear dark (e.g., apoptotic debris, especially after the - cytoplasm has blebbed), and cells with lots of water (e.g., onsosis - in early necrotic cells) will appear faint. - - false_cell_coloring_live_dead: live cells are green, apoptotic cells - are red, and necrotic cells are brown. - -+ Added Phenotype::get_current_phase_code(void) to - PhysiCell_digital_cell_line.cpp to more easily get the cell's current - phenotypic state. (Especially useful for virtual pathology.) - -Bugfixes and Corrections: -+ Fixed typo Time_Settings.cell_cylce_dt_default to - Time_Settings.cell_cycle_dt_default in PhysiCell_cell_container. - -+ Removed unused declaration Cell::initialize_functions( void ); - -+ Changed the default "update_cell_and_death_parameters" function from - "update_cell_and_death_parameters_O2_based" to "empty_function". - Examples and models should choose this *explicitly*. - -+ Cell::set_orientation( Cell* pCell ) changed to - Cell::set_orientation( Cell* pCell, double dt ) to be consistent with other - cell member functions. - -+ In void Cell::assign_orientation(), set polarity = 0.0 if a - set_orientation(Cell*,double) function is not set (NULL). - -+ Removed irrelevant data elements in the Custom_Cell_Data class. - -Notices for intended changes that may affect backwards compatibility: - -+ Will rename the current "Phenotype" class to "Full_Phenotype" - -+ Will introduce a new Phenotype class with a much simpler structure. - -+ Will rewrite the represetation of cell cycle and death phases. - -+ Will rewrite the standard phenotype models in the simpler representatio. - -+ Will stop requiring use of the Digital_Cell_Line class for initializing - simulations. - -+ Will deprecate update_cell_and_death_parameters, and instead use - update_phenotype_parameters. - -+ Will stop using the oxygen-dependent phenotype rule as default. - -PhysiCell 1.1.0 includes an advance copy of BioFVM 1.1.5. Here are the changes: - -/* fixes in BioFVM 1.1.5 */ - -+ correct typos in citation information in all source files - -+ updated citation information - -+ added void set_default_microenvironment( Microenvironment* M ) declaration to - BioFVM_Microenvironment.h - -+ set volume_is_changed = false in Basic_Agent::set_internal_uptake_constants(); - -+ Set the MultiCellDS options Booleans to extern bool in BioFVM_MultiCellDS.h - so that PhysiCell can read these options. - -+ Updated the simlified_data field in MultiCellDS XML output to include a - new "source" attribute with value "BioFVM". - -======================================================================= - -PhysiCell: PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D -Multicellular Systems. - -Version: 1.0.0 -Release date: 12 September 2016 - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -This is the initial public release of PhysiCell: an Open Source Physics-Based -Cell Simulator for 3-D Multicellular Systems. It is currently under scientific -peer review. - -Major new features: -+ Simulating large systems of cells in 3-D tissues on desktop machine -+ Cells move and change based on biomechanical and physical rules -+ Built upon BioFVM to couple processes with the substrates' concentrations - in the microenvironment -+ Implements multiple realistic cell cycle and cell death models -+ Performance linearly scales with the number of the cells -+ Preliminary support for MultiCellDS (http://MultiCellDS.org) -+ Includes examples for 3-D ductal carcinoma in situ (DCIS) and hanging - drop tumor spheroids - -Bugfixes: -+ Not applicable. - -======================================================================= - -PhysiCell: an open source physics-based multicell simulator - -Version: 0.5.0 -Release date: 2 Auguust - -Homepage: http://PhysiCell.MathCancer.org -Downloads: http://PhysiCell.sf.net - -Release summary: -Pre-release. Not for public use. Not supported. - -New features: -+ First code bundling. - -Bugfixes: -+ Nothing to see here. Move along. - diff --git a/changes.md b/changes.md index 614edcba2..ab4d22265 100644 --- a/changes.md +++ b/changes.md @@ -1,7 +1,175 @@ # PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems -**Versions:** 1.12.0 - +**Versions:** 1.13.0 - -**Release dates:** 15 May 2023 - +**Release dates:** 29 July 2023 - +* 1.13.0 : 29 July 2023 + +## Overview: +PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. + +**Reference:** A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, PhysiCell: an Open Source Physics-Based Cell Simulator for Multicellular Systems, PLoS Comput. Biol. 14(2): e1005991, 2018. DOI: [10.1371/journal.pcbi.1005991](https://dx.doi.org/10.1371/journal.pcbi.1005991) + +Visit http://MathCancer.org/blog for the latest tutorials and help. + +**Notable recognition:** ++ [2019 PLoS Computational Biology Research Prize for Public Impact](https://blogs.plos.org/biologue/2019/05/31/announcing-the-winners-of-the-2019-plos-computational-biology-research-prize/) + +### Key makefile rules: + +**`make`**: compiles the current project. If no + project has been defined, it first + populates the cancer heterogeneity 2D + sample project and compiles it + +**`make project-name`**: populates the indicated sample project. + Use "make" to compile it. + + * **`project-name`** choices: + * template + * biorobots-sample + * cancer-biorobots-sample + * cancer-immune-sample + * celltypes3-sample + * heterogeneity-sample + * pred-prey-farmer + * virus-macrophage-sample + * worm-sample + * ode-energy-sample + * physiboss-cell-lines-sample + * cancer-metabolism-sample + * interaction-sample + * mechano-sample + * rules-sample + * physimess-sample + +**`make list-projects`** : list all available sample projects + +**`make clean`** : removes all .o files and the executable, so that the next "make" recompiles the entire project + +**`make data-cleanup`** : clears out all simulation data + +**`make reset`** : de-populates the sample project and returns to the original PhysiCell state. Use this when switching to a new PhysiCell sample project. + +**`make save PROJ=name`**: save the current project (including the `Makefile`, `main.cpp`, and everything in `./config` and `./custom_modules/`) in `./user_projects/name`, where `name` is your choice for the project. If the project already exists, overwrite it. + +**`make load PROJ=name`**: load the user project `name` from `./user_projects/name` (including the `Makefile`, `main.cpp`, and everything in `./config` and `./custom_modules/`). + +**`make list-user-projects`**: list all user projects in `./user_projects/`. (Use these names without the trailing `/` in `make load PROJ=name`.) + +**`make jpeg`** : uses ImageMagick to convert the SVG files in the output directory to JPG (with appropriate sizing to make movies). Supply `OUTPUT=foldername` to select a different folder. + +**`make movie`** : uses ffmpeg to convert the JPG files in the output directory an mp4 movie. Supply `OUTPUT=foldername` to select a different folder, or `FRAMERATE=framerate` to override the frame rate. + +**`make upgrade`** : fetch the latest release of PhysiCell and overwrite the core library and sample projects. + +### Key Links +**Homepage:** http://PhysiCell.MathCancer.org + +**Downloads:** http://PhysiCell.sf.net + +**Support:** https://sourceforge.net/p/physicell/tickets/ + +**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 + +**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ + +**Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) + +See changes.md for the full change log. + +* * * + +## Release summary: +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. + +**NOTE 1:** MacOS users need to define a PHYSICELL_CPP environment variable to specify their OpenMP-enabled g++. See the [Quickstart](documentation/Quickstart.md) for details. + +**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.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.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! ++ Made changes to cell SVG plotting to support broader types of plotting in advance of PhysiMeSS [PR 162](https://github.com/MathCancer/PhysiCell/pull/162). Thanks, Vincent Noēl! ++ Added a safe way to query the current velocity via `Basic_Agent::get_previous_velocity()` in preparation for PhysiMeSS. [PR 163](https://github.com/MathCancer/PhysiCell/pull/163). Thanks, Vincent Noël! ++ Refined control of object counts in SVG for upcoming PhysiMeSS release. [PR 164](https://github.com/MathCancer/PhysiCell/pull/164). Thanks, Vincent! ++ Refined SVG plot options to incorporate substrates. [PR 181](https://github.com/MathCancer/PhysiCell/pull/181). Thanks, Marco Ruscone! ++ Updated PhysiBoSS to Version 2.2.1. See [PR 188](https://github.com/MathCancer/PhysiCell/pull/188). Thanks, Vincent Noël! ++ Updated unit tests (including `custom_DCs_2substrates`) ++ Added `damage rate` (from effector attack) to supported behaviors in the modeling gramamr ++ minor cleanup + +### Beta features (not fully supported): + +#### 1.13.0 ++ None in this release. + +### Bugfixes: + +#### 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!) ++ Improved handling of `voxel_index` in `remove_agent_from_voxel` in preparation for voxel-spanning objects such as PhysiMeSS. [PR 159](https://github.com/MathCancer/PhysiCell/pull/159). Thanks, Vincent Noël! ++ Fixed bug to ensure cell definitions without `intracellular` defined get a `NULL` intracellular model function. [PR 182](and [PR 182](https://github.com/MathCancer/PhysiCell/pull/182). THanks, Marco Ruscone! ++ Fixed a whitespaced bug in SVG output. [PR 179](https://github.com/MathCancer/PhysiCell/pull/179). Thanks, Vincent Noël! ++ Fixed a PhysiBoSS bug where dead cells could execute models. [PR 180](https://github.com/MathCancer/PhysiCell/pull/180) Thanks, Vincent Noël! ++ Fixed bugs involving Dirichlet conditions and multiple substrates (thanks to Daniel Bergman for pointing it out!) See [Issue 124](rf. https://github.com/MathCancer/PhysiCell/issues/124) and [PR 149](https://github.com/MathCancer/PhysiCell/pull/180). Thank you, Daniel Bergman and Randy Heiland! ++ `cancer_biorobots` Makefille PROGRAM_NAME is now `cancer_biorobots` instead of `project` ++ Deleted a meaningless line `dt;` in PhysiCell_standard_models.cpp ++ Added missing commas to cell_rules.csv in rules_sample project ++ Fixed typo: `PhyisiCell_rules.o` to `PhysiCell_rules.o` in Makefile-default (thanks to Joseph Abrams for pointing it out!) ++ Fixed errors in SBML ODE models. See [PR 185](https://github.com/MathCancer/PhysiCell/pull/185) and [PR 186](https://github.com/MathCancer/PhysiCell/pull/186). Thanks, Furkan Kurtoglu and Vincent Noël! ++ Fixed errors the PhysiBoSS readme. See [PR 187](https://github.com/MathCancer/PhysiCell/pull/187). Thanks, Vincent Noël! + +### Notices for intended changes that may affect backwards compatibility: ++ We intend to deprecate the unused phenotype variables `relative_maximum_attachment_distance`, `relative_detachment_distance`, and `maximum_attachment_rate` from `phenotype.mechanics.` + ++ We intend to merge `Custom_Variable` and `Custom_Vector_Variable` in the future. + ++ We may change the role of `operator()` and `operator[]` in `Custom_Variable` to more closely mirror the functionality in `Parameters`. + ++ Additional 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. + ++ We will change the timing of when `entry_function`s 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 than both daughter cells. Instead, we'll add an internal Boolean for "just exited a phase", and use this to execute the entry function at the next cycle call. This should make daughter cells independently execute the entry function. + ++ We might make `trigger_death` clear out all the cell's functions, or at least add an option to do this. + ++ We might change the behavior of copied Custom Data when a cell changes type (changes to a new cell definition). Currently, all custom data elements in a cell are overwritten based on those in the new cell definition. This is not the best behavior for custom data elements that represent state variables instead of type-dependent parameters. + +### Planned future improvements: + ++ Further XML-based simulation setup. + ++ Read saved simulation states (as MultiCellDS digital snapshots) + ++ Add a new standard phenotype function that uses mechanobiology, where high pressure can arrest cycle progression. (See https://twitter.com/MathCancer/status/1022555441518338048.) + ++ Create an angiogenesis sample project + ++ Create a small library of angiogenesis and vascularization codes as an optional standard module in ./modules (but not as a core component) + ++ Improved plotting options in SVG + ++ Further update sample projects to make use of more efficient interaction testing available + ++ Major refresh of documentation. + +* * * + +# PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems +**Versions:** 1.12.0 - 1.12.0 + +**Release dates:** 15 May 2023 - 15 May 2023 * 1.12.0 : 15 May 2023 ## Overview: @@ -40,6 +208,7 @@ Visit http://MathCancer.org/blog for the latest tutorials and help. * interaction-sample * mechano-sample * rules-sample + * physimess-sample **`make list-projects`** : list all available sample projects diff --git a/core/PhysiCell.h b/core/PhysiCell.h index fa5085bb3..feaf52590 100644 --- a/core/PhysiCell.h +++ b/core/PhysiCell.h @@ -72,7 +72,7 @@ #include #include -static std::string PhysiCell_Version = "1.12.0"; +static std::string PhysiCell_Version = "1.13.0"; static std::string PhysiCell_URL = "http://PhysiCell.MathCancer.org"; static std::string PhysiCell_DOI = "10.1371/journal.pcbi.1005991"; diff --git a/core/PhysiCell_cell.cpp b/core/PhysiCell_cell.cpp index 4d52dfcab..8844ce055 100644 --- a/core/PhysiCell_cell.cpp +++ b/core/PhysiCell_cell.cpp @@ -101,6 +101,9 @@ std::unordered_map cell_definition_indices_by_type; // in case you want the legacy method std::vector (*cell_division_orientation)(void) = UniformOnUnitSphere; // LegacyRandomOnUnitSphere; +Cell* standard_instantiate_cell() +{ return new Cell; } + Cell_Parameters::Cell_Parameters() { o2_hypoxic_threshold = 15.0; // HIF-1alpha at half-max around 1.5-2%, and tumors often are below 2% @@ -148,6 +151,7 @@ Cell_Definition::Cell_Definition() // the default Custom_Cell_Data constructor should take care of this // set up the default functions + functions.instantiate_cell = NULL; functions.volume_update_function = NULL; // standard_volume_update_function; functions.update_migration_bias = NULL; @@ -552,7 +556,7 @@ Cell* Cell::divide( ) } - Cell* child = create_cell(); + Cell* child = create_cell(functions.instantiate_cell); child->copy_data( this ); child->copy_function_pointers(this); child->parameters = parameters; @@ -1048,10 +1052,16 @@ void Cell::add_potentials(Cell* other_agent) return; } -Cell* create_cell( void ) +Cell* create_cell( Cell* (*custom_instantiate)()) { Cell* pNew; - pNew = new Cell; + + if (custom_instantiate) { + pNew = custom_instantiate(); + } else { + pNew = standard_instantiate_cell(); + } + (*all_cells).push_back( pNew ); pNew->index=(*all_cells).size()-1; @@ -1074,7 +1084,7 @@ Cell* create_cell( void ) // In that "create_cell()" uses "create_cell( cell_defaults )" Cell* create_cell( Cell_Definition& cd ) { - Cell* pNew = create_cell(); + Cell* pNew = create_cell(cd.functions.instantiate_cell); // use the cell defaults; pNew->type = cd.type; @@ -3002,7 +3012,11 @@ Cell_Definition* initialize_cell_definition_from_pugixml( pugi::xml_node cd_node } #endif - } + } else{ + + pCD->phenotype.intracellular = NULL; + + } // set up custom data node = cd_node.child( "custom_data" ); diff --git a/core/PhysiCell_cell.h b/core/PhysiCell_cell.h index 9a4d3bc3c..5919e3fac 100644 --- a/core/PhysiCell_cell.h +++ b/core/PhysiCell_cell.h @@ -200,7 +200,7 @@ class Cell : public Basic_Agent void step(double dt); Cell(); - ~Cell(); + virtual ~Cell(); bool assign_position(std::vector new_position); bool assign_position(double, double, double); @@ -251,7 +251,7 @@ class Cell : public Basic_Agent void convert_to_cell_definition( Cell_Definition& cd ); }; -Cell* create_cell( void ); +Cell* create_cell( Cell* (*custom_instantiate)() = NULL ); Cell* create_cell( Cell_Definition& cd ); void delete_cell( int ); diff --git a/core/PhysiCell_cell_container.cpp b/core/PhysiCell_cell_container.cpp index 7108f2250..3c5547fd5 100644 --- a/core/PhysiCell_cell_container.cpp +++ b/core/PhysiCell_cell_container.cpp @@ -349,10 +349,12 @@ void Cell_Container::remove_agent_from_voxel(Cell* agent, int voxel_index) { delete_index++; } - // move last item to index location - agent_grid[agent->get_current_mechanics_voxel_index()][delete_index] = agent_grid[agent->get_current_mechanics_voxel_index()][agent_grid[agent->get_current_mechanics_voxel_index()].size()-1 ]; - // shrink the vector - agent_grid[agent->get_current_mechanics_voxel_index()].pop_back(); + + // move last item to index location + agent_grid[voxel_index][delete_index] = agent_grid[voxel_index][agent_grid[voxel_index].size()-1 ]; + // shrink the vector + agent_grid[voxel_index].pop_back(); + return; } diff --git a/core/PhysiCell_phenotype.cpp b/core/PhysiCell_phenotype.cpp index d6ae129a0..6044a3288 100644 --- a/core/PhysiCell_phenotype.cpp +++ b/core/PhysiCell_phenotype.cpp @@ -678,7 +678,7 @@ Mechanics::Mechanics() cell_BM_adhesion_strength = 4.0; cell_cell_repulsion_strength = 10.0; - cell_BM_repulsion_strength = 10.0; + cell_BM_repulsion_strength = 100.0; cell_adhesion_affinities = {1}; @@ -1141,6 +1141,8 @@ void Molecular::advance( Basic_Agent* pCell, Phenotype& phenotype , double dt ) Cell_Functions::Cell_Functions() { + instantiate_cell = NULL; + volume_update_function = NULL; update_migration_bias = NULL; diff --git a/core/PhysiCell_phenotype.h b/core/PhysiCell_phenotype.h index d7134ec41..106b567a6 100644 --- a/core/PhysiCell_phenotype.h +++ b/core/PhysiCell_phenotype.h @@ -474,6 +474,8 @@ class Cell_Functions { private: public: + Cell* (*instantiate_cell)(); + Cycle_Model cycle_model; void (*volume_update_function)( Cell* pCell, Phenotype& phenotype , double dt ); // used in cell @@ -501,6 +503,11 @@ class Cell_Functions void (*molecular_model_function)(Cell* pCell, Phenotype& phenotype , double dt ); */ + + void (*plot_agent_SVG)(std::ofstream& os, Cell* pCell, double z_slice, std::vector (*cell_coloring_function)(Cell*), double X_lower, double Y_lower); + void (*plot_agent_legend)(std::ofstream& os, Cell_Definition* cell_def, double& cursor_x, double& cursor_y, std::vector (*cell_coloring_function)(Cell*), double temp_cell_radius); + + Cell_Functions(); // done }; diff --git a/core/PhysiCell_signal_behavior.cpp b/core/PhysiCell_signal_behavior.cpp index 96a0c4153..5f322cfa4 100644 --- a/core/PhysiCell_signal_behavior.cpp +++ b/core/PhysiCell_signal_behavior.cpp @@ -531,6 +531,12 @@ void setup_signal_behavior_dictionaries( void ) behavior_to_int[map_name ] = map_index; int_to_behavior[map_index] = map_name; + map_index++; + map_name = "damage rate"; + behavior_to_int[map_name ] = map_index; + int_to_behavior[map_index] = map_name; + + /* add new behaviors above this line */ // resize scales; @@ -1211,6 +1217,10 @@ void set_behaviors( Cell* pCell , std::vector parameters ) static int max_attachments_ind = find_behavior_index( "maximum number of cell attachments"); pCell->phenotype.mechanics.maximum_number_of_attachments = (int) parameters[max_attachments_ind]; + // cell damage rate (for effector attack) + static int damage_rate_ind = find_behavior_index( "damage rate"); + pCell->phenotype.cell_interactions.damage_rate = parameters[damage_rate_ind]; + return; } @@ -1391,6 +1401,11 @@ void set_single_behavior( Cell* pCell, int index , double parameter ) if( index == max_attachments_ind ) { pCell->phenotype.mechanics.maximum_number_of_attachments = (int) parameter; } + // cell damage rate (for effector attack) + static int damage_rate_ind = find_behavior_index( "damage rate"); + if( index == damage_rate_ind ) + { pCell->phenotype.cell_interactions.damage_rate = parameter; } + return; } @@ -1567,6 +1582,10 @@ std::vector get_behaviors( Cell* pCell ) static int max_attachments_ind = find_behavior_index( "maximum number of cell attachments"); parameters[max_attachments_ind] = pCell->phenotype.mechanics.maximum_number_of_attachments; + // get damage rate + static int damage_rate_ind = find_behavior_index( "damage rate"); + parameters[damage_rate_ind] = pCell->phenotype.cell_interactions.damage_rate; + return parameters; } @@ -1753,6 +1772,11 @@ double get_single_behavior( Cell* pCell , int index ) if( index == max_attachments_ind ) { return pCell->phenotype.mechanics.maximum_number_of_attachments; } + // get damage rate + static int damage_rate_ind = find_behavior_index( "damage rate"); + if( index == damage_rate_ind ) + { return pCell->phenotype.cell_interactions.damage_rate; } + return -1; } @@ -1960,6 +1984,10 @@ std::vector get_base_behaviors( Cell* pCell ) static int max_attachments_ind = find_behavior_index( "maximum number of cell attachments"); parameters[max_attachments_ind] = pCD->phenotype.mechanics.maximum_number_of_attachments; + // cell damage rate (effector attack) + static int damage_rate_ind = find_behavior_index( "damage rate"); + parameters[damage_rate_ind] = pCD->phenotype.cell_interactions.damage_rate; + return parameters; } @@ -2148,6 +2176,11 @@ double get_single_base_behavior( Cell* pCell , int index ) if( index == max_attachments_ind ) { return pCD->phenotype.mechanics.maximum_number_of_attachments; } + // cell damage rate (effector attack) + static int damage_rate_ind = find_behavior_index( "damage rate"); + if( index == damage_rate_ind ) + { return pCD->phenotype.cell_interactions.damage_rate; } + return -1; } @@ -2337,6 +2370,11 @@ double get_single_base_behavior( Cell_Definition* pCD , int index ) if( index == max_attachments_ind ) { return pCD->phenotype.mechanics.maximum_number_of_attachments; } + // cell damage rate (effector attack) + static int damage_rate_ind = find_behavior_index( "damage rate"); + if( index == damage_rate_ind ) + { return pCD->phenotype.cell_interactions.damage_rate; } + return -1; } diff --git a/core/PhysiCell_standard_models.cpp b/core/PhysiCell_standard_models.cpp index b0d99669c..105329d5e 100644 --- a/core/PhysiCell_standard_models.cpp +++ b/core/PhysiCell_standard_models.cpp @@ -67,6 +67,7 @@ #include "PhysiCell_standard_models.h" #include "PhysiCell_cell.h" +#include "../modules/PhysiCell_pathology.h" namespace PhysiCell{ @@ -759,6 +760,9 @@ void initialize_default_cell_definition( void ) cell_defaults.functions.set_orientation = NULL; + cell_defaults.functions.plot_agent_SVG = standard_agent_SVG; + cell_defaults.functions.plot_agent_legend = standard_agent_legend; + // add the standard death models to the default phenotype. cell_defaults.phenotype.death.add_death_model( 0.00319/60.0 , &apoptosis , apoptosis_parameters ); // MCF10A, to get a 2% apoptotic index @@ -1229,7 +1233,6 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double probability = attack_ij * immunogenicity_ji * dt; - dt; // s[type] * dt; if( UniformRandom() < probability && attacked == false ) { pCell->attack_cell(pTarget,dt); diff --git a/modules/PhysiCell_pathology.cpp b/modules/PhysiCell_pathology.cpp index 913a04762..a72d2bf33 100644 --- a/modules/PhysiCell_pathology.cpp +++ b/modules/PhysiCell_pathology.cpp @@ -402,7 +402,7 @@ std::string formatted_minutes_to_DDHHMM( double minutes ) return output ; } -void SVG_plot( std::string filename , Microenvironment& M, double z_slice , double time, std::vector (*cell_coloring_function)(Cell*), std::vector (*substrate_coloring_function)(double, double, double) ) +void SVG_plot( std::string filename , Microenvironment& M, double z_slice , double time, std::vector (*cell_coloring_function)(Cell*), std::vector (*substrate_coloring_function)(double, double, double) , void (cell_counts_function)(char*)) { double X_lower = M.mesh.bounding_box[0]; double X_upper = M.mesh.bounding_box[3]; @@ -462,7 +462,13 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub z_slice , PhysiCell_SVG_options.simulation_space_units.c_str() ); Write_SVG_text( os, szString, font_size*0.5, font_size*(.2+1), font_size, PhysiCell_SVG_options.font_color.c_str() , PhysiCell_SVG_options.font.c_str() ); - sprintf( szString , "%u agents" , total_cell_count ); + + if (cell_counts_function != NULL){ + cell_counts_function(szString); + } else { + sprintf( szString , "%u agents" , total_cell_count ); + } + Write_SVG_text( os, szString, font_size*0.5, font_size*(.2+1+.2+.9), 0.95*font_size, PhysiCell_SVG_options.font_color.c_str() , PhysiCell_SVG_options.font.c_str() ); @@ -486,13 +492,14 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub double half_voxel_size = voxel_size / 2.0; double normalizer = 78.539816339744831 / (voxel_size*voxel_size*voxel_size); - + + // used for the legend + double max_conc; + double min_conc; // color in the background ECM if(PhysiCell_settings.enable_substrate_plot == true && (*substrate_coloring_function) != NULL) { double dz_stroma = M.mesh.dz; - double max_conc; - double min_conc; std::string sub = PhysiCell_settings.substrate_to_monitor; int sub_index = M.find_density_index(sub); // check the substrate does actually exist @@ -554,47 +561,6 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub } - // add legend for the substrate - - os << " " << std::endl; //for some misterious reasons, the tissue part in the SVG is rotated so I have to re-rotate to draw - // the legend, otherwise it will be printed upside down - int padding = 0; - - double conc_interval = (max_conc - min_conc) / 13; // setting the interval for the values in the legend. I will divide the legend in 13 parts (as in the jupyter notebook) - - for(int i = 0; i <= 12; i++){ //creating 13 rectangoles for the bar, each one with a different shade of color. - - double concentration_sample = min_conc + (conc_interval * i); // the color depends on the concentration, starting from the min concentration to the max (which was sampled before) - - std::vector< std::string > output = substrate_coloring_function(concentration_sample, max_conc, min_conc ); - - padding = 25 * i; - - double upper_left_x = plot_width + 25.0; - double upper_left_y = ((plot_height - 25) / 13.0) * i; // here I set the position of each rectangole - - Write_SVG_rect(os, upper_left_x, plot_height - upper_left_y - 60, 25.0, ((plot_height - 25.0) / 13.0), 0 , "none", output[0]); //drawing each piece of the barplot - - if(i%2 == 0){ // of course I am not printing each value of the barplot, otherwise is too crowded, so just one each 2 - - char* szString; - szString = new char [1024]; - - sprintf( szString , "- %e", concentration_sample); - - Write_SVG_text( os , szString, upper_left_x + 24, plot_height - upper_left_y + 5.31, font_size , - PhysiCell_SVG_options.font_color.c_str() , PhysiCell_SVG_options.font.c_str() ); // misterious values set with a trial and error approach due to OCD. But now the legend is coherent at pixel level - - delete [] szString; - - } - - } - - Write_SVG_rect(os, 25.0 + plot_width, 25.0, 25.0, plot_height - 25.0, 0.002 * plot_height , "black", "none"); // nice black contour around the legend - - os << " " << std::endl; // no more rotation, restoring the tissue object in the SVG } } /* @@ -657,15 +623,8 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub { Cell* pC = (*all_cells)[i]; // global_cell_list[i]; - static std::vector Colors; if( fabs( (pC->position)[2] - z_slice ) < pC->phenotype.geometry.radius ) { - double r = pC->phenotype.geometry.radius ; - double rn = pC->phenotype.geometry.nuclear_radius ; - double z = fabs( (pC->position)[2] - z_slice) ; - - Colors = cell_coloring_function( pC ); - os << " ID << "\" " << "type=\"" << pC->type_name << "\" "; // new April 2022 if( pC->phenotype.death.dead == true ) @@ -673,22 +632,11 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub else { os << "dead=\"false\" " ; } os << ">" << std::endl; - - // figure out how much of the cell intersects with z = 0 - - double plot_radius = sqrt( r*r - z*z ); - - Write_SVG_circle( os, (pC->position)[0]-X_lower, (pC->position)[1]-Y_lower, - plot_radius , 0.5, Colors[1], Colors[0] ); - - // plot the nucleus if it, too intersects z = 0; - if( fabs(z) < rn && PhysiCell_SVG_options.plot_nuclei == true ) - { - plot_radius = sqrt( rn*rn - z*z ); - Write_SVG_circle( os, (pC->position)[0]-X_lower, (pC->position)[1]-Y_lower, - plot_radius, 0.5, Colors[3],Colors[2]); - } - os << " " << std::endl; + + pC->functions.plot_agent_SVG(os, pC, z_slice, cell_coloring_function, X_lower, Y_lower); + + os << " " << std::endl; + } } @@ -763,6 +711,45 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub // draw a box around the plot window Write_SVG_rect( os , 0 , top_margin, plot_width, plot_height , 0.002 * plot_height , "rgb(0,0,0)", "none" ); + + if(substrate_coloring_function != NULL){ + + // add legend for the substrate + + double conc_interval = (max_conc - min_conc) / 10; // setting the interval for the values in the legend. + + szString = new char [1024]; + double upper_left_x = plot_width + 25.0; + double sub_rect_height = (plot_height - 25.0) / 10.0; + for(int i = 0; i <= 9; i++){ //creating 10 rectangoles for the bar, each one with a different shade of color. + + double concentration_sample = min_conc + (conc_interval * (9-i)); // the color depends on the concentration, starting from the min concentration to the max (which was sampled before) + + std::vector< std::string > output = substrate_coloring_function(concentration_sample, max_conc, min_conc ); + + double upper_left_y = sub_rect_height * i; // here I set the position of each rectangole + + Write_SVG_rect(os, upper_left_x, top_margin + upper_left_y, 25.0, sub_rect_height, 0.002 * plot_height , "none", output[0]); //drawing each piece of the barplot + + if(i%2 != 0){ // of course I am not printing each value of the barplot, otherwise is too crowded, so just one each 2 + + sprintf( szString , " %.2g", concentration_sample); + Write_SVG_rect(os, upper_left_x + 25, top_margin + upper_left_y + sub_rect_height - (0.001 * plot_height), 3, 0.002 * plot_height, 0 , "rgb(0,0,0)", "rgb(0,0,0)"); + Write_SVG_text( os , szString, upper_left_x + 28, top_margin + upper_left_y + sub_rect_height, font_size , + PhysiCell_SVG_options.font_color.c_str() , PhysiCell_SVG_options.font.c_str() ); // misterious values set with a trial and error approach due to OCD. But now the legend is coherent at pixel level + } + } + + sprintf( szString , "%.2g", max_conc); + + Write_SVG_rect(os, upper_left_x + 25, top_margin - (0.001 * plot_height), 3, 0.002 * plot_height, 0 , "rgb(0,0,0)", "rgb(0,0,0)"); + Write_SVG_text( os , szString, upper_left_x + 28, top_margin, font_size , + PhysiCell_SVG_options.font_color.c_str() , PhysiCell_SVG_options.font.c_str() ); // misterious values set with a trial and error approach due to OCD. But now the legend is coherent at pixel level + + delete [] szString; + } + + Write_SVG_rect(os, 25.0 + plot_width, top_margin, 25.0, plot_height - 25, 0.002 * plot_height , "black", "none"); // nice black contour around the legend // close the svg tag, close the file Write_SVG_end( os ); @@ -771,6 +758,30 @@ void SVG_plot( std::string filename , Microenvironment& M, double z_slice , doub return; } +void standard_agent_SVG(std::ofstream& os, PhysiCell::Cell* pC, double z_slice, std::vector (*cell_coloring_function)(Cell*), double X_lower, double Y_lower) { + + double r = pC->phenotype.geometry.radius ; + double rn = pC->phenotype.geometry.nuclear_radius ; + double z = fabs( (pC->position)[2] - z_slice) ; + + std::vector Colors = cell_coloring_function( pC ); + + // figure out how much of the cell intersects with z = 0 + double plot_radius = sqrt( r*r - z*z ); + + // then normal cell, plot sphere if it intersects z = 0; + Write_SVG_circle( os, (pC->position)[0]-X_lower, (pC->position)[1]-Y_lower, + plot_radius , 0.5, Colors[1], Colors[0] ); + // plot the nucleus if it, too intersects z = 0; + if( fabs(z) < rn && PhysiCell_SVG_options.plot_nuclei == true ) + { + plot_radius = sqrt( rn*rn - z*z ); + Write_SVG_circle( os, (pC->position)[0]-X_lower, (pC->position)[1]-Y_lower, + plot_radius, 0.5, Colors[3],Colors[2]); + } +} + + std::vector paint_by_density_percentage( double concentration, double max_conc, double min_conc ){ std::vector< std::string > output( 4 , "black" ); @@ -898,20 +909,10 @@ void create_plot_legend( std::string filename , std::vector (*cell_ for( int k=0 ; k < number_of_cell_types ; k++ ) { - // switch to the cell type - Cell C; - C.convert_to_cell_definition( *(cell_definitions_by_index[k]) ); - - // get the colors using the current coloring function - std::vector colors = cell_coloring_function(&C); - - // place a big circle with cytoplasm colors - Write_SVG_circle(os,cursor_x, cursor_y , temp_cell_radius , 1.0 , colors[1] , colors[0] ); - // place a small circle with nuclear colors - Write_SVG_circle(os,cursor_x, cursor_y , 0.5*temp_cell_radius , 1.0 , colors[3] , colors[2] ); - - // place the label - + Cell_Definition* cell_def = cell_definitions_by_index[k]; + cell_def->functions.plot_agent_legend(os, cell_def, cursor_x, cursor_y, cell_coloring_function, temp_cell_radius); + + // place the label cursor_x += temp_cell_radius + 2*padding; cursor_y += 0.3*font_size; @@ -929,4 +930,20 @@ void create_plot_legend( std::string filename , std::vector (*cell_ os.close(); } +void standard_agent_legend(std::ofstream& os, Cell_Definition* cell_definition, double& cursor_x, double& cursor_y, std::vector (*cell_coloring_function)(Cell*), double temp_cell_radius) { + + // switch to the cell type + Cell C; + C.convert_to_cell_definition( *cell_definition ); + + // get the colors using the current coloring function + std::vector colors = cell_coloring_function(&C); + + // place a big circle with cytoplasm colors + Write_SVG_circle(os,cursor_x, cursor_y , temp_cell_radius , 1.0 , colors[1] , colors[0] ); + // place a small circle with nuclear colors + Write_SVG_circle(os,cursor_x, cursor_y , 0.5*temp_cell_radius , 1.0 , colors[3] , colors[2] ); + +} + }; diff --git a/modules/PhysiCell_pathology.h b/modules/PhysiCell_pathology.h index 8ee623dd2..a89be7002 100644 --- a/modules/PhysiCell_pathology.h +++ b/modules/PhysiCell_pathology.h @@ -120,13 +120,16 @@ std::vector paint_by_number_cell_coloring( Cell* pCell ); // done std::string formatted_minutes_to_DDHHMM( double minutes ); -void SVG_plot( std::string filename , Microenvironment& M, double z_slice , double time, std::vector (*cell_coloring_function)(Cell*), std::vector (*substrate_coloring_function)(double, double, double) = NULL ); // done +void SVG_plot( std::string filename , Microenvironment& M, double z_slice , double time, std::vector (*cell_coloring_function)(Cell*), std::vector (*substrate_coloring_function)(double, double, double) = NULL, void (*cell_counts_function) (char*) = NULL); // done void SVG_plot_with_stroma( std::string filename , Microenvironment& M, double z_slice , double time, std::vector (*cell_coloring_function)(Cell*) , int ECM_index, std::vector (*ECM_coloring_function)(double) ); // planned void create_plot_legend( std::string filename , std::vector (*cell_coloring_function)(Cell*) ); +void standard_agent_SVG(std::ofstream& os, PhysiCell::Cell* pCell, double z_slice, std::vector (*cell_coloring_function)(Cell*), double X_lower, double Y_lower); +void standard_agent_legend(std::ofstream& os, Cell_Definition* cell_definition, double& cursor_x, double& cursor_y, std::vector (*cell_coloring_function)(Cell*), double temp_cell_radius); + }; #endif diff --git a/protocols/adding new signals or behaviors.md b/protocols/adding new signals or behaviors.md index 9fea0e6ad..d90cb5e3d 100644 --- a/protocols/adding new signals or behaviors.md +++ b/protocols/adding new signals or behaviors.md @@ -226,4 +226,18 @@ Suppose you want to add a new behavior "my behavior name" to the dictionary, and Notice that `pCD` is set to `Cell_Definition` of the cell in `pCell`. +1. Add the behavior to the function to get a single base behavior from a cell's cell definition (queried by cell definiton) + 1. Search for `double get_single_base_behavior( Cell_Definition* pCD , int index )` + + 1. Go to the end of the function. + + 3. Add code to write your behavior to the , like this: + + ``` + // my behavior + static int my_behavior_ind = find_behavior_index("my behavior name" ); + if( index == my_behavior_ind ) + { return pCD->something; } + ``` + Make sure that `my_behavior_ind` is unique. diff --git a/sample_projects/Makefile-default b/sample_projects/Makefile-default index 3a9591725..00e0f1ade 100644 --- a/sample_projects/Makefile-default +++ b/sample_projects/Makefile-default @@ -42,7 +42,7 @@ BioFVM_utilities.o BioFVM_basic_agent.o BioFVM_MultiCellDS.o BioFVM_agent_contai PhysiCell_core_OBJECTS := PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o \ PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_basic_signaling.o \ -PhysiCell_signal_behavior.o PhyisiCell_rules.o +PhysiCell_signal_behavior.o PhysiCell_rules.o PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o @@ -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 mechano-sample rules-sample" + @echo " worm-sample interaction-sample mechano-sample rules-sample physimess-sample" @echo "" @echo "Sample intracellular projects: ode-energy-sample physiboss-cell-lines-sample cancer-metabolism-sample" @echo "" @@ -188,6 +188,14 @@ rules-sample: 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/ # ---- intracellular projects ode-energy-sample: diff --git a/sample_projects/cancer_biorobots/Makefile b/sample_projects/cancer_biorobots/Makefile index b1c15a3c0..cd4613b5e 100644 --- a/sample_projects/cancer_biorobots/Makefile +++ b/sample_projects/cancer_biorobots/Makefile @@ -1,5 +1,5 @@ VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) -PROGRAM_NAME := project +PROGRAM_NAME := cancer_biorobots CC := g++ # CC := g++-mp-7 # typical macports compiler name diff --git a/sample_projects_intracellular/ode/test_sbml1/Make-physiboss b/sample_projects/physimess/Makefile similarity index 62% rename from sample_projects_intracellular/ode/test_sbml1/Make-physiboss rename to sample_projects/physimess/Makefile index 1a0dc67fd..a25f2d72c 100644 --- a/sample_projects_intracellular/ode/test_sbml1/Make-physiboss +++ b/sample_projects/physimess/Makefile @@ -1,5 +1,5 @@ VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) -PROGRAM_NAME := PhysiBoSS_Cell_Lines +PROGRAM_NAME := project CC := g++ # CC := g++-mp-7 # typical macports compiler name @@ -11,30 +11,6 @@ ifdef PHYSICELL_CPP CC := $(PHYSICELL_CPP) endif -### MaBoSS configuration -# MaBoSS max nodes -ifndef MABOSS_MAX_NODES -MABOSS_MAX_NODES = 64 -endif - -# MaBoSS directory -MABOSS_DIR = addons/PhysiBoSSa/MaBoSS-env-2.0/engine -CUR_DIR = $(shell pwd) -CUSTOM_DIR = sample_projects/Arnau_model/custom_modules - -ifneq ($(OS), Windows_NT) - LDL_FLAG = -ldl -endif - -LIB := -L$(CUR_DIR)/$(MABOSS_DIR)/lib -lMaBoSS $(LDL_FLAG) -INC := -DADDON_PHYSIBOSS -I$(CUR_DIR)/$(MABOSS_DIR)/include -DMAXNODES=$(MABOSS_MAX_NODES) - - -# If max nodes > 64, change lib path -ifeq ($(shell expr $(MABOSS_MAX_NODES) '>' 64), 1) -LIB := -L$(CUR_DIR)/$(MABOSS_DIR)/lib -lMaBoSS_$(MABOSS_MAX_NODES)n $(LDL_FLAG) -endif - ARCH := native # best auto-tuning # ARCH := core2 # a reasonably safe default for most CPUs since 2007 # ARCH := corei7 @@ -56,6 +32,18 @@ ARCH := native # best auto-tuning # 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 -ggdb +ifeq ($(OS),Windows_NT) +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Darwin) + UNAME_P := $(shell uname -p) + var := $(shell which $(CC) | xargs file) + ifeq ($(lastword $(var)),arm64) + CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 + endif + endif +endif + COMPILE_COMMAND := $(CC) $(CFLAGS) BioFVM_OBJECTS := BioFVM_vector.o BioFVM_mesh.o BioFVM_microenvironment.o BioFVM_solvers.o BioFVM_matlab.o \ @@ -66,24 +54,24 @@ PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_signal_behavior.o PhysiCell_rules.o PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ -PhysiCell_pugixml.o PhysiCell_settings.o +PhysiCell_pugixml.o PhysiCell_settings.o PhysiCell_geometry.o -# put your custom objects here (they should be in the custom_modules directory) +PhysiMeSS_OBJECTS := PhysiMeSS.o PhysiMeSS_agent.o PhysiMeSS_fibre.o PhysiMeSS_cell.o -PhysiBoSSa_OBJECTS := maboss_network.o maboss_intracellular.o +# put your custom objects here (they should be in the custom_modules directory) 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) $(PhysiBoSSa_OBJECTS) $(PhysiBoSS_module_OBJECTS) +ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiMeSS_OBJECTS) $(PhysiCell_custom_module_OBJECTS) # compile the project -all: MaBoSS main.cpp $(ALL_OBJECTS) - $(COMPILE_COMMAND) $(INC) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp $(LIB) - make name +all: main.cpp $(ALL_OBJECTS) + $(COMPILE_COMMAND) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp + make name name: @echo "" @@ -99,7 +87,7 @@ PhysiCell_digital_cell_line.o: ./core/PhysiCell_digital_cell_line.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_digital_cell_line.cpp PhysiCell_cell.o: ./core/PhysiCell_cell.cpp - $(COMPILE_COMMAND) $(INC) -c ./core/PhysiCell_cell.cpp + $(COMPILE_COMMAND) -c ./core/PhysiCell_cell.cpp PhysiCell_cell_container.o: ./core/PhysiCell_cell_container.cpp $(COMPILE_COMMAND) -c ./core/PhysiCell_cell_container.cpp @@ -112,9 +100,9 @@ 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 @@ -168,26 +156,35 @@ 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 -# user-defined PhysiCell modules +PhysiCell_basic_signaling.o: ./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 + +# PhysiMeSS +PhysiMeSS.o: ./addons/PhysiMeSS/PhysiMeSS.cpp + $(COMPILE_COMMAND) -c ./addons/PhysiMeSS/PhysiMeSS.cpp -MaBoSS: - cd $(MABOSS_DIR)/src && make MAXNODES=$(MABOSS_MAX_NODES) install_alib +PhysiMeSS_agent.o: ./addons/PhysiMeSS/PhysiMeSS_agent.cpp + $(COMPILE_COMMAND) -c ./addons/PhysiMeSS/PhysiMeSS_agent.cpp -maboss_network.o: ./addons/PhysiBoSSa/src/maboss_network.cpp - $(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSSa/src/maboss_network.cpp +PhysiMeSS_fibre.o: ./addons/PhysiMeSS/PhysiMeSS_fibre.cpp + $(COMPILE_COMMAND) -c ./addons/PhysiMeSS/PhysiMeSS_fibre.cpp -maboss_intracellular.o: ./addons/PhysiBoSSa/src/maboss_intracellular.cpp - $(COMPILE_COMMAND) $(INC) -c ./addons/PhysiBoSSa/src/maboss_intracellular.cpp +PhysiMeSS_cell.o: ./addons/PhysiMeSS/PhysiMeSS_cell.cpp + $(COMPILE_COMMAND) -c ./addons/PhysiMeSS/PhysiMeSS_cell.cpp + +# user-defined PhysiCell modules custom.o: ./custom_modules/custom.cpp - $(COMPILE_COMMAND) $(INC) -c ./custom_modules/custom.cpp + $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp # cleanup @@ -197,30 +194,27 @@ 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 -rf ./config/boolean_network/ - rm -rf ./scripts - -MaBoSS-clean: - cd $(MABOSS_DIR)/src && make clean + touch ./config/empty.csv + rm -f ./config/mymodel.xml *.csv + rm -fr ./config/Cell_Fibre_Mechanics ./config/Fibre_Crosslinks ./config/Fibre_Initialisation ./config/Neighbours_in_voxels ./config/Fibre_Degradation -clean: MaBoSS-clean +clean: rm -f *.o rm -f $(PROGRAM_NAME)* data-cleanup: - rm -f *.mat - rm -f *.xml - rm -f *.svg - rm -f ./output/* + 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 @@ -240,3 +234,52 @@ 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 + +# upgrade rules + +SOURCE := PhysiCell_upgrade.zip +get-upgrade: + @echo $$(curl https://raw.githubusercontent.com/MathCancer/PhysiCell/master/VERSION.txt) > VER.txt + @echo https://github.com/MathCancer/PhysiCell/releases/download/$$(grep . VER.txt)/PhysiCell_V.$$(grep . VER.txt).zip > DL_FILE.txt + rm -f VER.txt + $$(curl -L $$(grep . DL_FILE.txt) --output PhysiCell_upgrade.zip) + rm -f DL_FILE.txt + +PhysiCell_upgrade.zip: + make get-upgrade + +upgrade: $(SOURCE) + unzip $(SOURCE) PhysiCell/VERSION.txt + mv -f PhysiCell/VERSION.txt . + unzip $(SOURCE) PhysiCell/core/* + cp -r PhysiCell/core/* core + unzip $(SOURCE) PhysiCell/modules/* + cp -r PhysiCell/modules/* modules + unzip $(SOURCE) PhysiCell/sample_projects/* + cp -r PhysiCell/sample_projects/* sample_projects + unzip $(SOURCE) PhysiCell/BioFVM/* + cp -r PhysiCell/BioFVM/* BioFVM + unzip $(SOURCE) PhysiCell/documentation/User_Guide.pdf + mv -f PhysiCell/documentation/User_Guide.pdf documentation + rm -f -r PhysiCell + rm -f $(SOURCE) \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/fibre_maze.csv b/sample_projects/physimess/config/Cell_Fibre_Mechanics/fibre_maze.csv new file mode 100644 index 000000000..fbb2e51b2 --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/fibre_maze.csv @@ -0,0 +1,58 @@ +0,0,0,0 +-220, -200,0,3 +0,-280,0,2 +-50,-280,0,2 +-110,-280,0,2 +-170,-280,0,2 +-220,-280,0,2 +-60,-230,0,2 +-110,-230,0,2 +-160,-230,0,2 +0,280,0,2 +-50,280,0,2 +-110,280,0,2 +-170,280,0,2 +-220,280,0,2 +-60,230,0,2 +-110,230,0,2 +-160,230,0,2 +-30,-200,0,1 +-30,-150,0,1 +-30,-100,0,1 +-30,-50,0,1 +-30,0,0,1 +-30,50,0,1 +-30,100,0,1 +-30,150,0,1 +-30,200,0,1 +30,-250,0,1 +30,-200,0,1 +30,-150,0,1 +30,-100,0,1 +30,-50,0,1 +30,0,0,1 +30,50,0,1 +30,100,0,1 +30,150,0,1 +30,200,0,1 +30,250,0,1 +-250,-250,0,1 +-250,-200,0,1 +-250,-150,0,1 +-250,-100,0,1 +-250,-50,0,1 +-250,-0,0,1 +-250,50,0,1 +-250,100,0,1 +-250,150,0,1 +-250,200,0,1 +-250,250,0,1 +-190,-200,0,1 +-190,-150,0,1 +-190,-100,0,1 +-190,-50,0,1 +-190,0,0,1 +-190,50,0,1 +-190,100,0,1 +-190,150,0,1 +-190,200,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/hinge.csv b/sample_projects/physimess/config/Cell_Fibre_Mechanics/hinge.csv new file mode 100644 index 000000000..d9f11d3c7 --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/hinge.csv @@ -0,0 +1,4 @@ +25,0,0,0 +20,20,0,2 +30,5,0,1 +100,0,0,3 diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_fibremaze.xml b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_fibremaze.xml new file mode 100644 index 000000000..33a8c606a --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_fibremaze.xml @@ -0,0 +1,490 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 1000 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + nutrient + 0.0 + 0.1 + + + + + false + + + + + false + true + true + + + + + + 1000.0 + 0.1 + + 1.0 + 0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 2 + 1 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Cell_Fibre_Mechanics/ + fibre_maze.csv + + + + + 0 + 0 + + 2000 + true + 60.0 + 0.0 + 2.0 + 0.0 + 1.57 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_hinge.xml b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_hinge.xml new file mode 100644 index 000000000..35ef69c10 --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_hinge.xml @@ -0,0 +1,485 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 100 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 0.1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1.0 + 0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 2 + 1 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Cell_Fibre_Mechanics/ + hinge.csv + + + + + 0 + 0 + + 2000 + true + 60.0 + 0.0 + 2.0 + 0.0 + 1.57 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + true + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_pushing.xml b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_pushing.xml new file mode 100644 index 000000000..c8c28fa12 --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_pushing.xml @@ -0,0 +1,398 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 500 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1 + 0.0 + + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 2 + 1 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 10.0 + 1 + 0.0 + 0.0 + + + + + + + 1.0 + + + + + + + + ./config/Cell_Fibre_Mechanics + snowplough.csv + + + + + 0 + + 1 + 1000 + + true + 40.0 + 0.0 + 2.0 + 0.0 + 1.57 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + true + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_rotating.xml b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_rotating.xml new file mode 100644 index 000000000..79e90e80c --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/mymodel_rotating.xml @@ -0,0 +1,398 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 200 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1 + 0.0 + + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 2 + 1 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 10.0 + 1 + 0.0 + 0.0 + + + + + + + 1.0 + + + + + + + + ./config/Cell_Fibre_Mechanics + snowplough.csv + + + + + 0 + + 1 + 1000 + + true + 40.0 + 0.0 + 2.0 + 0.0 + 1.57 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + true + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Cell_Fibre_Mechanics/snowplough.csv b/sample_projects/physimess/config/Cell_Fibre_Mechanics/snowplough.csv new file mode 100644 index 000000000..6eea3f70b --- /dev/null +++ b/sample_projects/physimess/config/Cell_Fibre_Mechanics/snowplough.csv @@ -0,0 +1,11 @@ +-50,0,0,0 +100,0,0,2 +0,0,0,1 +0,-200,0,1 +0,-150,0,1 +0,-100,0,1 +0,-50,0,1 +0,50,0,1 +0,100,0,1 +0,150,0,1 +0,200,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test.csv b/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test.csv new file mode 100644 index 000000000..c8868b1bc --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test.csv @@ -0,0 +1,7 @@ +0,0,0,0 +-10,40,0,1 +20,20,0,2 +30,10,0,1 +42,20,0,1 +20,-20,0,2 +50,-21,0,2 diff --git a/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test_extended.csv b/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test_extended.csv new file mode 100644 index 000000000..cb1070c79 --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Crosslinks/fibre_crosslink_test_extended.csv @@ -0,0 +1,41 @@ +-150,280,0,0 +100,0,0,2 +10,380,0,1 +10,360,0,1 +10,340,0,1 +10,320,0,1 +10,300,0,1 +10,280,0,1 +10,260,0,1 +10,240,0,1 +10,220,0,1 +10,200,0,1 +10,180,0,1 +10,160,0,1 +10,140,0,1 +10,120,0,1 +10,100,0,1 +10,80,0,1 +10,60,0,1 +10,40,0,1 +10,20,0,1 +10,0,0,1 +10,-20,0,1 +10,-40,0,1 +10,-60,0,1 +10,-80,0,1 +10,-100,0,1 +10,-120,0,1 +10,-140,0,1 +10,-160,0,1 +10,-180,0,1 +10,-200,0,1 +10,-220,0,1 +10,-240,0,1 +10,-260,0,1 +10,-280,0,1 +10,-300,0,1 +10,-320,0,1 +10,-340,0,1 +10,-360,0,1 +10,-380,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_extended_fibre_crosslink_test.xml b/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_extended_fibre_crosslink_test.xml new file mode 100644 index 000000000..fe0ad3f62 --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_extended_fibre_crosslink_test.xml @@ -0,0 +1,420 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 0 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 1000 + true + + + + 1 + true + + + + false + + + + + false + false + + + + + + 10.0 + 0.1 + + 0.0 + 0 + + + + + 100.0 + 0.1 + + 1.0 + 0.0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 1 + 10 + 0.5 + + true + true + + true + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 1 + 0.5 + + false + true + + false + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.0 + 0.0 + 1.25 + + 0.0 + 0.0 + + + + + 1 + 1 + 0.5 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Crosslinks + fibre_crosslink_test_extended.csv + + + + + 0 + + 1 + 10000 + + false + 40.0 + 0.0 + 2.0 + 0.0 + 0.2 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_simple_fibre_crosslink_test.xml b/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_simple_fibre_crosslink_test.xml new file mode 100644 index 000000000..75df8c2eb --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Crosslinks/mymodel_simple_fibre_crosslink_test.xml @@ -0,0 +1,393 @@ + + + -500 + 500 + -500 + 500 + -10 + 10 + 20 + 20 + 20 + true + + + + 0 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + + + + + + 10000000.0 + 0.1 + + 0.25 + 0.25 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.2 + 20.0 + 2.5 + + 1.8 + 15.12 + + + + + 1 + 1 + .25 + + true + true + + true + signal + 1 + + + + + + + 0 + 1 + 10 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0 + 20 + 0 + + 1.8 + 15.12 + + + + + 1 + 1 + .5 + + false + true + + false + signal + 1 + + + + + + + 20 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0 + 20 + 0 + + 1.8 + 15.12 + + + + + 1 + 1 + .5 + + false + true + + false + signal + 1 + + + + + + + 20 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Crosslinks + fibre_crosslink_test.csv + + + + + 0 + + 1 + 500 + + false + 75.0 + 0.0 + 2.0 + 0.0 + 0.2 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + diff --git a/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres.csv b/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres.csv new file mode 100644 index 000000000..fe3600ade --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres.csv @@ -0,0 +1,377 @@ +0,0,0,0 +50,350,0,1 +50,325,0,1 +50,300,0,1 +50,275,0,1 +50,250,0,1 +50,225,0,1 +50,200,0,1 +50,175,0,1 +50,150,0,1 +50,125,0,1 +50,100,0,1 +50,75,0,1 +50,50,0,1 +50,25,0,1 +50,0,0,1 +50,-350,0,1 +50,-325,0,1 +50,-300,0,1 +50,-275,0,1 +50,-250,0,1 +50,-225,0,1 +50,-200,0,1 +50,-175,0,1 +50,-150,0,1 +50,-125,0,1 +50,-100,0,1 +50,-75,0,1 +50,-50,0,1 +50,-25,0,1 +-50,350,0,1 +-50,325,0,1 +-50,300,0,1 +-50,275,0,1 +-50,250,0,1 +-50,225,0,1 +-50,200,0,1 +-50,175,0,1 +-50,150,0,1 +-50,125,0,1 +-50,100,0,1 +-50,75,0,1 +-50,50,0,1 +-50,25,0,1 +-50,0,0,1 +-50,-350,0,1 +-50,-325,0,1 +-50,-300,0,1 +-50,-275,0,1 +-50,-250,0,1 +-50,-225,0,1 +-50,-200,0,1 +-50,-175,0,1 +-50,-150,0,1 +-50,-125,0,1 +-50,-100,0,1 +-50,-75,0,1 +-50,-50,0,1 +-50,-25,0,1 +25,350,0,1 +25,325,0,1 +25,300,0,1 +25,275,0,1 +25,250,0,1 +25,225,0,1 +25,200,0,1 +25,175,0,1 +25,150,0,1 +25,125,0,1 +25,100,0,1 +25,75,0,1 +25,50,0,1 +25,25,0,1 +25,0,0,1 +25,-350,0,1 +25,-325,0,1 +25,-300,0,1 +25,-275,0,1 +25,-250,0,1 +25,-225,0,1 +25,-200,0,1 +25,-175,0,1 +25,-150,0,1 +25,-125,0,1 +25,-100,0,1 +25,-75,0,1 +25,-50,0,1 +25,-25,0,1 +-25,350,0,1 +-25,325,0,1 +-25,300,0,1 +-25,275,0,1 +-25,250,0,1 +-25,225,0,1 +-25,200,0,1 +-25,175,0,1 +-25,150,0,1 +-25,125,0,1 +-25,100,0,1 +-25,75,0,1 +-25,50,0,1 +-25,25,0,1 +-25,0,0,1 +-25,-350,0,1 +-25,-325,0,1 +-25,-300,0,1 +-25,-275,0,1 +-25,-250,0,1 +-25,-225,0,1 +-25,-200,0,1 +-25,-175,0,1 +-25,-150,0,1 +-25,-125,0,1 +-25,-100,0,1 +-25,-75,0,1 +-25,-50,0,1 +-25,-25,0,1 +0,350,0,1 +0,325,0,1 +0,300,0,1 +0,275,0,1 +0,250,0,1 +0,225,0,1 +0,200,0,1 +0,175,0,1 +0,150,0,1 +0,125,0,1 +0,100,0,1 +0,75,0,1 +0,50,0,1 +0,25,0,1 +0,-350,0,1 +0,-325,0,1 +0,-300,0,1 +0,-275,0,1 +0,-250,0,1 +0,-225,0,1 +0,-200,0,1 +0,-175,0,1 +0,-150,0,1 +0,-125,0,1 +0,-100,0,1 +0,-75,0,1 +0,-50,0,1 +0,-25,0,1 +75,350,0,1 +75,325,0,1 +75,300,0,1 +75,275,0,1 +75,250,0,1 +75,225,0,1 +75,200,0,1 +75,175,0,1 +75,150,0,1 +75,125,0,1 +75,100,0,1 +75,75,0,1 +75,50,0,1 +75,25,0,1 +75,0,0,1 +75,-350,0,1 +75,-325,0,1 +75,-300,0,1 +75,-275,0,1 +75,-250,0,1 +75,-225,0,1 +75,-200,0,1 +75,-175,0,1 +75,-150,0,1 +75,-125,0,1 +75,-100,0,1 +75,-75,0,1 +75,-50,0,1 +75,-25,0,1 +-75,350,0,1 +-75,325,0,1 +-75,300,0,1 +-75,275,0,1 +-75,250,0,1 +-75,225,0,1 +-75,200,0,1 +-75,175,0,1 +-75,150,0,1 +-75,125,0,1 +-75,100,0,1 +-75,75,0,1 +-75,50,0,1 +-75,25,0,1 +-75,0,0,1 +-75,-350,0,1 +-75,-325,0,1 +-75,-300,0,1 +-75,-275,0,1 +-75,-250,0,1 +-75,-225,0,1 +-75,-200,0,1 +-75,-175,0,1 +-75,-150,0,1 +-75,-125,0,1 +-75,-100,0,1 +-75,-75,0,1 +75,-50,0,1 +-75,-25,0,1 +100,350,0,1 +100,325,0,1 +100,300,0,1 +100,275,0,1 +100,250,0,1 +100,225,0,1 +100,200,0,1 +100,175,0,1 +100,150,0,1 +100,125,0,1 +100,100,0,1 +100,75,0,1 +100,50,0,1 +100,25,0,1 +100,0,0,1 +100,-350,0,1 +100,-325,0,1 +100,-300,0,1 +100,-275,0,1 +100,-250,0,1 +100,-225,0,1 +100,-200,0,1 +100,-175,0,1 +100,-150,0,1 +100,-125,0,1 +100,-100,0,1 +100,-75,0,1 +100,-50,0,1 +100,-25,0,1 +-100,350,0,1 +-100,325,0,1 +-100,300,0,1 +-100,275,0,1 +-100,250,0,1 +-100,225,0,1 +-100,200,0,1 +-100,175,0,1 +-100,150,0,1 +-100,125,0,1 +-100,100,0,1 +-100,75,0,1 +-100,50,0,1 +-100,25,0,1 +-100,0,0,1 +-100,-350,0,1 +-100,-325,0,1 +-100,-300,0,1 +-100,-275,0,1 +-100,-250,0,1 +-100,-225,0,1 +-100,-200,0,1 +-100,-175,0,1 +-100,-150,0,1 +-100,-125,0,1 +-100,-100,0,1 +-100,-75,0,1 +-100,-50,0,1 +-100,-25,0,1 +150,350,0,1 +150,325,0,1 +150,300,0,1 +150,275,0,1 +150,250,0,1 +150,225,0,1 +150,200,0,1 +150,175,0,1 +150,150,0,1 +150,125,0,1 +150,100,0,1 +150,75,0,1 +150,50,0,1 +150,25,0,1 +150,0,0,1 +150,-350,0,1 +150,-325,0,1 +150,-300,0,1 +150,-275,0,1 +150,-250,0,1 +150,-225,0,1 +150,-200,0,1 +150,-175,0,1 +150,-150,0,1 +150,-125,0,1 +150,-100,0,1 +150,-75,0,1 +150,-50,0,1 +150,-25,0,1 +-150,350,0,1 +-150,325,0,1 +-150,300,0,1 +-150,275,0,1 +-150,250,0,1 +-150,225,0,1 +-150,200,0,1 +-150,175,0,1 +-150,150,0,1 +-150,125,0,1 +-150,100,0,1 +-150,75,0,1 +-150,50,0,1 +-150,25,0,1 +-150,0,0,1 +-150,-350,0,1 +-150,-325,0,1 +-150,-300,0,1 +-150,-275,0,1 +-150,-250,0,1 +-150,-225,0,1 +-150,-200,0,1 +-150,-175,0,1 +-150,-150,0,1 +-150,-125,0,1 +-150,-100,0,1 +-150,-75,0,1 +-150,-50,0,1 +-150,-25,0,1 +125,350,0,1 +125,325,0,1 +125,300,0,1 +125,275,0,1 +125,250,0,1 +125,225,0,1 +125,200,0,1 +125,175,0,1 +125,150,0,1 +125,125,0,1 +125,100,0,1 +125,75,0,1 +125,50,0,1 +125,25,0,1 +125,0,0,1 +125,-350,0,1 +125,-325,0,1 +125,-300,0,1 +125,-275,0,1 +125,-250,0,1 +125,-225,0,1 +125,-200,0,1 +125,-175,0,1 +125,-150,0,1 +125,-125,0,1 +125,-100,0,1 +125,-75,0,1 +125,-50,0,1 +125,-25,0,1 +-125,350,0,1 +-125,325,0,1 +-125,300,0,1 +-125,275,0,1 +-125,250,0,1 +-125,225,0,1 +-125,200,0,1 +-125,175,0,1 +-125,150,0,1 +-125,125,0,1 +-125,100,0,1 +-125,75,0,1 +-125,50,0,1 +-125,25,0,1 +-125,0,0,1 +-125,-350,0,1 +-125,-325,0,1 +-125,-300,0,1 +-125,-275,0,1 +-125,-250,0,1 +-125,-225,0,1 +-125,-200,0,1 +-125,-175,0,1 +-125,-150,0,1 +-125,-125,0,1 +-125,-100,0,1 +-125,-75,0,1 +-125,-50,0,1 +-125,-25,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres_attractant.csv b/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres_attractant.csv new file mode 100644 index 000000000..d55f834bb --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Degradation/cells_and_fibres_attractant.csv @@ -0,0 +1,378 @@ +0,0,0,0 +85,190,0,2 +50,350,0,1 +50,325,0,1 +50,300,0,1 +50,275,0,1 +50,250,0,1 +50,225,0,1 +50,200,0,1 +50,175,0,1 +50,150,0,1 +50,125,0,1 +50,100,0,1 +50,75,0,1 +50,50,0,1 +50,25,0,1 +50,0,0,1 +50,-350,0,1 +50,-325,0,1 +50,-300,0,1 +50,-275,0,1 +50,-250,0,1 +50,-225,0,1 +50,-200,0,1 +50,-175,0,1 +50,-150,0,1 +50,-125,0,1 +50,-100,0,1 +50,-75,0,1 +50,-50,0,1 +50,-25,0,1 +-50,350,0,1 +-50,325,0,1 +-50,300,0,1 +-50,275,0,1 +-50,250,0,1 +-50,225,0,1 +-50,200,0,1 +-50,175,0,1 +-50,150,0,1 +-50,125,0,1 +-50,100,0,1 +-50,75,0,1 +-50,50,0,1 +-50,25,0,1 +-50,0,0,1 +-50,-350,0,1 +-50,-325,0,1 +-50,-300,0,1 +-50,-275,0,1 +-50,-250,0,1 +-50,-225,0,1 +-50,-200,0,1 +-50,-175,0,1 +-50,-150,0,1 +-50,-125,0,1 +-50,-100,0,1 +-50,-75,0,1 +-50,-50,0,1 +-50,-25,0,1 +25,350,0,1 +25,325,0,1 +25,300,0,1 +25,275,0,1 +25,250,0,1 +25,225,0,1 +25,200,0,1 +25,175,0,1 +25,150,0,1 +25,125,0,1 +25,100,0,1 +25,75,0,1 +25,50,0,1 +25,25,0,1 +25,0,0,1 +25,-350,0,1 +25,-325,0,1 +25,-300,0,1 +25,-275,0,1 +25,-250,0,1 +25,-225,0,1 +25,-200,0,1 +25,-175,0,1 +25,-150,0,1 +25,-125,0,1 +25,-100,0,1 +25,-75,0,1 +25,-50,0,1 +25,-25,0,1 +-25,350,0,1 +-25,325,0,1 +-25,300,0,1 +-25,275,0,1 +-25,250,0,1 +-25,225,0,1 +-25,200,0,1 +-25,175,0,1 +-25,150,0,1 +-25,125,0,1 +-25,100,0,1 +-25,75,0,1 +-25,50,0,1 +-25,25,0,1 +-25,0,0,1 +-25,-350,0,1 +-25,-325,0,1 +-25,-300,0,1 +-25,-275,0,1 +-25,-250,0,1 +-25,-225,0,1 +-25,-200,0,1 +-25,-175,0,1 +-25,-150,0,1 +-25,-125,0,1 +-25,-100,0,1 +-25,-75,0,1 +-25,-50,0,1 +-25,-25,0,1 +0,350,0,1 +0,325,0,1 +0,300,0,1 +0,275,0,1 +0,250,0,1 +0,225,0,1 +0,200,0,1 +0,175,0,1 +0,150,0,1 +0,125,0,1 +0,100,0,1 +0,75,0,1 +0,50,0,1 +0,25,0,1 +0,-350,0,1 +0,-325,0,1 +0,-300,0,1 +0,-275,0,1 +0,-250,0,1 +0,-225,0,1 +0,-200,0,1 +0,-175,0,1 +0,-150,0,1 +0,-125,0,1 +0,-100,0,1 +0,-75,0,1 +0,-50,0,1 +0,-25,0,1 +75,350,0,1 +75,325,0,1 +75,300,0,1 +75,275,0,1 +75,250,0,1 +75,225,0,1 +75,200,0,1 +75,175,0,1 +75,150,0,1 +75,125,0,1 +75,100,0,1 +75,75,0,1 +75,50,0,1 +75,25,0,1 +75,0,0,1 +75,-350,0,1 +75,-325,0,1 +75,-300,0,1 +75,-275,0,1 +75,-250,0,1 +75,-225,0,1 +75,-200,0,1 +75,-175,0,1 +75,-150,0,1 +75,-125,0,1 +75,-100,0,1 +75,-75,0,1 +75,-50,0,1 +75,-25,0,1 +-75,350,0,1 +-75,325,0,1 +-75,300,0,1 +-75,275,0,1 +-75,250,0,1 +-75,225,0,1 +-75,200,0,1 +-75,175,0,1 +-75,150,0,1 +-75,125,0,1 +-75,100,0,1 +-75,75,0,1 +-75,50,0,1 +-75,25,0,1 +-75,0,0,1 +-75,-350,0,1 +-75,-325,0,1 +-75,-300,0,1 +-75,-275,0,1 +-75,-250,0,1 +-75,-225,0,1 +-75,-200,0,1 +-75,-175,0,1 +-75,-150,0,1 +-75,-125,0,1 +-75,-100,0,1 +-75,-75,0,1 +75,-50,0,1 +-75,-25,0,1 +100,350,0,1 +100,325,0,1 +100,300,0,1 +100,275,0,1 +100,250,0,1 +100,225,0,1 +100,200,0,1 +100,175,0,1 +100,150,0,1 +100,125,0,1 +100,100,0,1 +100,75,0,1 +100,50,0,1 +100,25,0,1 +100,0,0,1 +100,-350,0,1 +100,-325,0,1 +100,-300,0,1 +100,-275,0,1 +100,-250,0,1 +100,-225,0,1 +100,-200,0,1 +100,-175,0,1 +100,-150,0,1 +100,-125,0,1 +100,-100,0,1 +100,-75,0,1 +100,-50,0,1 +100,-25,0,1 +-100,350,0,1 +-100,325,0,1 +-100,300,0,1 +-100,275,0,1 +-100,250,0,1 +-100,225,0,1 +-100,200,0,1 +-100,175,0,1 +-100,150,0,1 +-100,125,0,1 +-100,100,0,1 +-100,75,0,1 +-100,50,0,1 +-100,25,0,1 +-100,0,0,1 +-100,-350,0,1 +-100,-325,0,1 +-100,-300,0,1 +-100,-275,0,1 +-100,-250,0,1 +-100,-225,0,1 +-100,-200,0,1 +-100,-175,0,1 +-100,-150,0,1 +-100,-125,0,1 +-100,-100,0,1 +-100,-75,0,1 +-100,-50,0,1 +-100,-25,0,1 +150,350,0,1 +150,325,0,1 +150,300,0,1 +150,275,0,1 +150,250,0,1 +150,225,0,1 +150,200,0,1 +150,175,0,1 +150,150,0,1 +150,125,0,1 +150,100,0,1 +150,75,0,1 +150,50,0,1 +150,25,0,1 +150,0,0,1 +150,-350,0,1 +150,-325,0,1 +150,-300,0,1 +150,-275,0,1 +150,-250,0,1 +150,-225,0,1 +150,-200,0,1 +150,-175,0,1 +150,-150,0,1 +150,-125,0,1 +150,-100,0,1 +150,-75,0,1 +150,-50,0,1 +150,-25,0,1 +-150,350,0,1 +-150,325,0,1 +-150,300,0,1 +-150,275,0,1 +-150,250,0,1 +-150,225,0,1 +-150,200,0,1 +-150,175,0,1 +-150,150,0,1 +-150,125,0,1 +-150,100,0,1 +-150,75,0,1 +-150,50,0,1 +-150,25,0,1 +-150,0,0,1 +-150,-350,0,1 +-150,-325,0,1 +-150,-300,0,1 +-150,-275,0,1 +-150,-250,0,1 +-150,-225,0,1 +-150,-200,0,1 +-150,-175,0,1 +-150,-150,0,1 +-150,-125,0,1 +-150,-100,0,1 +-150,-75,0,1 +-150,-50,0,1 +-150,-25,0,1 +125,350,0,1 +125,325,0,1 +125,300,0,1 +125,275,0,1 +125,250,0,1 +125,225,0,1 +125,200,0,1 +125,175,0,1 +125,150,0,1 +125,125,0,1 +125,100,0,1 +125,75,0,1 +125,50,0,1 +125,25,0,1 +125,0,0,1 +125,-350,0,1 +125,-325,0,1 +125,-300,0,1 +125,-275,0,1 +125,-250,0,1 +125,-225,0,1 +125,-200,0,1 +125,-175,0,1 +125,-150,0,1 +125,-125,0,1 +125,-100,0,1 +125,-75,0,1 +125,-50,0,1 +125,-25,0,1 +-125,350,0,1 +-125,325,0,1 +-125,300,0,1 +-125,275,0,1 +-125,250,0,1 +-125,225,0,1 +-125,200,0,1 +-125,175,0,1 +-125,150,0,1 +-125,125,0,1 +-125,100,0,1 +-125,75,0,1 +-125,50,0,1 +-125,25,0,1 +-125,0,0,1 +-125,-350,0,1 +-125,-325,0,1 +-125,-300,0,1 +-125,-275,0,1 +-125,-250,0,1 +-125,-225,0,1 +-125,-200,0,1 +-125,-175,0,1 +-125,-150,0,1 +-125,-125,0,1 +-125,-100,0,1 +-125,-75,0,1 +-125,-50,0,1 +-125,-25,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Degradation/mymodel_fibre_degradation.xml b/sample_projects/physimess/config/Fibre_Degradation/mymodel_fibre_degradation.xml new file mode 100644 index 000000000..b9e704b81 --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Degradation/mymodel_fibre_degradation.xml @@ -0,0 +1,393 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 1000 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1.0 + 0.0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 1 + 10.0 + 0.5 + + true + true + + true + nutrient + 1 + + + + + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Degradation + cells_and_fibres_attractant.csv + + + + + 0 + 1 + + 1000 + false + 40.0 + 0.0 + 2.0 + 0.0 + 0.0 + 0.0 + + true + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Degradation/mymodel_matrix_degradation.xml b/sample_projects/physimess/config/Fibre_Degradation/mymodel_matrix_degradation.xml new file mode 100644 index 000000000..8db63706d --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Degradation/mymodel_matrix_degradation.xml @@ -0,0 +1,304 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 1500 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 5 + true + + + + false + + + + + false + true + true + + + + + + + 100.0 + 0.1 + + 1.0 + 0.0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0072 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 10.0 + 0.5 + + true + true + + true + nutrient + 1 + + + + + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Degradation + cells_and_fibres.csv + + + + + 0 + 1 + + 1000 + false + 40.0 + 0.0 + 2.0 + 0.0 + 0.0 + 0.0 + + + true + 0.001 + true + 10000.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + true + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Initialisation/initialfibres.csv b/sample_projects/physimess/config/Fibre_Initialisation/initialfibres.csv new file mode 100644 index 000000000..1adc217c6 --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Initialisation/initialfibres.csv @@ -0,0 +1,57 @@ +0,0,0,0 +0,-280,0,2 +-50,-280,0,2 +-110,-280,0,2 +-170,-280,0,2 +-220,-280,0,2 +-60,-230,0,2 +-110,-230,0,2 +-160,-230,0,2 +0,280,0,2 +-50,280,0,2 +-110,280,0,2 +-170,280,0,2 +-220,280,0,2 +-60,230,0,2 +-110,230,0,2 +-160,230,0,2 +-30,-200,0,1 +-30,-150,0,1 +-30,-100,0,1 +-30,-50,0,1 +-30,0,0,1 +-30,50,0,1 +-30,100,0,1 +-30,150,0,1 +-30,200,0,1 +30,-250,0,1 +30,-200,0,1 +30,-150,0,1 +30,-100,0,1 +30,-50,0,1 +30,0,0,1 +30,50,0,1 +30,100,0,1 +30,150,0,1 +30,200,0,1 +30,250,0,1 +-250,-250,0,1 +-250,-200,0,1 +-250,-150,0,1 +-250,-100,0,1 +-250,-50,0,1 +-250,-0,0,1 +-250,50,0,1 +-250,100,0,1 +-250,150,0,1 +-250,200,0,1 +-250,250,0,1 +-190,-200,0,1 +-190,-150,0,1 +-190,-100,0,1 +-190,-50,0,1 +-190,0,0,1 +-190,50,0,1 +-190,100,0,1 +-190,150,0,1 +-190,200,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation.xml b/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation.xml new file mode 100644 index 000000000..6a7ff802a --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation.xml @@ -0,0 +1,393 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 0 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1.0 + 0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 1 + 10 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Initialisation + initialfibres.csv + + + + + 0 + 0 + + 2000 + false + 75.0 + 0.0 + 2.0 + 0.0 + 0.0 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation_maze.xml b/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation_maze.xml new file mode 100644 index 000000000..820cc9919 --- /dev/null +++ b/sample_projects/physimess/config/Fibre_Initialisation/mymodel_initialisation_maze.xml @@ -0,0 +1,393 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 0 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1.0 + 0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 1 + 10 + .5 + + true + true + + true + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 0 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + + + + + 10 + 1 + 0 + 0 + + + + + + 1.0 + + + + + + + + ./config/Fibre_Initialisation + initialfibres.csv + + + + + 0 + 0 + + 2000 + false + 40.0 + 0.0 + 2.0 + 0.0 + 0.0 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Neighbours_in_voxels/mymodel_neighbours.xml b/sample_projects/physimess/config/Neighbours_in_voxels/mymodel_neighbours.xml new file mode 100644 index 000000000..8ecd379cd --- /dev/null +++ b/sample_projects/physimess/config/Neighbours_in_voxels/mymodel_neighbours.xml @@ -0,0 +1,322 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 0 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 1000 + true + + + + 1 + true + + + + false + + + + + false + false + + + + + + 10.0 + 0.1 + + 0.0 + 0 + + + + + 100.0 + 0.1 + + 1.0 + 0.0 + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 1 + 10.0 + 0.5 + + true + true + + true + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.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 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.8 + 15.12 + + + + + 0.0 + 0.0 + 0.0 + + false + true + + false + nutrient + 1 + + + + + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + + 1.0 + + + + + + + + ./config/Neighbours_in_voxels + neighbourstest.csv + + + + + 0 + + 1 + 10000 + + true + 250.0 + 0.0 + 2.0 + 0.0 + 0.0 + 0.0 + + false + 0.01 + false + 10.0 + 0.05 + 10.0 + false + + false + 1.0 + false + + 0.6 + 0.1 + 1.0 + + + \ No newline at end of file diff --git a/sample_projects/physimess/config/Neighbours_in_voxels/neighbourstest.csv b/sample_projects/physimess/config/Neighbours_in_voxels/neighbourstest.csv new file mode 100644 index 000000000..a7e96f513 --- /dev/null +++ b/sample_projects/physimess/config/Neighbours_in_voxels/neighbourstest.csv @@ -0,0 +1,9 @@ +0,0,0,1 +-140,-10,0,0 +0,-30,0,0 +5,15,0,0 +70,-10,0,0 +130,50,0,0 +150,-5,0,0 +200,-20,0,0 +260,0,0,1 \ No newline at end of file diff --git a/sample_projects/physimess/config/mymodel.xml b/sample_projects/physimess/config/mymodel.xml new file mode 100644 index 000000000..41cfbaa32 --- /dev/null +++ b/sample_projects/physimess/config/mymodel.xml @@ -0,0 +1,539 @@ + + + -400 + 400 + -400 + 400 + -10 + 10 + 20 + 20 + 20 + true + + + + 1 + min + micron + + 0.01 + 0.1 + 6 + + + + 1 + + + + output + + + 360 + true + + + + 1 + true + + + + false + + + + + false + true + true + + + + + + 100.0 + 0.1 + + 1.0 + 0 + + 0 + 0 + 0 + 0 + 0 + 0 + + + + + true + true + + + ./config/initial.mat + + + + ./config/dirichlet.mat + + + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 4.0 + 10.0 + 0.01 + 10.0 + 0.0 + + + + 1 + 10 + .5 + + true + true + + true + nutrient + 1 + + + false + false + + 0.0 + + + + + + + + 0 + 1 + 0 + 0 + + + + + 0.0 + + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + 1.0 + + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 0.0 + 0.0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 4.0 + 10.0 + 0.01 + 10.0 + 0.0 + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + false + false + + 0.0 + + + + + + + + 0 + 1 + 0 + 0 + + + + + 0.0 + + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + 1.0 + + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 0.0 + 0.0 + + + + + + 1.0 + + + + + + + + 0.0 + + + + + + 0 + + 516 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + 0.0 + + 0 + 0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + + + + + 2494 + 0.75 + 540 + 0.05 + 0.0045 + 0.0055 + 0 + 0 + 2.0 + + + + 0.4 + 10.0 + 1.25 + + 1.0 + 1.0 + 1.0 + + + 1.8 + 15.12 + + 4.0 + 10.0 + 0.01 + 10.0 + 0.0 + + + + 0 + 0 + 0 + + false + true + + false + nutrient + 1 + + + false + false + + 0.0 + + + + + + + + 10 + 1 + 0 + 0 + + + + + 0.0 + + 0.0 + 0.0 + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + 1.0 + + 0.0 + 0.0 + 0.0 + + + + + + + 0.0 + 0.0 + 0.0 + + + + + + 1.0 + + + + + + + + ./config + cells.csv + + + + + 0 + 0 + 2000 + false + 75.0 + 0.0 + 2.0 + 0.0 + 0.0 + false + 0.01 + false + 10.0 + 0.05 + false + 1.0 + false + 0.6 + 0.1 + 1.0 + true + + + \ No newline at end of file diff --git a/sample_projects/physimess/custom_modules/custom.cpp b/sample_projects/physimess/custom_modules/custom.cpp new file mode 100644 index 000000000..7c3304a3a --- /dev/null +++ b/sample_projects/physimess/custom_modules/custom.cpp @@ -0,0 +1,344 @@ +/* +############################################################################### +# 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 + 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 ); + + if (PhysiCell::parameters.bools("fibre_custom_degradation")) + cell_defaults.functions.instantiate_cell = instantiate_physimess_cell_custom_degrade; + else + cell_defaults.functions.instantiate_cell = instantiate_physimess_cell; + + cell_defaults.functions.volume_update_function = standard_volume_update_function; + cell_defaults.functions.update_velocity = physimess_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; + + cell_defaults.functions.plot_agent_SVG = fibre_agent_SVG; + cell_defaults.functions.plot_agent_legend = fibre_agent_legend; + + + /* + 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(); + + /* + 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; + + for (auto* pCD: *getFibreCellDefinitions()){ + pCD->functions.instantiate_cell = instantiate_physimess_fibre; + pCD->functions.plot_agent_SVG = fibre_agent_SVG; + pCD->functions.plot_agent_legend = fibre_agent_legend; + + } + + /* + 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; + + load_cells_from_pugixml(); + + // new fibre related parameters and bools + bool isFibreFromFile = false; + + for( int i=0; i < (*all_cells).size(); i++ ){ + + if (isFibre((*all_cells)[i])) + { + /* fibre positions are given by csv + assign fibre orientation and test whether out of bounds */ + isFibreFromFile = true; + static_cast((*all_cells)[i])->assign_fibre_orientation(); + + } + } + + /* agents have not been added from the file but do want them + create some of each agent type */ + + if(!isFibreFromFile){ + Cell* pC; + std::vector position = {0, 0, 0}; + + 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; + + if (!isFibre(pCD)) + { + for (int n = 0; n < parameters.ints("number_of_cells"); n++) { + + position[0] = Xmin + UniformRandom() * Xrange; + position[1] = Ymin + UniformRandom() * Yrange; + position[2] = Zmin + UniformRandom() * Zrange; + + pC = create_cell(*pCD); + + pC->assign_position(position); + } + } + + else + { + for ( int nf = 0 ; nf < parameters.ints("number_of_fibres") ; nf++ ) { + + position[0] = Xmin + UniformRandom() * Xrange; + position[1] = Ymin + UniformRandom() * Yrange; + position[2] = Zmin + UniformRandom() * Zrange; + + pC = create_cell(*pCD); + + static_cast(pC)->assign_fibre_orientation(); + static_cast(pC)->check_out_of_bounds(position); + + pC->assign_position(position); + } + } + } + } + + remove_physimess_out_of_bounds_fibres(); + + // std::cout << std::endl; +} + +std::vector paint_by_cell_pressure( Cell* pCell ){ + + std::vector< std::string > output( 0); + int color = (int) round( ((pCell->state.simple_pressure) / 10) * 255 ); + if(color > 255){ + color = 255; + } + char szTempString [128]; + sprintf( szTempString , "rgb(%u,0,%u)", color, 255 - color); + output.push_back( std::string("black") ); + output.push_back( szTempString ); + output.push_back( szTempString ); + output.push_back( szTempString ); + return output; +} + +std::vector my_coloring_function( Cell* pCell ) +{ + if (parameters.bools("color_cells_by_pressure")){ + return paint_by_cell_pressure(pCell); + } else { + return paint_by_number_cell_coloring(pCell); + } +} +std::vector my_coloring_function_for_substrate( double concentration, double max_conc, double min_conc ) +{ return paint_by_density_percentage( concentration, max_conc, min_conc); } + +void my_cellcount_function(char* string){ + int nb_fibres = 0; + for (Cell* cell : *all_cells) { + if (isFibre(cell)) + nb_fibres++; + } + + sprintf( string , "%lu cells, %u fibres" , all_cells->size()-nb_fibres, nb_fibres ); +} + +void custom_function( Cell* pCell, Phenotype& phenotype, double dt ) +{ return; } + +void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ) +{ return; } + +void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ) +{ return; } + +Cell* instantiate_physimess_cell() { return new PhysiMeSS_Cell; } +Cell* instantiate_physimess_fibre() { return new PhysiMeSS_Fibre; } +Cell* instantiate_physimess_cell_custom_degrade() { return new PhysiMeSS_Cell_Custom_Degrade; } + + +void PhysiMeSS_Cell_Custom_Degrade::degrade_fibre(PhysiMeSS_Fibre* pFibre) +{ + // Here this version of the degrade function takes cell pressure into account in the degradation rate + double distance = 0.0; + pFibre->nearest_point_on_fibre(position, displacement); + for (int index = 0; index < 3; index++) { + distance += displacement[index] * displacement[index]; + } + distance = std::max(sqrt(distance), 0.00001); + + + // Fibre degradation by cell - switched on by flag fibre_degradation + double stuck_threshold = PhysiCell::parameters.doubles("fibre_stuck_time"); + double pressure_threshold = PhysiCell::parameters.doubles("fibre_pressure_threshold"); + if (PhysiCell::parameters.bools("fibre_degradation") && (stuck_counter >= stuck_threshold + || state.simple_pressure > pressure_threshold)) { + // if (stuck_counter >= stuck_threshold){ + // std::cout << "Cell " << ID << " is stuck at time " << PhysiCell::PhysiCell_globals.current_time + // << " near fibre " << pFibre->ID << std::endl;; + // } + // if (state.simple_pressure > pressure_threshold){ + // std::cout << "Cell " << ID << " is under pressure of " << state.simple_pressure << " at " + // << PhysiCell::PhysiCell_globals.current_time << " near fibre " << pFibre->ID << std::endl;; + // } + displacement *= -1.0/distance; + double dotproduct = dot_product(displacement, phenotype.motility.motility_vector); + if (dotproduct >= 0) { + double rand_degradation = PhysiCell::UniformRandom(); + double prob_degradation = PhysiCell::parameters.doubles("fibre_degradation_rate"); + if (state.simple_pressure > pressure_threshold){ + prob_degradation *= state.simple_pressure; + } + if (rand_degradation <= prob_degradation) { + //std::cout << " --------> fibre " << (*other_agent).ID << " is flagged for degradation " << std::endl; + // (*other_agent).parameters.degradation_flag = true; + pFibre->flag_for_removal(); + // std::cout << "Degrading fibre agent " << pFibre->ID << " using flag for removal !!" << std::endl; + stuck_counter = 0; + } + } + } + // } +} diff --git a/sample_projects_intracellular/ode/test_sbml1/custom_modules/custom.h b/sample_projects/physimess/custom_modules/custom.h similarity index 86% rename from sample_projects_intracellular/ode/test_sbml1/custom_modules/custom.h rename to sample_projects/physimess/custom_modules/custom.h index e59d0cae5..df69fd334 100644 --- a/sample_projects_intracellular/ode/test_sbml1/custom_modules/custom.h +++ b/sample_projects/physimess/custom_modules/custom.h @@ -33,7 +33,7 @@ # # # BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # # # -# Copyright (c) 2015-2018, Paul Macklin and the PhysiCell Project # +# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or without # @@ -64,30 +64,41 @@ # # ############################################################################### */ -#ifndef __Custom_h__ -#define __Custom_h__ #include "../core/PhysiCell.h" #include "../modules/PhysiCell_standard_modules.h" +#include "../addons/PhysiMeSS/PhysiMeSS.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* ); +std::vector my_coloring_function_for_substrate( double concentration, double max_conc, double min_conc ); +void my_cellcount_function(char* string); + +// custom functions can go here + +void custom_function( Cell* pCell, Phenotype& phenotype, double dt ); +void phenotype_function( Cell* pCell, Phenotype& phenotype, double dt ); +void contact_function( Cell* pMe, Phenotype& phenoMe , Cell* pOther, Phenotype& phenoOther , double dt ); -// custom cell phenotype functions could go here -void tumor_cell_phenotype_with_signaling( Cell* pCell, Phenotype& phenotype, double dt ); -/** \brief Write Density values to output file */ -void set_input_nodes(Cell* pCell); -void from_nodes_to_cell(Cell* pCell, Phenotype& phenotype, double dt); -void color_node(Cell* pCell); +Cell* instantiate_physimess_cell(); +Cell* instantiate_physimess_fibre(); +Cell* instantiate_physimess_cell_custom_degrade(); -#endif \ No newline at end of file +class PhysiMeSS_Cell_Custom_Degrade : public PhysiMeSS_Cell +{ + public: + void degrade_fibre(PhysiMeSS_Fibre* pFibre); +}; +// void PhysiMeSS_Cell::other_degrade_fibre(PhysiMeSS_Fibre* pFibre); \ No newline at end of file diff --git a/sample_projects_intracellular/ode/ode2/main.cpp b/sample_projects/physimess/main.cpp similarity index 87% rename from sample_projects_intracellular/ode/ode2/main.cpp rename to sample_projects/physimess/main.cpp index 5d57c01be..6e611a598 100644 --- a/sample_projects_intracellular/ode/ode2/main.cpp +++ b/sample_projects/physimess/main.cpp @@ -33,7 +33,7 @@ # # # BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # # # -# Copyright (c) 2015-2018, Paul Macklin and the PhysiCell Project # +# Copyright (c) 2015-2022, Paul Macklin and the PhysiCell Project # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or without # @@ -83,20 +83,28 @@ 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] ); } + { + 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" ); } + { + 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); @@ -132,7 +140,7 @@ int main( int argc, char* argv[] ) char filename[1024]; sprintf( filename , "%s/initial" , PhysiCell_settings.folder.c_str() ); - save_PhysiCell_to_MultiCellDS_xml_pugi( filename , microenvironment , PhysiCell_globals.current_time ); + 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 @@ -142,9 +150,14 @@ int main( int argc, char* argv[] ) // for simplicity, set a pathology coloring function std::vector (*cell_coloring_function)(Cell*) = my_coloring_function; + std::vector (*substrate_coloring_function)(double, double, double) = my_coloring_function_for_substrate; + void (*cellcount_function)(char*) = my_cellcount_function; sprintf( filename , "%s/initial.svg" , PhysiCell_settings.folder.c_str() ); - SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function ); + SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function, cellcount_function); + + sprintf( filename , "%s/legend.svg" , PhysiCell_settings.folder.c_str() ); + create_plot_legend( filename , cell_coloring_function ); display_citations(); @@ -181,7 +194,7 @@ int main( int argc, char* argv[] ) { sprintf( filename , "%s/output%08u" , PhysiCell_settings.folder.c_str(), PhysiCell_globals.full_output_index ); - save_PhysiCell_to_MultiCellDS_xml_pugi( filename , microenvironment , PhysiCell_globals.current_time ); + save_PhysiCell_to_MultiCellDS_v2( filename , microenvironment , PhysiCell_globals.current_time ); } PhysiCell_globals.full_output_index++; @@ -194,7 +207,7 @@ int main( int argc, char* argv[] ) 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 ); + SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function, cellcount_function ); PhysiCell_globals.SVG_output_index++; PhysiCell_globals.next_SVG_save_time += PhysiCell_settings.SVG_save_interval; @@ -203,14 +216,8 @@ int main( int argc, char* argv[] ) // update the microenvironment microenvironment.simulate_diffusion_decay( diffusion_dt ); - - -/* double dt_intracellular = 1.0; - //std::cout << "Current_Time : " << PhysiCell_globals.current_time << " - FMOD : " << fmod(PhysiCell_globals.current_time,1.0) << std::endl; - if ( fabs((fmod (PhysiCell_globals.current_time, dt_intracellular) - 1 )) < 0.001 || (fmod (PhysiCell_globals.current_time, dt_intracellular) < 0.00001) ) - { - std::cout << "DIVIDED" <update_all_cells( PhysiCell_globals.current_time ); @@ -236,10 +243,10 @@ int main( int argc, char* argv[] ) // save a final simulation snapshot sprintf( filename , "%s/final" , PhysiCell_settings.folder.c_str() ); - save_PhysiCell_to_MultiCellDS_xml_pugi( filename , microenvironment , PhysiCell_globals.current_time ); + 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 ); + SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, cell_coloring_function, substrate_coloring_function, cellcount_function ); // timer diff --git a/sample_projects/rules_sample/config/cell_rules.csv b/sample_projects/rules_sample/config/cell_rules.csv index 0fce99aa1..2e75c81b0 100644 --- a/sample_projects/rules_sample/config/cell_rules.csv +++ b/sample_projects/rules_sample/config/cell_rules.csv @@ -24,9 +24,9 @@ M2 macrophage,necrotic debris,decreases,migration speed,0.1,0.005,4,0 M2 macrophage,volume,decreases,phagocytose dead cell,0.0,6000,4,0 // effector cells effector T cell,pro-inflammatory factor,increases,attack malignant epithelial cell,0.01,1,4,0 -effector T cell,contact with malignant epithelial cell,decreases migration speed,0.01,0.1,10,0 +effector T cell,contact with malignant epithelial cell,decreases,migration speed,0.01,0.1,10,0 effector T cell,pro-inflammatory factor,increases,migration speed,1,0.01,4,0 effector T cell,anti-inflammatory factor,increases,transform to exhausted T cell,0.001,0.5,4,0 // exhausted cells exhausted T cell,anti-inflammatory factor,decreases,migration speed,0.001,0.5,4,0 -exhausted T cell,contact with malignant epithelial cell,decreases migration speed,0.01,0.1,10,0 \ No newline at end of file +exhausted T cell,contact with malignant epithelial cell,decreases,migration speed,0.01,0.1,10,0 \ No newline at end of file diff --git a/sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/custom.cpp b/sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/custom.cpp index 02b7752de..390ffdbf4 100644 --- a/sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/custom.cpp +++ b/sample_projects_intracellular/boolean/physiboss_cell_lines/custom_modules/custom.cpp @@ -84,7 +84,10 @@ void create_cell_types( void ) 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 = NULL; diff --git a/sample_projects_intracellular/ode/ode1/Make-clang b/sample_projects_intracellular/ode/ode1/Make-clang deleted file mode 100644 index a9ceea1ec..000000000 --- a/sample_projects_intracellular/ode/ode1/Make-clang +++ /dev/null @@ -1,268 +0,0 @@ -VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) -PROGRAM_NAME := test_rr1 - -CC := g++ - -# Check for environment definitions of compiler -# e.g., on CC = g++-10 on OSX -ifdef PHYSICELL_CPP - CC := $(PHYSICELL_CPP) -endif -CC := clang++ - -# override with clang++ due to libRoadrunner macOS version relying on it -#CC := clang++ - -ARCH := native # best auto-tuning - -# CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D LIBROADRUNNER -# CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER -#CFLAGS := -march=$(ARCH) -g -fomit-frame-pointer -Xpreprocessor -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER -CFLAGS := -march=$(ARCH) -O3 -Xpreprocessor -fopenmp -std=c++11 -D ADDON_ROADRUNNER - -# OSX -PATH_TO_OMP := -L/usr/local/opt/libomp/lib -#OMP_LIB := $(PATH_TO_OMP) -lomp - -#LIBRR_DIR := /Users/heiland/libroadrunner/roadrunner-osx-10.9-cp36m -#LIBRR_LIBS := /home/heiland/libroadrunner/cpplibroadrunner-1.3.0-linux_x86_64/lib - -OSFLAG := -ifeq ($(OS),Windows_NT) - OSFLAG += -D WIN32 - OMP_LIB := - LIBRR_DIR := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m - LIBRR_LIBS := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m/bin - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) - OSFLAG += -D AMD64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE),x86) - OSFLAG += -D IA32 - endif -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - OSFLAG += -D LINUX - OMP_LIB := - LIBRR_DIR := $(HOME)/libroadrunner/libroadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - # CFLAGS := -march=$(ARCH) -g -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D LIBROADRUNNER - CFLAGS := -march=$(ARCH) -fomit-frame-pointer -m64 -std=c++11 -D ADDON_ROADRUNNER - endif - ifeq ($(UNAME_S),Darwin) -# CC := clang++ - OSFLAG += -D OSX - LIBRR_DIR := $(HOME)/libroadrunner/roadrunner-osx-10.9-cp36m - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - endif - UNAME_P := $(shell uname -p) - ifeq ($(UNAME_P),x86_64) - OSFLAG += -D AMD64 - LIBRR_DIR := $(HOME)/libroadrunner/libroadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - # CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D LIBROADRUNNER - CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - endif - ifneq ($(filter %86,$(UNAME_P)),) - OSFLAG += -D IA32 - endif - ifneq ($(filter arm%,$(UNAME_P)),) - OSFLAG += -D ARM - endif -endif - -#COMPILE_COMMAND := $(CC) $(CFLAGS) -COMPILE_COMMAND := $(CC) $(CFLAGS) $(LIBRR_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 - -PhysiCell_core_OBJECTS := PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o \ -PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_basic_signaling.o \ -PhysiCell_signal_behavior.o PhysiCell_rules.o - -PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ -PhysiCell_pugixml.o PhysiCell_settings.o - -# put your custom objects here (they should be in the custom_modules directory) - -#PhysiCell_custom_module_OBJECTS := custom.o submodel_data_structures.o internal_viral_dynamics.o internal_viral_response.o receptor_dynamics.o immune_submodels.o epithelium_submodel.o -PhysiCell_custom_module_OBJECTS := custom.o - -pugixml_OBJECTS := pugixml.o - -# PhysiBoSSa_OBJECTS := maboss_network.o maboss_intracellular.o -ROADRUNNER_OBJECTS := librr_intracellular.o - -PhysiCell_OBJECTS := $(BioFVM_OBJECTS) $(pugixml_OBJECTS) $(PhysiCell_core_OBJECTS) $(PhysiCell_module_OBJECTS) -ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) $(ROADRUNNER_OBJECTS) - -# compile the project - -#all: main.cpp $(ALL_OBJECTS) -# $(COMPILE_COMMAND) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp - -all: main.cpp $(ALL_OBJECTS) - @echo Your OS= $(OSFLAG) - @echo LIBRR_CFLAGS= $(LIBRR_CFLAGS) - @echo LIBRR_LIBS= $(LIBRR_LIBS) - @echo -# $(COMPILE_COMMAND) -L$(LIBRR_LIBS) -lroadrunner_c_api $(PATH_TO_OMP) -lomp -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -# $(COMPILE_COMMAND) -L$(LIBRR_LIBS) -lroadrunner_c_api $(OMP_LIB) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -# $(COMPILE_COMMAND) $(OMP_LIB) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -L$(LIBRR_LIBS) -lroadrunner_c_api - $(COMPILE_COMMAND) $(PATH_TO_OMP) -lomp -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -L$(LIBRR_LIBS) -lroadrunner_c_api - - @echo - @echo created $(PROGRAM_NAME) - @echo - -name: - @echo "" - @echo "Executable name is" $(PROGRAM_NAME) - @echo "" - -# PhysiCell core components - -PhysiCell_phenotype.o: ./core/PhysiCell_phenotype.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_phenotype.cpp - -PhysiCell_digital_cell_line.o: ./core/PhysiCell_digital_cell_line.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_digital_cell_line.cpp - -PhysiCell_cell.o: ./core/PhysiCell_cell.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell.cpp - -PhysiCell_cell_container.o: ./core/PhysiCell_cell_container.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell_container.cpp - -PhysiCell_standard_models.o: ./core/PhysiCell_standard_models.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_standard_models.cpp - -PhysiCell_utilities.o: ./core/PhysiCell_utilities.cpp - $(COMPILE_COMMAND) -c ./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 - -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 - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_vector.cpp - -BioFVM_agent_container.o: ./BioFVM/BioFVM_agent_container.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_agent_container.cpp - -BioFVM_mesh.o: ./BioFVM/BioFVM_mesh.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_mesh.cpp - -BioFVM_microenvironment.o: ./BioFVM/BioFVM_microenvironment.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_microenvironment.cpp - -BioFVM_solvers.o: ./BioFVM/BioFVM_solvers.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_solvers.cpp - -BioFVM_utilities.o: ./BioFVM/BioFVM_utilities.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_utilities.cpp - -BioFVM_basic_agent.o: ./BioFVM/BioFVM_basic_agent.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_basic_agent.cpp - -BioFVM_matlab.o: ./BioFVM/BioFVM_matlab.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_matlab.cpp - -BioFVM_MultiCellDS.o: ./BioFVM/BioFVM_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_MultiCellDS.cpp - -pugixml.o: ./BioFVM/pugixml.cpp - $(COMPILE_COMMAND) -c ./BioFVM/pugixml.cpp - -# standard PhysiCell modules - -PhysiCell_SVG.o: ./modules/PhysiCell_SVG.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_SVG.cpp - -PhysiCell_pathology.o: ./modules/PhysiCell_pathology.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_pathology.cpp - -PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./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 - -# user-defined PhysiCell modules - -custom.o: ./custom_modules/custom.cpp - $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp - -librr_intracellular.o: ./addons/libRoadrunner/src/librr_intracellular.cpp ./addons/libRoadrunner/src/librr_intracellular.h - $(COMPILE_COMMAND) -c ./addons/libRoadrunner/src/librr_intracellular.cpp - - -# cleanup - -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 - -reset: - cp ./config/PhysiCell_settings.xml-default ./config/PhysiCell_settings.xml - -FOLDER := output -FRAMERATE := 24 -movie: -# mencoder "mf://snapshot*.jpg" -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000:mbd=2:trell -mf fps=$(FRAMERATE):type=jpg -nosound -o out.avi -# ffmpeg -i out.avi out.mp4 - ffmpeg -r $(FRAMERATE) -f image2 -i snapshot%08d.jpg -vcodec libx264 -pix_fmt yuv420p -strict -2 -tune animation -crf 15 -acodec aac out.mp4 - #del snap*.jpg -# 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 - cp latest.zip VERSION_$(VERSION).zip - mv *.zip archives/ - -tar: - tar --ignore-failed-read -czf latest.tar Makefile* *.cpp *.h BioFVM/* config/* core/* custom_modules/* matlab/* modules/* sample_projects/* - cp latest.tar $$(date +%b_%d_%Y_%H%M).tar - cp latest.tar VERSION_$(VERSION).tar - mv *.tar archives/ - -unzip: - cp ./archives/latest.zip . - unzip latest.zip - -untar: - cp ./archives/latest.tar . - tar -xzf latest.tar diff --git a/sample_projects_intracellular/ode/ode1/Makefile b/sample_projects_intracellular/ode/ode1/Makefile deleted file mode 100644 index ddfd68a31..000000000 --- a/sample_projects_intracellular/ode/ode1/Makefile +++ /dev/null @@ -1,271 +0,0 @@ -VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) -PROGRAM_NAME := ode1 - -CC := g++ - -# Check for environment definitions of compiler -# e.g., on CC = g++-10 on OSX -ifdef PHYSICELL_CPP - CC := $(PHYSICELL_CPP) -endif - -ARCH := native # best auto-tuning - -CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - -OSFLAG := -ifeq ($(OS),Windows_NT) - OSFLAG += -D WIN32 - OMP_LIB := -# LIBRR_DIR := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m -# LIBRR_LIBS := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m/bin -# LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C -# CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - LIBRR_DIR := .\addons\libRoadrunner\roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}\include\rr\C - LIBRR_LIBS := ${LIBRR_DIR}\lib - ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) - OSFLAG += -D AMD64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE),x86) - OSFLAG += -D IA32 - endif -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - OSFLAG += -D LINUX - OMP_LIB := -# LIBRR_DIR := $(shell pwd)/intracellular_libs/roadrunner - LIBRR_DIR := ./addons/libRoadrunner/roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - endif - ifeq ($(UNAME_S),Darwin) - OSFLAG += -D OSX - LIBRR_DIR := ./addons/libRoadrunner/roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - endif - -# Not sure if useful later or not. -# UNAME_P := $(shell uname -p) -# ifeq ($(UNAME_P),x86_64) -# OSFLAG += -D AMD64 -# LIBRR_DIR := $(shell pwd)/intracellular_libs/roadrunner -# LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C -# # CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D LIBROADRUNNER -# CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER -# endif -# ifneq ($(filter %86,$(UNAME_P)),) -# OSFLAG += -D IA32 -# endif -# ifneq ($(filter arm%,$(UNAME_P)),) -# OSFLAG += -D ARM -# endif -endif - -COMPILE_COMMAND := $(CC) $(CFLAGS) $(LIBRR_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 - -PhysiCell_core_OBJECTS := PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o \ -PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_basic_signaling.o \ -PhysiCell_signal_behavior.o PhysiCell_rules.o - -PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ -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 - -pugixml_OBJECTS := pugixml.o - -ROADRUNNER_OBJECTS := librr_intracellular.o - -PhysiCell_OBJECTS := $(BioFVM_OBJECTS) $(pugixml_OBJECTS) $(PhysiCell_core_OBJECTS) $(PhysiCell_module_OBJECTS) -ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) $(ROADRUNNER_OBJECTS) - -# compile the project - -#all: main.cpp $(ALL_OBJECTS) -# $(COMPILE_COMMAND) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp - -all: libRoadrunner main.cpp $(ALL_OBJECTS) - @echo Your OS= $(OSFLAG) - @echo LIBRR_CFLAGS= $(LIBRR_CFLAGS) - @echo LIBRR_LIBS= $(LIBRR_LIBS) - @echo - $(COMPILE_COMMAND) $(OMP_LIB) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -L$(LIBRR_LIBS) -lroadrunner_c_api - @echo - @echo created $(PROGRAM_NAME) - @echo - -name: - @echo "" - @echo "Executable name is" $(PROGRAM_NAME) - @echo "" - -# PhysiCell core components - -PhysiCell_phenotype.o: ./core/PhysiCell_phenotype.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_phenotype.cpp - -PhysiCell_digital_cell_line.o: ./core/PhysiCell_digital_cell_line.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_digital_cell_line.cpp - -PhysiCell_cell.o: ./core/PhysiCell_cell.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell.cpp - -PhysiCell_cell_container.o: ./core/PhysiCell_cell_container.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell_container.cpp - -PhysiCell_standard_models.o: ./core/PhysiCell_standard_models.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_standard_models.cpp - -PhysiCell_utilities.o: ./core/PhysiCell_utilities.cpp - $(COMPILE_COMMAND) -c ./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 - -PhysiCell_signal_behavior.o: ./core/PhysiCell_signal_behavior.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_signal_behavior.cpp - -PhysiCell_basic_signaling.o: ./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 - -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 - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_vector.cpp - -BioFVM_agent_container.o: ./BioFVM/BioFVM_agent_container.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_agent_container.cpp - -BioFVM_mesh.o: ./BioFVM/BioFVM_mesh.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_mesh.cpp - -BioFVM_microenvironment.o: ./BioFVM/BioFVM_microenvironment.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_microenvironment.cpp - -BioFVM_solvers.o: ./BioFVM/BioFVM_solvers.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_solvers.cpp - -BioFVM_utilities.o: ./BioFVM/BioFVM_utilities.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_utilities.cpp - -BioFVM_basic_agent.o: ./BioFVM/BioFVM_basic_agent.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_basic_agent.cpp - -BioFVM_matlab.o: ./BioFVM/BioFVM_matlab.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_matlab.cpp - -BioFVM_MultiCellDS.o: ./BioFVM/BioFVM_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_MultiCellDS.cpp - -pugixml.o: ./BioFVM/pugixml.cpp - $(COMPILE_COMMAND) -c ./BioFVM/pugixml.cpp - -# standard PhysiCell modules - -PhysiCell_SVG.o: ./modules/PhysiCell_SVG.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_SVG.cpp - -PhysiCell_pathology.o: ./modules/PhysiCell_pathology.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_pathology.cpp - -PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./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 - -# user-defined PhysiCell modules - -libRoadrunner: -ifeq ($(OS), Windows_NT) - python beta/setup_libroadrunner.py -else - python3 beta/setup_libroadrunner.py -endif - -custom.o: ./custom_modules/custom.cpp - $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp - -librr_intracellular.o: ./addons/libRoadrunner/src/librr_intracellular.cpp ./addons/libRoadrunner/src/librr_intracellular.h - $(COMPILE_COMMAND) -c ./addons/libRoadrunner/src/librr_intracellular.cpp - - -# cleanup - -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 - -reset: - rm -f *.cpp - cp ./sample_projects/Makefile-default Makefile - 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 - -FOLDER := output -FRAMERATE := 24 -movie: -# mencoder "mf://snapshot*.jpg" -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000:mbd=2:trell -mf fps=$(FRAMERATE):type=jpg -nosound -o out.avi -# ffmpeg -i out.avi out.mp4 - ffmpeg -r $(FRAMERATE) -f image2 -i snapshot%08d.jpg -vcodec libx264 -pix_fmt yuv420p -strict -2 -tune animation -crf 15 -acodec aac out.mp4 - #del snap*.jpg -# 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 - cp latest.zip VERSION_$(VERSION).zip - mv *.zip archives/ - -tar: - tar --ignore-failed-read -czf latest.tar Makefile* *.cpp *.h BioFVM/* config/* core/* custom_modules/* matlab/* modules/* sample_projects/* - cp latest.tar $$(date +%b_%d_%Y_%H%M).tar - cp latest.tar VERSION_$(VERSION).tar - mv *.tar archives/ - -unzip: - cp ./archives/latest.zip . - unzip latest.zip - -untar: - cp ./archives/latest.tar . - tar -xzf latest.tar diff --git a/sample_projects_intracellular/ode/ode1/Readme_roadrunner.txt b/sample_projects_intracellular/ode/ode1/Readme_roadrunner.txt deleted file mode 100644 index 06f6ac758..000000000 --- a/sample_projects_intracellular/ode/ode1/Readme_roadrunner.txt +++ /dev/null @@ -1,17 +0,0 @@ - -If you get an error about the libroadrunner libraries not being found at runtime, e.g.: - -$ test_rr1 -dyld: Library not loaded: @rpath/libroadrunner_c_api.dylib - -you need to take the necessary steps on your particular operating system to allow them -to be found. -For example, on macOS, you need to do something analogous to: -export DYLD_LIBRARY_PATH=/Users/heiland/libroadrunner/roadrunner-osx-10.9-cp36m/lib -on Linux: -export LD_LIBRARY_PATH=/Users/heiland/libroadrunner/roadrunner-osx-10.9-cp36m/lib -on Windows: -go into your system settings and ... - - - diff --git a/sample_projects_intracellular/ode/ode1/config/PhysiCell_settings.xml b/sample_projects_intracellular/ode/ode1/config/PhysiCell_settings.xml deleted file mode 100644 index 0bd220cb7..000000000 --- a/sample_projects_intracellular/ode/ode1/config/PhysiCell_settings.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - -300 - 300 - -300 - 300 - -10 - 10 - 20 - 20 - 20 - true - - - - 0.5 - min - micron - - 0.01 - 0.1 - 6 - - - - 1 - - - - false - false - - - - output - - - 0.01 - true - - - - 0.01 - true - - - - false - - - - - - - 0. - 0.0 - - 99 - 0 - - - - true - true - - - ./config/initial.mat - - - - ./config/dirichlet.mat - - - - - - - - - - - - 0.0 - - - - - - 0 - - - - 0.0 - - - - - 500 - - 0.0 - 0.0 - 0.0 - - - - 100 - 0 - .9 - - false - true - - true - oxygen - 1 - - - - - ./config/Toy_oxy.xml - Oxy - - - - - - - 0 - - - diff --git a/sample_projects_intracellular/ode/ode1/config/Toy_oxy.xml b/sample_projects_intracellular/ode/ode1/config/Toy_oxy.xml deleted file mode 100644 index 759fa33ee..000000000 --- a/sample_projects_intracellular/ode/ode1/config/Toy_oxy.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - 2019-05-24T13:44:22Z - - - - - - - heiland@iu.edu - - - Heiland - Randy - - - - - Indiana University - - - - - - - - - 2019-05-24T13:44:22Z - - - - - - - - - - - - Heiland - Randy - - heiland@iu.edu - - Indiana University - - - - - - 2019-05-24T13:44:22Z - - - 2019-05-24T13:44:22Z - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2019-05-24T17:25:38Z - - - - - - - - - - - - - - - - - 2019-05-24T16:49:30Z - - - - - - - - - - - - - - - - - 2019-05-24T15:35:14Z - - - - - - - - - - - - - - - - - 2019-05-24T15:30:11Z - - - - - - - - - - - - - - Cell - Alpha - Oxy - - - - - - - diff --git a/sample_projects_intracellular/ode/ode1/custom_modules/custom.cpp b/sample_projects_intracellular/ode/ode1/custom_modules/custom.cpp deleted file mode 100644 index 89a0dc4e3..000000000 --- a/sample_projects_intracellular/ode/ode1/custom_modules/custom.cpp +++ /dev/null @@ -1,339 +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-2018, 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" -#include "../BioFVM/BioFVM.h" -using namespace BioFVM; - -// declare cell definitions here - -std::vector nodes; - -void create_cell_types( void ) -{ - // set the random seed - 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. - */ - - /* - This parses the cell definitions in the XML config file. - */ - - std::cout << "custom.cpp: before initialize_cell_definitions_from_pugixml() " << std::endl; - initialize_cell_definitions_from_pugixml(); - std::cout << "custom.cpp: after initialize_cell_definitions_from_pugixml() " << std::endl; - - /* - Put any modifications to individual cell definitions here. - - This is a good place to set custom functions. - */ - - /* - This builds the map of cell definitions and summarizes the setup. - */ - - build_cell_definitions_maps(); - std::cout << "custom.cpp: after build_cell_definitions_maps() " << std::endl; - - display_cell_definitions( std::cout ); - std::cout << "custom.cpp: after display_cell_definitions() " << std::endl; - - 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(); - - int oxygen_i = microenvironment.find_density_index( "oxygen" ); - int glucose_i = microenvironment.find_density_index( "glucose" ); - std::cout << "---------- setup_microenv\n"; - std::cout << " oxygen_i = " << oxygen_i << std::endl; - std::cout << " glucose_i = " << glucose_i << std::endl; - double oxy = 38.0; // IC - double oxy_del = 9.0; - double glu = 32.0; // IC - double glu_del = 7.5; - double x; - // double xmin = -750.; - double xmin = -400.; - int nregions = 5; - // nregions = 800; - // oxy_del = oxy/nregions; - // glu_del = glu/nregions; - // double xdel = 1500./nregions; - double xdel = -2*xmin/nregions; - // 5 regions across x: [-750:-450:-150:150:450:750] - std::cout << "setup_microenvironment: num voxels= " << microenvironment.number_of_voxels() << std::endl; -#undef substrate_regions -#ifdef substrate_regions - for( int n=0; n < microenvironment.number_of_voxels(); n++ ) - { - // x coordinate of the nth voxel's center - x = microenvironment.mesh.voxels[n].center[0]; - for( int iregion=1; iregion <= nregions; iregion++ ) - { - if (x < (xmin + iregion*xdel)) - { - microenvironment(n)[oxygen_i] = oxy - (iregion-1)*oxy_del; - microenvironment(n)[glucose_i] = glu - (iregion-1)*glu_del; - break; - } - // oxy -= iregion-5; - // glu -= iregion-2; - } - } -#endif - - return; -} - -void setup_tissue( void ) -{ - int retval; - - std::cout << "\n------- start " << __FUNCTION__ << " -------------" << std::endl; - // place a cluster of tumor cells at the center - - double cell_radius = cell_defaults.phenotype.geometry.radius; - double cell_spacing = 0.95 * 2.0 * cell_radius; - - - Cell* pCell = NULL; - -#define simpletest -#ifdef simpletest - // pCell = create_cell(); // defaults to "default" cell type - // pCell->assign_position( 0. , 0. , 0.0 ); - // std::cout << "\n------- " << __FUNCTION__ << ": pheno intra = " << pCell->phenotype.intracellular << std::endl; - // std::cout << "------------ pheno intra type = " << pCell->phenotype.intracellular->type << std::endl; - // // std::cout << "------------ pheno intra sbml_filename = " << (SBMLIntracellular*)(pCell->phenotype.intracellular)->sbml_filename << std::endl; - // std::cout << "------------ pheno intra get_state = " << pCell->phenotype.intracellular->get_state() << std::endl; - - // pCell = create_cell(); - pCell = create_cell(get_cell_definition("default")); - std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - // pCell = create_cell(cell_defaults); - pCell->phenotype.intracellular->start(); - pCell->assign_position( -50, -30 , 0.0 ); - std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - - // std::cout << __FUNCTION__ << "------------ pheno intra type = " << pCell->phenotype.intracellular->intracellular_type << std::endl; - // std::cout << __FUNCTION__ << "------------ pheno intra sbml_filename = " << pCell->phenotype.intracellular->sbml_filename << std::endl; - // std::cout << "------------ pheno intra sbml_filename = " << (SBMLIntracellular*)(pCell->phenotype.intracellular)->sbml_filename << std::endl; - // std::string str_retval = pCell->phenotype.intracellular->get_state(); - // std::cout << __FUNCTION__ << "------------ pheno intra get_state() retval = " << str_retval << std::endl; - - pCell = create_cell(); - // std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - // retval = pCell->phenotype.intracellular->start(); - - // Override (nullify) the intracellular model so that it doesn't exist. - pCell->phenotype.intracellular = NULL; - std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - pCell->assign_position( 0, 0 , 0.0 ); - - // retval = pCell->phenotype.intracellular->start(); - - // std::cout << __FUNCTION__ << "------------ pheno intra start() retval = " << retval << std::endl; - // std::cout << __FUNCTION__ << "------------ pheno intra start() = " << (pCell->phenotype.intracellular)->start() << std::endl; - - // std::cout << "------------ pheno intra update() = " << pCell->phenotype.intracellular->update() << std::endl; - - - // pCell = create_cell(get_cell_definition("default")); - pCell = create_cell(); - std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - pCell->phenotype.intracellular->start(); - std::cout << __FUNCTION__ << ": cell ID= " << pCell->ID <<": ------------ pheno intra = " << pCell->phenotype.intracellular << std::endl; - pCell->assign_position( 50, 50 , 0.0 ); - -#else - - double tumor_radius = parameters.doubles("tumor_radius"); // 200.0; - double x = 0.0; - double x_outer = tumor_radius; - double y = 0.0; - - int n = 0; - // while( y < tumor_radius ) // to just create cells at y=0 - cell_spacing *= 4; // spread them out - { - x = 0.0; - if( n % 2 == 1 ) - { x = 0.5*cell_spacing; } - x_outer = sqrt( tumor_radius*tumor_radius - y*y ); - - while( x < x_outer ) - { - pCell = create_cell(); // tumor cell - pCell->assign_position( x , y , 0.0 ); - - // if( fabs( y ) > 0.01 ) - // { - // pCell = create_cell(); // tumor cell - // pCell->assign_position( x , -y , 0.0 ); - // } - - if( fabs( x ) > 0.01 ) - { - pCell = create_cell(); // tumor cell - pCell->assign_position( -x , y , 0.0 ); - - // SBMLIntracellular* mysbml = getSBMLModel(pCell->phenotype); - - // std::cout << "-- create_cell: sbml file= "<< pCell->phenotype.intracellular->sbml_filename << std::endl; - - // rrc::RRHandle rrHandle = createRRInstance(); - // pC->phenotype.molecular.model_rr = rrHandle; // assign the intracellular model to each cell - // int r = rrc::getNumberOfReactions(rrHandle); - - // if( fabs( y ) > 0.01 ) - // { - // pCell = create_cell(); // tumor cell - // pCell->assign_position( -x , -y , 0.0 ); - // } - } - x += cell_spacing; - - } - - y += cell_spacing * sqrt(3.0)/2.0; - n++; - } -#endif - - std::cout << "------- end " << __FUNCTION__ << " -------------\n" << std::endl; - return; -} - -// This may need to be done more frequently than dt_phenotype; may need to put in main.cpp -void tumor_cell_phenotype_with_signaling( Cell* pCell, Phenotype& phenotype, double dt ) -{ - - std::cout << "-------------------- tumor_cell_phenotype_with_signaling called ------------------\n"; - if (pCell->phenotype.intracellular->need_update() ) - { - // if (PhysiCell::PhysiCell_globals.current_time >= 100.0) - // pCell->type == get_cell_definition("last_one").type - // && PhysiCell::PhysiCell_globals.current_time >= 100.0 - // && pCell->phenotype.intracellular->get_parameter_value("$time_scale") == 0.0 - // ) - // pCell->phenotype.intracellular->set_parameter_value("$time_scale", 0.1); - - // set_input_nodes(pCell); - - pCell->phenotype.intracellular->update(); - - // from_nodes_to_cell(pCell, phenotype, dt); - // color_node(pCell); - } -} - - -// void set_input_nodes(Cell* pCell) {} - -// void from_nodes_to_cell(Cell* pCell, Phenotype& phenotype, double dt) {} - - -std::vector my_coloring_function( Cell* pCell ) -{ - std::vector< std::string > output( 4 , "rgb(0,0,0)" ); - - // if ( !pCell->phenotype.intracellular->get_boolean_node_value( parameters.strings("node_to_visualize") ) ) - if (true) - { - output[0] = "rgb(255,0,0)"; - output[2] = "rgb(125,0,0)"; - - } - else{ - output[0] = "rgb(0, 255,0)"; - output[2] = "rgb(0, 125,0)"; - } - - return output; -} - -// void color_node(Cell* pCell){ -// std::string node_name = parameters.strings("node_to_visualize"); -// pCell->custom_data[node_name] = pCell->phenotype.intracellular->get_boolean_node_value(node_name); -// } \ No newline at end of file diff --git a/sample_projects_intracellular/ode/ode1/custom_modules/custom.h b/sample_projects_intracellular/ode/ode1/custom_modules/custom.h deleted file mode 100644 index e59d0cae5..000000000 --- a/sample_projects_intracellular/ode/ode1/custom_modules/custom.h +++ /dev/null @@ -1,93 +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-2018, 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. # -# # -############################################################################### -*/ -#ifndef __Custom_h__ -#define __Custom_h__ - -#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 cell phenotype functions could go here -void tumor_cell_phenotype_with_signaling( Cell* pCell, Phenotype& phenotype, double dt ); -/** \brief Write Density values to output file */ -void set_input_nodes(Cell* pCell); -void from_nodes_to_cell(Cell* pCell, Phenotype& phenotype, double dt); -void color_node(Cell* pCell); - -#endif \ No newline at end of file diff --git a/sample_projects_intracellular/ode/ode1/main.cpp b/sample_projects_intracellular/ode/ode1/main.cpp deleted file mode 100644 index f955935f5..000000000 --- a/sample_projects_intracellular/ode/ode1/main.cpp +++ /dev/null @@ -1,305 +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-2018, 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; - -// globals: indices to microenv substrates -int oxygen_i; - -void update_intracellular() -{ - int retval; - - // rwh: todo: optimize - // If we know for certain that the intracellular updates happen at every dt_diffusion, then do it here? - // #pragma omp parallel for - for( int i=0; i < (*all_cells).size(); i++ ) - { - // if( ((*all_cells)[i]->phenotype.intracellular != NULL ) && ((*all_cells)[i]->is_out_of_domain == false ) ) - if( (*all_cells)[i]->is_out_of_domain == false ) - { - std::cout << "main.cpp: update_intracellular(): ID = " << (*all_cells)[i]->ID << std::endl; - // if( (*all_cells)[i]->phenotype.intracellular->enabled == false ) - if( (*all_cells)[i]->phenotype.intracellular == NULL ) - { - // std::cout << "main.cpp: cell ID= " << (*all_cells)[i]->ID << " intracellular is disabled\n"; - std::cout << "main.cpp: cell ID= " << (*all_cells)[i]->ID << " has NULL intracellular\n"; - } - else - { - // Find voxel index for this cell - int vi = microenvironment.nearest_voxel_index((*all_cells)[i]->position); - - // Obtain substrate value(s) for this voxel and update the corresponding species in SBML - double oxy_val = microenvironment(vi)[oxygen_i]; - std::cout << "main.cpp: oxy_val (from substrate)= " << oxy_val << std::endl; - (*all_cells)[i]->phenotype.intracellular->set_parameter_value("Oxy",oxy_val); - - (*all_cells)[i]->phenotype.intracellular->update(); // run solver - - oxy_val = (*all_cells)[i]->phenotype.intracellular->get_parameter_value("Oxy"); - std::cout << "main.cpp: oxy_val (from intracellular) = " << oxy_val << std::endl; - microenvironment(vi)[oxygen_i] = oxy_val; - } - } - } - // std::exit(-1); -} - -int main( int argc, char* argv[] ) -{ - - // load and parse settings file(s) - bool XML_status = false; - if( argc > 1 ) - { XML_status = load_PhysiCell_config_file( argv[1] ); } - else - { XML_status = load_PhysiCell_config_file( "./config/PhysiCell_settings.xml" ); } - if( !XML_status ) - { exit(-1); } - - // OpenMP setup - omp_set_num_threads(PhysiCell_settings.omp_num_threads); - - // PNRG setup - // SeedRandom(); // done in create_cell_types() - - // time setup - std::string time_units = "min"; - - /* Microenvironment setup */ - - setup_microenvironment(); // modify this in the custom code - std::cout << "main: after setup_microenvironment() " << std::endl; - oxygen_i = microenvironment.find_density_index( "oxygen" ); - std::cout << "main.cpp: oxygen_i = " << oxygen_i << std::endl; - - /* PhysiCell setup */ - - // set mechanics voxel size, and match the data structure to BioFVM - double mechanics_voxel_size = 10; - Cell_Container* cell_container = create_cell_container_for_microenvironment( microenvironment, mechanics_voxel_size ); - std::cout << "main.cpp: ----------- after create_cell_container_for_microenvironment() " << std::endl; - - /* Users typically start modifying here. START USERMODS */ - - create_cell_types(); - std::cout << "main.cpp: ----------- after create_cell_types() " << std::endl; - - setup_tissue(); - std::cout << "main.cpp: ----------- after setup_tissue() " << std::endl; - - // std::exit(-1); - - - /* 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 - - //mkdir("../output"); - - char filename[1024]; - sprintf( filename , "%s/initial" , PhysiCell_settings.folder.c_str() ); - - save_PhysiCell_to_MultiCellDS_xml_pugi( 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; - - sprintf( filename , "%s/initial.svg" , PhysiCell_settings.folder.c_str() ); - SVG_plot( filename , microenvironment, 0.0 , PhysiCell_globals.current_time, 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"<update_all_cells( PhysiCell_globals.current_time ); - - - //std::cout<< "done" << std::endl; - - 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_xml_pugi( 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 ); - - - // timer - - std::cout << std::endl << "Total simulation runtime: " << std::endl; - BioFVM::display_stopwatch_value( std::cout , BioFVM::runtime_stopwatch_value() ); - - return 0; -} \ No newline at end of file diff --git a/sample_projects_intracellular/ode/ode2/Makefile b/sample_projects_intracellular/ode/ode2/Makefile deleted file mode 100644 index c010e0925..000000000 --- a/sample_projects_intracellular/ode/ode2/Makefile +++ /dev/null @@ -1,270 +0,0 @@ -VERSION := $(shell grep . VERSION.txt | cut -f1 -d:) -PROGRAM_NAME := ode2 - -CC := g++ - -# Check for environment definitions of compiler -# e.g., on CC = g++-10 on OSX -ifdef PHYSICELL_CPP - CC := $(PHYSICELL_CPP) -endif - -ARCH := native # best auto-tuning - -CFLAGS := -march=$(ARCH) -O3 -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - -OSFLAG := -ifeq ($(OS),Windows_NT) - OSFLAG += -D WIN32 - OMP_LIB := -# LIBRR_DIR := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m -# LIBRR_LIBS := C:\Users\heiland\libroadrunner\roadrunner-win64-vs14-cp35m/bin -# LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C -# CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER - LIBRR_DIR := .\addons\libRoadrunner\roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}\include\rr\C - LIBRR_LIBS := ${LIBRR_DIR}\lib - ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) - OSFLAG += -D AMD64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE),x86) - OSFLAG += -D IA32 - endif -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - OSFLAG += -D LINUX - OMP_LIB := -# LIBRR_DIR := $(HOME)/libroadrunner/libroadrunner -# LIBRR_DIR := $(shell pwd)/intracellular_libs/roadrunner - LIBRR_DIR := ./addons/libRoadrunner/roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - endif - ifeq ($(UNAME_S),Darwin) - OSFLAG += -D OSX - LIBRR_DIR := ./addons/libRoadrunner/roadrunner - LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C - LIBRR_LIBS := ${LIBRR_DIR}/lib - endif - -# Not sure if useful later or not. -# UNAME_P := $(shell uname -p) -# ifeq ($(UNAME_P),x86_64) -# OSFLAG += -D AMD64 -# LIBRR_DIR := $(shell pwd)/intracellular_libs/roadrunner -# LIBRR_CFLAGS := -I${LIBRR_DIR}/include/rr/C -# # CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D LIBROADRUNNER -# CFLAGS := -march=$(ARCH) -fomit-frame-pointer -fopenmp -m64 -std=c++11 -D ADDON_ROADRUNNER -# endif -# ifneq ($(filter %86,$(UNAME_P)),) -# OSFLAG += -D IA32 -# endif -# ifneq ($(filter arm%,$(UNAME_P)),) -# OSFLAG += -D ARM -# endif -endif - -COMPILE_COMMAND := $(CC) $(CFLAGS) $(LIBRR_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 - -PhysiCell_core_OBJECTS := PhysiCell_phenotype.o PhysiCell_cell_container.o PhysiCell_standard_models.o \ -PhysiCell_cell.o PhysiCell_custom.o PhysiCell_utilities.o PhysiCell_constants.o PhysiCell_basic_signaling.o \ -PhysiCell_signal_behavior.o PhysiCell_rules.o - -PhysiCell_module_OBJECTS := PhysiCell_SVG.o PhysiCell_pathology.o PhysiCell_MultiCellDS.o PhysiCell_various_outputs.o \ -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 - -pugixml_OBJECTS := pugixml.o - -ROADRUNNER_OBJECTS := librr_intracellular.o - -PhysiCell_OBJECTS := $(BioFVM_OBJECTS) $(pugixml_OBJECTS) $(PhysiCell_core_OBJECTS) $(PhysiCell_module_OBJECTS) -ALL_OBJECTS := $(PhysiCell_OBJECTS) $(PhysiCell_custom_module_OBJECTS) $(ROADRUNNER_OBJECTS) - -# compile the project - -all: libRoadrunner main.cpp $(ALL_OBJECTS) - @echo Your OS= $(OSFLAG) - @echo LIBRR_CFLAGS= $(LIBRR_CFLAGS) - @echo LIBRR_LIBS= $(LIBRR_LIBS) - @echo - $(COMPILE_COMMAND) $(OMP_LIB) -o $(PROGRAM_NAME) $(ALL_OBJECTS) main.cpp -L$(LIBRR_LIBS) -lroadrunner_c_api - @echo - @echo created $(PROGRAM_NAME) - @echo - -name: - @echo "" - @echo "Executable name is" $(PROGRAM_NAME) - @echo "" - - -# PhysiCell core components - -PhysiCell_phenotype.o: ./core/PhysiCell_phenotype.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_phenotype.cpp - -PhysiCell_digital_cell_line.o: ./core/PhysiCell_digital_cell_line.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_digital_cell_line.cpp - -PhysiCell_cell.o: ./core/PhysiCell_cell.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell.cpp - -PhysiCell_cell_container.o: ./core/PhysiCell_cell_container.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_cell_container.cpp - -PhysiCell_standard_models.o: ./core/PhysiCell_standard_models.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_standard_models.cpp - -PhysiCell_utilities.o: ./core/PhysiCell_utilities.cpp - $(COMPILE_COMMAND) -c ./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 - -PhysiCell_signal_behavior.o: ./core/PhysiCell_signal_behavior.cpp - $(COMPILE_COMMAND) -c ./core/PhysiCell_signal_behavior.cpp - -PhysiCell_basic_signaling.o: ./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 - -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 - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_vector.cpp - -BioFVM_agent_container.o: ./BioFVM/BioFVM_agent_container.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_agent_container.cpp - -BioFVM_mesh.o: ./BioFVM/BioFVM_mesh.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_mesh.cpp - -BioFVM_microenvironment.o: ./BioFVM/BioFVM_microenvironment.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_microenvironment.cpp - -BioFVM_solvers.o: ./BioFVM/BioFVM_solvers.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_solvers.cpp - -BioFVM_utilities.o: ./BioFVM/BioFVM_utilities.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_utilities.cpp - -BioFVM_basic_agent.o: ./BioFVM/BioFVM_basic_agent.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_basic_agent.cpp - -BioFVM_matlab.o: ./BioFVM/BioFVM_matlab.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_matlab.cpp - -BioFVM_MultiCellDS.o: ./BioFVM/BioFVM_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./BioFVM/BioFVM_MultiCellDS.cpp - -pugixml.o: ./BioFVM/pugixml.cpp - $(COMPILE_COMMAND) -c ./BioFVM/pugixml.cpp - -# standard PhysiCell modules - -PhysiCell_SVG.o: ./modules/PhysiCell_SVG.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_SVG.cpp - -PhysiCell_pathology.o: ./modules/PhysiCell_pathology.cpp - $(COMPILE_COMMAND) -c ./modules/PhysiCell_pathology.cpp - -PhysiCell_MultiCellDS.o: ./modules/PhysiCell_MultiCellDS.cpp - $(COMPILE_COMMAND) -c ./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 - -# user-defined PhysiCell modules - -libRoadrunner: -ifeq ($(OS), Windows_NT) - python beta/setup_libroadrunner.py -else - python3 beta/setup_libroadrunner.py -endif - -custom.o: ./custom_modules/custom.cpp - $(COMPILE_COMMAND) -c ./custom_modules/custom.cpp - -librr_intracellular.o: ./addons/libRoadrunner/src/librr_intracellular.cpp ./addons/libRoadrunner/src/librr_intracellular.h - $(COMPILE_COMMAND) -c ./addons/libRoadrunner/src/librr_intracellular.cpp - - -# cleanup - -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 - -reset: - rm -f *.cpp - cp ./sample_projects/Makefile-default Makefile - 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 - -FOLDER := output -FRAMERATE := 24 -movie: -# mencoder "mf://snapshot*.jpg" -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000:mbd=2:trell -mf fps=$(FRAMERATE):type=jpg -nosound -o out.avi -# ffmpeg -i out.avi out.mp4 - ffmpeg -r $(FRAMERATE) -f image2 -i snapshot%08d.jpg -vcodec libx264 -pix_fmt yuv420p -strict -2 -tune animation -crf 15 -acodec aac out.mp4 - #del snap*.jpg -# 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 - cp latest.zip VERSION_$(VERSION).zip - mv *.zip archives/ - -tar: - tar --ignore-failed-read -czf latest.tar Makefile* *.cpp *.h BioFVM/* config/* core/* custom_modules/* matlab/* modules/* sample_projects/* - cp latest.tar $$(date +%b_%d_%Y_%H%M).tar - cp latest.tar VERSION_$(VERSION).tar - mv *.tar archives/ - -unzip: - cp ./archives/latest.zip . - unzip latest.zip - -untar: - cp ./archives/latest.tar . - tar -xzf latest.tar diff --git a/sample_projects_intracellular/ode/ode2/config/PhysiCell_settings.xml b/sample_projects_intracellular/ode/ode2/config/PhysiCell_settings.xml deleted file mode 100644 index d5723a892..000000000 --- a/sample_projects_intracellular/ode/ode2/config/PhysiCell_settings.xml +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - -300 - 300 - -300 - 300 - -10 - 10 - 20 - 20 - 20 - true - - - - 300 - min - micron - - 0.01 - 0.1 - 6 - - - - 1 - - - - output - - - 1 - true - - - - 1 - true - - - - false - - - - - false - false - - - - - - 0.0 - 0.0 - - 99 - 0 - - - - - 1000.0 - 0.0 - - 0 - 0.0 - - - - true - true - - - ./config/initial.mat - - - - ./config/dirichlet.mat - - - - - - - - - - - 0.0 - - - - - 0.0 - - - 0.0 - - - - 500 - 0.0 - 0.0 - 0.0 - - - 0.0 - 0.1 - .9 - - true - true - - false - oxygen - 1 - - - - - - 1.0 - 10 - 0.0 - 0 - - - - ./config/Toy_oxy_mms_tr_01.xml - - - - - - - - 0.0 - - - - - - 0 - - - diff --git a/sample_projects_intracellular/ode/ode2/config/Toy_oxy_mms_tr_01.xml b/sample_projects_intracellular/ode/ode2/config/Toy_oxy_mms_tr_01.xml deleted file mode 100644 index 675113846..000000000 --- a/sample_projects_intracellular/ode/ode2/config/Toy_oxy_mms_tr_01.xml +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - - - - - - 2019-05-24T13:44:22Z - - - - - - - heiland@iu.edu - - - Heiland - Randy - - - - - Indiana University - - - - - - - - - 2019-05-24T13:44:22Z - - - - - - - - - - - - Heiland - Randy - - heiland@iu.edu - - Indiana University - - - - - - 2019-05-24T13:44:22Z - - - 2019-05-24T13:44:22Z - - - - - - - - - - v - - v - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2019-05-24T17:25:38Z - - - - - - - - - - - - - - - - - 2019-05-24T16:49:30Z - - - - - - - - - - - - - - - 2021-02-12T12:54:30Z - - - - - - - - - - - - - - - 2021-02-12T12:56:00Z - - - - - - - - - - - - - - - 2021-02-12T14:53:48Z - - - - - - - - - - - - - - - 2021-02-12T14:59:54Z - - - - - - - - - - - - - - - - - 2019-05-24T15:35:14Z - - - - - - - - - - - - - - - - - 2019-05-24T15:30:11Z - - - - - - - - - - - - - - Cell - Alpha - Oxy - - - - - - - - - - - - 2021-02-12T13:27:00Z - - - - - - - - - - - - - - Cell - - Constant_flux__irreversible_0 - v - - - - - - - - - - - - - - - - 2021-02-12T14:43:58Z - - - - - - - - - - - - - - - - - Cell - - Constant_flux__irreversible_0 - v - - - - - - - - - - - - - - - - 2021-02-12T14:59:22Z - - - - - - - - - - - - - - Cell - - Constant_flux__irreversible_0 - v - - - - - - - - - - - - - - - - - - 2021-05-05T14:36:39Z - - - - - - - - - - - Oxy - 50 - - - - - - 0 - - - - - - 100 - - - - - - - diff --git a/sample_projects_intracellular/ode/ode_energy/Makefile b/sample_projects_intracellular/ode/ode_energy/Makefile index 5b1357586..42168464c 100644 --- a/sample_projects_intracellular/ode/ode_energy/Makefile +++ b/sample_projects_intracellular/ode/ode_energy/Makefile @@ -227,7 +227,7 @@ data-cleanup: touch ./output/empty.txt reset: - rm -f *.cpp + rm -f *.cpp PhysiCell_cell.o cp ./sample_projects/Makefile-default Makefile rm -f ./custom_modules/* touch ./custom_modules/empty.txt @@ -236,8 +236,12 @@ reset: rm ALL_CITATIONS.txt cp ./config/PhysiCell_settings-backup.xml ./config/PhysiCell_settings.xml touch ./config/empty.csv - rm ./config/*.csv - + rm ./config/*.csv + rm ./config/*.m + rm ./config/*.cps + rm ./config/Toy_Metabolic_Model.xml + + FOLDER := output FRAMERATE := 24 movie: diff --git a/sample_projects_intracellular/ode/ode_energy/config/PhysiCell_settings.xml b/sample_projects_intracellular/ode/ode_energy/config/PhysiCell_settings.xml index 41901eff6..5a19b3905 100644 --- a/sample_projects_intracellular/ode/ode_energy/config/PhysiCell_settings.xml +++ b/sample_projects_intracellular/ode/ode_energy/config/PhysiCell_settings.xml @@ -35,7 +35,7 @@ # # # BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) # # # -# Copyright (c) 2015-2018, Paul Macklin and the PhysiCell Project # +# Copyright (c) 2015-2021, Paul Macklin and the PhysiCell Project # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or without # @@ -87,7 +87,7 @@ - 1440 + 1440 min micron @@ -120,7 +120,8 @@ false - false + true + false @@ -131,26 +132,29 @@ 38 0 - + - + + + 300.0 0.0 50 - 0.0 + 0 + 300.0 0.0 - 0 - 0.0 + 0 + 0 - + false true @@ -169,51 +173,99 @@ - - - 0.0000000001 - - + + 0.0 + + + 0.0 + + 0.0 + + + 0.05 + 0 + 1.66667e-02 + 5.83333e-03 + 0 + 2.0 + + 0.0 + + + + 0.0 + 0.0 + + + + 1.11667e-2 + 8.33333e-4 + 5.33333e-5 + 2.16667e-3 + 0 + 2.0 + + 2494 - 0.0 0.75 540 - - 0.5 - 0.045 - 0.55 + + 0.05 + 0.0045 + 0.0055 0 0 2.0 - - - 0.0 + + + 0.4 + 10.0 + 1.25 + + 1 + + + 1.8 + 15.12 + + 4.0 + 10.0 + 0.01 + 0.0 + 0.0 + + + + 0.0 0.1 .9 + true true - + false oxygen 1 - - + + 0.0 0.0 @@ -233,7 +285,26 @@ 0 - + + + 0 + + 0 + + + 0 + + 1 + + 0 + + + + + 0 + + + ./config/Toy_Metabolic_Model.xml 0.01 @@ -245,15 +316,34 @@ + + - + 0.0 0.0 0.0 0.0 - + + + + + ./config + cells.csv + + + + + + + ./config + cell_rules.csv + + + + 0 diff --git a/sample_projects_intracellular/ode/ode_energy/config/Toy_Metabolic_Model.cps b/sample_projects_intracellular/ode/ode_energy/config/Toy_Metabolic_Model.cps index 186358a1b..28a3078ff 100644 --- a/sample_projects_intracellular/ode/ode_energy/config/Toy_Metabolic_Model.cps +++ b/sample_projects_intracellular/ode/ode_energy/config/Toy_Metabolic_Model.cps @@ -1,7 +1,7 @@ - + - + @@ -28,13 +28,13 @@ Reaction scheme where the products are created from the reactants and the change - + - + 2020-02-26T17:27:54Z @@ -70,12 +70,10 @@ Reaction scheme where the products are created from the reactants and the change - + - - + + 2021-06-14T16:32:36Z @@ -83,15 +81,14 @@ Reaction scheme where the products are created from the reactants and the change - - + - + 2020-02-26T17:54:34Z @@ -101,12 +98,10 @@ Reaction scheme where the products are created from the reactants and the change - + - - + + 2020-02-26T17:28:58Z @@ -114,15 +109,12 @@ Reaction scheme where the products are created from the reactants and the change - - + - - + + 2020-02-26T17:54:35Z @@ -130,13 +122,12 @@ Reaction scheme where the products are created from the reactants and the change - - + - + 2020-02-26T18:09:03Z @@ -146,56 +137,64 @@ Reaction scheme where the products are created from the reactants and the change - + - + - 2021-06-14T16:19:30Z + 2021-06-14T16:49:25Z - + - + - 2021-06-14T16:49:25Z + 2021-06-15T16:22:51Z - + - - + + - 2021-06-15T16:22:51Z + 2021-07-07T10:38:47Z + + + + + + + + + + + + + 2021-07-09T15:25:02Z - - + - - + + 2020-02-26T17:36:18Z @@ -203,13 +202,12 @@ Reaction scheme where the products are created from the reactants and the change - - + - + 2020-02-26T17:55:59Z @@ -219,12 +217,10 @@ Reaction scheme where the products are created from the reactants and the change - + - - + + 2020-02-26T17:56:03Z @@ -232,15 +228,12 @@ Reaction scheme where the products are created from the reactants and the change - - + - - + + 2021-06-17T13:56:08Z @@ -248,17 +241,40 @@ Reaction scheme where the products are created from the reactants and the change - + + + + + + + + + 2021-07-09T15:31:16Z + + + + + + + + + + + + + 2021-07-09T15:31:17Z + + + + - + - - + + 2020-02-26T17:29:30Z @@ -266,36 +282,38 @@ Reaction scheme where the products are created from the reactants and the change - - - + + - + - + - + - + - - + + + + + + + - + - - + + 2020-02-26T17:35:05Z @@ -303,35 +321,32 @@ Reaction scheme where the products are created from the reactants and the change - - + - - + + - + - + - + - + - + - - + + 2020-02-26T17:35:09Z @@ -339,177 +354,209 @@ Reaction scheme where the products are created from the reactants and the change - - + - + - + - + - + - + - - - - 2021-06-14T16:33:02Z - - - +xmlns:dcterms="http://purl.org/dc/terms/" +xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + + - - <CN=Root,Model=New Model_1,Vector=Compartments[Intracellular],Vector=Metabolites[Lactate],Reference=Concentration> > 0.01 + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> lt <CN=Root,Model=New Model_1_1,Vector=Values[energy_death_thresh],Reference=Value> - <CN=Root,Model=New Model_1,Vector=Compartments[Intracellular],Vector=Metabolites[lactatesr],Reference=Concentration> + 0 - + - 0.01 + 8.9999999999999999e+99 - + - - - - 2021-06-14T16:33:29Z - - - +xmlns:dcterms="http://purl.org/dc/terms/" +xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + + - - <CN=Root,Model=New Model_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> < 45 + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> gt <CN=Root,Model=New Model_1_1,Vector=Values[energy_move_thresh],Reference=Value> + + 0 + - + - 9e99 + 0 - + - - - - 2021-06-15T16:23:07Z - - - +xmlns:dcterms="http://purl.org/dc/terms/" +xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + + - - <CN=Root,Model=New Model_1,Vector=Compartments[Intracellular],Vector=Metabolites[Oxygen],Reference=Concentration> > <CN=Root,Model=New Model_1,Vector=Values[oxygen_thresh],Reference=Value> + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> lt <CN=Root,Model=New Model_1_1,Vector=Values[energy_move_thresh],Reference=Value> + + 0 + - + - 0.0 + 10 - + - - - - 2021-06-15T16:25:45Z - - - +xmlns:dcterms="http://purl.org/dc/terms/" +xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + + + + + + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Lactate],Reference=Concentration> gt 0.01 + + + + + 0.0001 + + + + + + + + + - - <CN=Root,Model=New Model_1,Vector=Compartments[Intracellular],Vector=Metabolites[Oxygen],Reference=Concentration> < <CN=Root,Model=New Model_1,Vector=Values[oxygen_thresh],Reference=Value> + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> gt <CN=Root,Model=New Model_1_1,Vector=Values[energy_prolif_thresh],Reference=Value> - + - 100.0 + 0.00016666660000000001 + + + + + + + + + + + + + <CN=Root,Model=New Model_1_1,Vector=Compartments[Intracellular],Vector=Metabolites[Energy],Reference=Concentration> lt <CN=Root,Model=New Model_1_1,Vector=Values[energy_prolif_thresh],Reference=Value> + + + + + 0 - - + + + + + + + + - + - + - - - - - - - + + + + + + + + - - - - + + + + + + - - + + - <CN=Root,Model=New Model_1,Vector=Values[k_aer],Reference=InitialValue> + <CN=Root,Model=New Model_1_1,Vector=Values[k_aer],Reference=InitialValue> - - + + - <CN=Root,Model=New Model_1,Vector=Values[k_ane],Reference=InitialValue> + <CN=Root,Model=New Model_1_1,Vector=Values[k_ane],Reference=InitialValue> - - + + - <CN=Root,Model=New Model_1,Vector=Values[k_usage],Reference=InitialValue> + <CN=Root,Model=New Model_1_1,Vector=Values[k_usage],Reference=InitialValue> @@ -517,27 +564,30 @@ Reaction scheme where the products are created from the reactants and the change - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - 0 6.0221408570000005e+22 0 0 0 0 0 0 1 0.5 0.10000000000000001 5 0.10000000000000001 + 0 2.709963342e+23 0 6.0221407600000004e+22 6.0221407600000004e+22 0 0 0 0 1 0.01 0.00018000000000000001 0.0023 440 430 445 - - + + @@ -552,9 +602,11 @@ Reaction scheme where the products are created from the reactants and the change + - + + @@ -564,35 +616,38 @@ Reaction scheme where the products are created from the reactants and the change + + - + - + + - - + + - - + + @@ -613,8 +668,8 @@ Reaction scheme where the products are created from the reactants and the change - - + + @@ -626,6 +681,8 @@ Reaction scheme where the products are created from the reactants and the change + + @@ -642,10 +699,10 @@ Reaction scheme where the products are created from the reactants and the change - - + + - + @@ -653,8 +710,8 @@ Reaction scheme where the products are created from the reactants and the change - - + + @@ -668,8 +725,8 @@ Reaction scheme where the products are created from the reactants and the change - - + + @@ -681,8 +738,8 @@ Reaction scheme where the products are created from the reactants and the change - - + + @@ -705,13 +762,14 @@ Reaction scheme where the products are created from the reactants and the change - + + - + @@ -721,6 +779,8 @@ Reaction scheme where the products are created from the reactants and the change + + @@ -741,21 +801,46 @@ Reaction scheme where the products are created from the reactants and the change - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - + Automatically generated report. @@ -763,7 +848,18 @@ Reaction scheme where the products are created from the reactants and the change - + + + Automatically generated report. + +
+ + +