From 7ea3e4e4d2404a27c9bd5404654315f4a8317957 Mon Sep 17 00:00:00 2001 From: Randy Heiland Date: Sat, 16 Jul 2022 21:27:20 -0400 Subject: [PATCH 01/13] fix bug for vector fwrite in _v2 --- modules/PhysiCell_MultiCellDS.cpp | 138 +++++++++++++++--------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/modules/PhysiCell_MultiCellDS.cpp b/modules/PhysiCell_MultiCellDS.cpp index c3beacf7c..6c8c6d483 100644 --- a/modules/PhysiCell_MultiCellDS.cpp +++ b/modules/PhysiCell_MultiCellDS.cpp @@ -1751,188 +1751,188 @@ void add_PhysiCell_cells_to_open_xml_pugi_v2( pugi::xml_document& xml_dom, std:: // name = "ID"; dTemp = (double) pCell->ID; - fwrite( (char*) &(dTemp) , sizeof(double) , 1 , fp ); - // name = "position"; - fwrite( (char*) &( pCell->position ) , sizeof(double) , 3 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); + // name = "position"; NOTE very different syntax for writing vectors! + std::fwrite( pCell->position.data() , sizeof(double) , 3 , fp ); // name = "total_volume"; - fwrite( (char*) &( pCell->phenotype.volume.total ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.total ) , sizeof(double) , 1 , fp ); // name = "cell_type"; dTemp = (double) pCell->type; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "cycle_model"; dTemp = (double) pCell->phenotype.cycle.model().code; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); // cycle model + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // cycle model // name = "current_phase"; dTemp = (double) pCell->phenotype.cycle.current_phase().code; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); // cycle model + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // cycle model // name = "elapsed_time_in_phase"; - fwrite( (char*) &( pCell->phenotype.cycle.data.elapsed_time_in_phase ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.cycle.data.elapsed_time_in_phase ) , sizeof(double) , 1 , fp ); // name = "nuclear_volume"; - fwrite( (char*) &( pCell->phenotype.volume.nuclear ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.nuclear ) , sizeof(double) , 1 , fp ); // name = "cytoplasmic_volume"; - fwrite( (char*) &( pCell->phenotype.volume.cytoplasmic ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.cytoplasmic ) , sizeof(double) , 1 , fp ); // name = "fluid_fraction"; - fwrite( (char*) &( pCell->phenotype.volume.fluid_fraction ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.fluid_fraction ) , sizeof(double) , 1 , fp ); // name = "calcified_fraction"; - fwrite( (char*) &( pCell->phenotype.volume.calcified_fraction ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.calcified_fraction ) , sizeof(double) , 1 , fp ); // name = "orientation"; - fwrite( (char*) &( pCell->state.orientation ) , sizeof(double) , 3 , fp ); + std::fwrite( &( pCell->state.orientation ) , sizeof(double) , 3 , fp ); // name = "polarity"; - fwrite( (char*) &( pCell->phenotype.geometry.polarity ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.geometry.polarity ) , sizeof(double) , 1 , fp ); /* state variables to save */ // state // name = "velocity"; - fwrite( (char*) &( pCell->velocity ) , sizeof(double) , 3 , fp ); + std::fwrite( pCell->velocity.data() , sizeof(double) , 3 , fp ); // name = "pressure"; - fwrite( (char*) &( pCell->state.simple_pressure ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->state.simple_pressure ) , sizeof(double) , 1 , fp ); // name = "number_of_nuclei"; dTemp = (double) pCell->state.number_of_nuclei; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "damage"; - fwrite( (char*) &( pCell->state.damage ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->state.damage ) , sizeof(double) , 1 , fp ); // name = "total_attack_time"; - fwrite( (char*) &( pCell->state.total_attack_time ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->state.total_attack_time ) , sizeof(double) , 1 , fp ); // name = "contact_with_basement_membrane"; dTemp = (double) pCell->state.contact_with_basement_membrane; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); /* now go through phenotype and state */ // cycle // current exit rate // 1 // name = "current_cycle_phase_exit_rate"; int phase_index = pCell->phenotype.cycle.data.current_phase_index; - fwrite( (char*) &( pCell->phenotype.cycle.data.exit_rate(phase_index) ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.cycle.data.exit_rate(phase_index) ) , sizeof(double) , 1 , fp ); // name = "elapsed_time_in_phase"; - fwrite( (char*) &( pCell->phenotype.cycle.data.elapsed_time_in_phase ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.cycle.data.elapsed_time_in_phase ) , sizeof(double) , 1 , fp ); // death // live or dead state // 1 // name = "dead"; dTemp = (double) pCell->phenotype.death.dead; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "current_death_model"; // dTemp = (double) pCell->phenotype.death.current_death_model_index; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "death_rates"; - fwrite( (char*) &( pCell->phenotype.death.rates ) , sizeof(double) , nd , fp ); + std::fwrite( pCell->phenotype.death.rates.data() , sizeof(double) , nd , fp ); // volume () // name = "cytoplasmic_biomass_change_rate"; - fwrite( (char*) &( pCell->phenotype.volume.cytoplasmic_biomass_change_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.cytoplasmic_biomass_change_rate ) , sizeof(double) , 1 , fp ); // name = "nuclear_biomass_change_rate"; - fwrite( (char*) &( pCell->phenotype.volume.nuclear_biomass_change_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.nuclear_biomass_change_rate ) , sizeof(double) , 1 , fp ); // name = "fluid_change_rate"; - fwrite( (char*) &( pCell->phenotype.volume.fluid_change_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.fluid_change_rate ) , sizeof(double) , 1 , fp ); // name = "calcification_rate"; - fwrite( (char*) &( pCell->phenotype.volume.calcification_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.calcification_rate ) , sizeof(double) , 1 , fp ); // name = "target_solid_cytoplasmic"; - fwrite( (char*) &( pCell->phenotype.volume.target_solid_cytoplasmic ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.target_solid_cytoplasmic ) , sizeof(double) , 1 , fp ); // name = "target_solid_nuclear"; - fwrite( (char*) &( pCell->phenotype.volume.target_solid_nuclear ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.target_solid_nuclear ) , sizeof(double) , 1 , fp ); // name = "target_fluid_fraction"; - fwrite( (char*) &( pCell->phenotype.volume.target_fluid_fraction ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.volume.target_fluid_fraction ) , sizeof(double) , 1 , fp ); // geometry // radius //1 // name = "radius"; - fwrite( (char*) &( pCell->phenotype.geometry.radius ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.geometry.radius ) , sizeof(double) , 1 , fp ); // name = "nuclear_radius"; - fwrite( (char*) &( pCell->phenotype.geometry.nuclear_radius ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.geometry.nuclear_radius ) , sizeof(double) , 1 , fp ); // name = "surface_area"; - fwrite( (char*) &( pCell->phenotype.geometry.surface_area ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.geometry.surface_area ) , sizeof(double) , 1 , fp ); // mechanics // cell_cell_adhesion_strength; // 1 // name = "cell_cell_adhesion_strength"; - fwrite( (char*) &( pCell->phenotype.mechanics.cell_cell_adhesion_strength ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.cell_cell_adhesion_strength ) , sizeof(double) , 1 , fp ); // name = "cell_BM_adhesion_strength"; - fwrite( (char*) &( pCell->phenotype.mechanics.cell_BM_adhesion_strength ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.cell_BM_adhesion_strength ) , sizeof(double) , 1 , fp ); // name = "cell_cell_repulsion_strength"; - fwrite( (char*) &( pCell->phenotype.mechanics.cell_cell_repulsion_strength ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.cell_cell_repulsion_strength ) , sizeof(double) , 1 , fp ); // name = "cell_BM_repulsion_strength"; - fwrite( (char*) &( pCell->phenotype.mechanics.cell_BM_repulsion_strength ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.cell_BM_repulsion_strength ) , sizeof(double) , 1 , fp ); // name = "cell_adhesion_affinities"; - fwrite( (char*) &( pCell->phenotype.mechanics.cell_adhesion_affinities ) , sizeof(double) , n , fp ); + std::fwrite( pCell->phenotype.mechanics.cell_adhesion_affinities.data() , sizeof(double) , n , fp ); // name = "relative_maximum_adhesion_distance"; - fwrite( (char*) &( pCell->phenotype.mechanics.relative_maximum_adhesion_distance ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.relative_maximum_adhesion_distance ) , sizeof(double) , 1 , fp ); // name = "maximum_number_of_attachments"; dTemp = (double) pCell->phenotype.mechanics.maximum_number_of_attachments; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "attachment_elastic_constant"; - fwrite( (char*) &( pCell->phenotype.mechanics.attachment_elastic_constant ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.attachment_elastic_constant ) , sizeof(double) , 1 , fp ); // name = "attachment_rate"; - fwrite( (char*) &( pCell->phenotype.mechanics.attachment_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.attachment_rate ) , sizeof(double) , 1 , fp ); // name = "detachment_rate"; - fwrite( (char*) &( pCell->phenotype.mechanics.detachment_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.mechanics.detachment_rate ) , sizeof(double) , 1 , fp ); // Motility // name = "is_motile"; dTemp = (double) pCell->phenotype.motility.is_motile; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "persistence_time"; - fwrite( (char*) &( pCell->phenotype.motility.persistence_time ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.motility.persistence_time ) , sizeof(double) , 1 , fp ); // name = "migration_speed"; - fwrite( (char*) &( pCell->phenotype.motility.migration_speed ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.motility.migration_speed ) , sizeof(double) , 1 , fp ); // name = "migration_bias_direction"; - fwrite( (char*) &( pCell->phenotype.motility.migration_bias_direction ) , sizeof(double) , 3 , fp ); + std::fwrite( pCell->phenotype.motility.migration_bias_direction.data() , sizeof(double) , 3 , fp ); // name = "migration_bias"; - fwrite( (char*) &( pCell->phenotype.motility.migration_bias ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.motility.migration_bias ) , sizeof(double) , 1 , fp ); // name = "motility_vector"; - fwrite( (char*) &( pCell->phenotype.motility.motility_vector ) , sizeof(double) , 3 , fp ); + std::fwrite( pCell->phenotype.motility.motility_vector.data() , sizeof(double) , 3 , fp ); // name = "chemotaxis_index"; dTemp = (double) pCell->phenotype.motility.chemotaxis_index; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "chemotaxis_direction"; dTemp = (double) pCell->phenotype.motility.chemotaxis_direction; - fwrite( (char*) &( dTemp ) , sizeof(double) , 1 , fp ); + std::fwrite( &( dTemp ) , sizeof(double) , 1 , fp ); // name = "chemotactic_sensitivities"; - fwrite( (char*) &( pCell->phenotype.motility.chemotactic_sensitivities ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.motility.chemotactic_sensitivities.data() , sizeof(double) , m , fp ); // secretion // name = "secretion_rates"; - fwrite( (char*) &( pCell->phenotype.secretion.secretion_rates ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.secretion.secretion_rates.data() , sizeof(double) , m , fp ); // name = "uptake_rates"; - fwrite( (char*) &( pCell->phenotype.secretion.uptake_rates ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.secretion.uptake_rates.data() , sizeof(double) , m , fp ); // name = "saturation_densities"; - fwrite( (char*) &( pCell->phenotype.secretion.saturation_densities ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.secretion.saturation_densities.data() , sizeof(double) , m , fp ); // name = "net_export_rates"; - fwrite( (char*) &( pCell->phenotype.secretion.net_export_rates ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.secretion.net_export_rates.data() , sizeof(double) , m , fp ); // molecular // name = "internalized_total_substrates"; - fwrite( (char*) &( pCell->phenotype.molecular.internalized_total_substrates ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.molecular.internalized_total_substrates.data() , sizeof(double) , m , fp ); // name = "fraction_released_at_death"; - fwrite( (char*) &( pCell->phenotype.molecular.fraction_released_at_death ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.molecular.fraction_released_at_death.data() , sizeof(double) , m , fp ); // name = "fraction_transferred_when_ingested"; - fwrite( (char*) &( pCell->phenotype.molecular.fraction_transferred_when_ingested ) , sizeof(double) , m , fp ); + std::fwrite( pCell->phenotype.molecular.fraction_transferred_when_ingested.data() , sizeof(double) , m , fp ); // interactions // name = "dead_phagocytosis_rate"; - fwrite( (char*) &( pCell->phenotype.cell_interactions.dead_phagocytosis_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.cell_interactions.dead_phagocytosis_rate ) , sizeof(double) , 1 , fp ); // name = "live_phagocytosis_rates"; - fwrite( (char*) &( pCell->phenotype.cell_interactions.live_phagocytosis_rates ) , sizeof(double) , n , fp ); + std::fwrite( pCell->phenotype.cell_interactions.live_phagocytosis_rates.data() , sizeof(double) , n , fp ); // name = "attack_rates"; - fwrite( (char*) &( pCell->phenotype.cell_interactions.attack_rates ) , sizeof(double) , n , fp ); + std::fwrite( pCell->phenotype.cell_interactions.attack_rates.data() , sizeof(double) , n , fp ); // name = "damage_rate"; - fwrite( (char*) &( pCell->phenotype.cell_interactions.damage_rate ) , sizeof(double) , 1 , fp ); + std::fwrite( &( pCell->phenotype.cell_interactions.damage_rate ) , sizeof(double) , 1 , fp ); // name = "fusion_rates"; - fwrite( (char*) &( pCell->phenotype.cell_interactions.fusion_rates ) , sizeof(double) , n , fp ); + std::fwrite( pCell->phenotype.cell_interactions.fusion_rates.data() , sizeof(double) , n , fp ); // transformations // name = "transformation_rates"; - fwrite( (char*) &( pCell->phenotype.cell_transformations.transformation_rates ) , sizeof(double) , n , fp ); + std::fwrite( pCell->phenotype.cell_transformations.transformation_rates.data() , sizeof(double) , n , fp ); // custom // custom scalar variables for( int j=0 ; j < (*all_cells)[0]->custom_data.variables.size(); j++ ) - { fwrite( (char*) &( pCell->custom_data.variables[j].value ) , sizeof(double) , 1 , fp ); } + { std::fwrite( &( pCell->custom_data.variables[j].value ) , sizeof(double) , 1 , fp ); } // custom vector variables for( int j=0 ; j < (*all_cells)[0]->custom_data.vector_variables.size(); j++ ) { int size_temp = pCell->custom_data.vector_variables[j].value.size(); - fwrite( (char*) &( pCell->custom_data.vector_variables[j].value ) , sizeof(double) , size_temp , fp ); + std::fwrite( pCell->custom_data.vector_variables[j].value.data() , sizeof(double) , size_temp , fp ); } } From a11cf9cff1dafdfef0436a8d5ef34b5a3a276698 Mon Sep 17 00:00:00 2001 From: Randy Heiland Date: Sun, 17 Jul 2022 12:02:22 -0400 Subject: [PATCH 02/13] test fwrite for C++ vector --- unit_tests/mcds_v2/README.md | 25 +++++++++++++++++++++++++ unit_tests/mcds_v2/read_vec.py | 4 ++++ unit_tests/mcds_v2/write_vec.cpp | 25 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 unit_tests/mcds_v2/README.md create mode 100644 unit_tests/mcds_v2/read_vec.py create mode 100644 unit_tests/mcds_v2/write_vec.cpp diff --git a/unit_tests/mcds_v2/README.md b/unit_tests/mcds_v2/README.md new file mode 100644 index 000000000..1f162deac --- /dev/null +++ b/unit_tests/mcds_v2/README.md @@ -0,0 +1,25 @@ +Using M1Pro (Silicon chip) with macOS 12.4 and +``` +$ g++-11 --version +g++-11 (Homebrew GCC 11.3.0_2) 11.3.0 + +$ file /opt/homebrew/bin/g++-11 +/opt/homebrew/bin/g++-11: Mach-O 64-bit executable arm64 +``` + +Using the incorrect method of writing the binary vector: +``` +$ g++-11 -std=c++11 write_vec.cpp -o write_vec +$ ./write_vec +$ python read_vec.py +5.21501721064226e-310 5.21501721064345e-310 5.21501721064345e-310 +``` + +Using the correct method of writing the binary vector: +``` +$ g++-11 -std=c++11 write_vec.cpp -o write_vec +$ ./write_vec +$ python read_vec.py +42.1 42.2 42.3 +``` + diff --git a/unit_tests/mcds_v2/read_vec.py b/unit_tests/mcds_v2/read_vec.py new file mode 100644 index 000000000..477b8d98b --- /dev/null +++ b/unit_tests/mcds_v2/read_vec.py @@ -0,0 +1,4 @@ +import numpy as np + +f=np.fromfile('test.mat',dtype='double', count=3) +print(f[0],f[1],f[2]) diff --git a/unit_tests/mcds_v2/write_vec.cpp b/unit_tests/mcds_v2/write_vec.cpp new file mode 100644 index 000000000..e6849dd5d --- /dev/null +++ b/unit_tests/mcds_v2/write_vec.cpp @@ -0,0 +1,25 @@ +// write binary data from a C++ vector: +// testing add_PhysiCell_cells_to_open_xml_pugi_v2() in modules/PhysiCell_MultiCellDS.cpp +#include +#include +#include +#include +#include + +int main() +{ + std::vector position = {42.1, 42.2, 42.3}; + + FILE* fp; + std::string filename = "test.mat"; // just mimic the binary Matlab files output for MCDS + fp = fopen( filename.c_str() , "wb" ); + if( fp == NULL ) + { + std::cout << "Error: could not open file " << filename << "!" << std::endl; + return 0; + } + + fwrite( (char*) &( position ) , sizeof(double) , 3 , fp ); // incorrect + // std::fwrite( position.data(), sizeof(position[0]) , 3 , fp ); // correct + return 0; +} \ No newline at end of file From 7c3f041c60efe7de7f177432daa7b4fa19182e25 Mon Sep 17 00:00:00 2001 From: Michael-Getz <31327120+Michael-Getz@users.noreply.github.com> Date: Mon, 18 Jul 2022 15:20:38 -0400 Subject: [PATCH 03/13] small ingest cell fix --- core/PhysiCell_cell.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/core/PhysiCell_cell.cpp b/core/PhysiCell_cell.cpp index 4325d953b..ac3fa52a4 100644 --- a/core/PhysiCell_cell.cpp +++ b/core/PhysiCell_cell.cpp @@ -1247,6 +1247,24 @@ void Cell::ingest_cell( Cell* pCell_to_eat ) << ") of size " << pCell_to_eat->phenotype.volume.total << std::endl; } */ + // mark it as dead + pCell_to_eat->phenotype.death.dead = true; + // set secretion and uptake to zero + pCell_to_eat->phenotype.secretion.set_all_secretion_to_zero( ); + pCell_to_eat->phenotype.secretion.set_all_uptake_to_zero( ); + + // deactivate all custom function + pCell_to_eat->functions.custom_cell_rule = NULL; + pCell_to_eat->functions.update_phenotype = NULL; + pCell_to_eat->functions.contact_function = NULL; + + // should set volume fuction to NULL too! + pCell_to_eat->functions.volume_update_function = NULL; + + // set cell as unmovable and non-secreting + pCell_to_eat->is_movable = false; + pCell_to_eat->is_active = false; + // absorb all the volume(s) // absorb fluid volume (all into the cytoplasm) @@ -1308,26 +1326,10 @@ void Cell::ingest_cell( Cell* pCell_to_eat ) // flag it for removal // pCell_to_eat->flag_for_removal(); - // mark it as dead - pCell_to_eat->phenotype.death.dead = true; - // set secretion and uptake to zero - pCell_to_eat->phenotype.secretion.set_all_secretion_to_zero( ); - pCell_to_eat->phenotype.secretion.set_all_uptake_to_zero( ); - - // deactivate all custom function - pCell_to_eat->functions.custom_cell_rule = NULL; - pCell_to_eat->functions.update_phenotype = NULL; - pCell_to_eat->functions.contact_function = NULL; - - // should set volume fuction to NULL too! - pCell_to_eat->functions.volume_update_function = NULL; // remove all adhesions // pCell_to_eat->remove_all_attached_cells(); - // set cell as unmovable and non-secreting - pCell_to_eat->is_movable = false; - pCell_to_eat->is_active = false; } // things that have their own thread safety From df8c9998d184e3d2680a22c14558579e737c636a Mon Sep 17 00:00:00 2001 From: Randy Heiland Date: Mon, 18 Jul 2022 16:47:38 -0400 Subject: [PATCH 04/13] download latest release as .zip --- beta/get_physicell.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 beta/get_physicell.py diff --git a/beta/get_physicell.py b/beta/get_physicell.py new file mode 100644 index 000000000..2507d5376 --- /dev/null +++ b/beta/get_physicell.py @@ -0,0 +1,19 @@ +# Python script to download the latest release of PhysiCell + +import requests + +response = requests.get("https://api.github.com/repos/MathCancer/PhysiCell/releases/latest") +release_name_str = response.json()["name"] +print(release_name_str) +print(release_name_str.split()) +vnum = release_name_str.split()[1] +print("vnum=",vnum) # e.g., vnum= 1.10.4 + +remote_url = 'https://github.com/MathCancer/PhysiCell/releases/download/' + vnum + '/PhysiCell_V.' + vnum + '.zip' +print("remote_url=",remote_url) +local_file = 'PhysiCell.zip' +data = requests.get(remote_url) +with open(local_file, 'wb')as file: + file.write(data.content) +print("downloaded version ",vnum," to ",local_file) + From aea0c2bbc79c834fb91f5966a7d9ab6a77fde928 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 17:03:45 -0400 Subject: [PATCH 05/13] Update VERSION.txt --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 62321afdc..18b311420 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.10.3 \ No newline at end of file +1.10.4 From 2834d15357feeb7d79dc85c87a65b01ee2401ae2 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 17:04:06 -0400 Subject: [PATCH 06/13] Update PhysiCell.h --- core/PhysiCell.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/PhysiCell.h b/core/PhysiCell.h index bc8476597..b2724e32f 100644 --- a/core/PhysiCell.h +++ b/core/PhysiCell.h @@ -72,7 +72,7 @@ #include #include -static std::string PhysiCell_Version = "1.10.3"; +static std::string PhysiCell_Version = "1.10.4"; static std::string PhysiCell_URL = "http://PhysiCell.MathCancer.org"; static std::string PhysiCell_DOI = "10.1371/journal.pcbi.1005991"; From 91a122760896673f016c859ad64f8036facadbb5 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 17:04:35 -0400 Subject: [PATCH 07/13] Update VERSION.txt From 35fffa70afde5ef117ec8c2e7592912f5b11e681 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 17:05:26 -0400 Subject: [PATCH 08/13] Update VERSION.txt --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 18b311420..5a68790ef 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.10.4 +1.10.4 \ No newline at end of file From 6d99270cc27f5ad4fb0894ccb738161f4e1c88b1 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 17:10:14 -0400 Subject: [PATCH 09/13] update documentation. --- CITATION.txt | 4 +- README.md | 23 ++-- changes.md | 344 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 362 insertions(+), 9 deletions(-) diff --git a/CITATION.txt b/CITATION.txt index 7d91331c6..66b1ea46d 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.10.3) [1]. +We implemented and solved the model using PhysiCell (Version 1.10.4) [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.10.3) [1]. Because PhysiCell extensively uses BioFVM, we suggest you also cite BioFVM as below: -We implemented and solved the model using PhysiCell (Version 1.10.3) [1], +We implemented and solved the model using PhysiCell (Version 1.10.4) [1], with BioFVM [2] to solve the transport equations. [1] A Ghaffarizadeh, R Heiland, SH Friedman, SM Mumenthaler, and P Macklin, diff --git a/README.md b/README.md index 0bef58397..8caf6d686 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # PhysiCell: an Open Source Physics-Based Cell Simulator for 3-D Multicellular Systems -**Version:** 1.10.3 +**Version:** 1.10.4 -**Release date:** 25 June 2022 +**Release date:** 18 July 2022 ## Overview: PhysiCell is a flexible open source framework for building agent-based multicellular models in 3-D tissue environments. @@ -63,10 +63,10 @@ Visit http://MathCancer.org/blog for the latest tutorials and help. **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 -**Old Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ +**Older Tutorials:** http://www.mathcancer.org/blog/physicell-tutorials/ **Latest info:** follow [@PhysiCell](https://twitter.com/PhysiCell) on Twitter (http://twitter.com/PhysiCell) @@ -74,12 +74,11 @@ 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. +Version 1.10.4 primarily fixes bugs in file output, 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. @@ -87,6 +86,8 @@ A blog post and tutorial on the new signal and behavior dictionaries can be foun **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 @@ -198,6 +199,8 @@ A blog post and tutorial on the new signal and behavior dictionaries can be foun + 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: @@ -240,6 +243,8 @@ A blog post and tutorial on the new signal and behavior dictionaries can be foun + `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; @@ -269,11 +274,15 @@ None in this version. See 1.10.0. + 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! ++ 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. diff --git a/changes.md b/changes.md index bbc582c2f..f2a5760e1 100644 --- a/changes.md +++ b/changes.md @@ -1,5 +1,349 @@ # 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 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! ++ 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 From 5cddf6b80a39994d2d6fcac84aff086884acc262 Mon Sep 17 00:00:00 2001 From: Randy Heiland Date: Mon, 18 Jul 2022 18:56:19 -0400 Subject: [PATCH 10/13] fix for all platforms --- beta/setup_libroadrunner.py | 66 ++++++++++++++----------------------- 1 file changed, 25 insertions(+), 41 deletions(-) diff --git a/beta/setup_libroadrunner.py b/beta/setup_libroadrunner.py index e91bb3cd2..4f2b37081 100644 --- a/beta/setup_libroadrunner.py +++ b/beta/setup_libroadrunner.py @@ -11,23 +11,6 @@ import tarfile import zipfile -def reminder_dynamic_link_path_macos(): - print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") - print("* NOTE: if you have not yet done this, you need to specify where the shared libs can be found, e.g., via bash shell:") - print('export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./addons/libRoadrunner/roadrunner/lib') - - print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.") - print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") - -def reminder_dynamic_link_path_linux(): - print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") - print("* NOTE: if you have not yet done this, you need to specify where the shared libs can be found, e.g., via bash shell:") - print('export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./addons/libRoadrunner/roadrunner/lib') - - print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.") - print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") - -# print("--------- print reminder!!!!!!!!!!!!!!\n\n") if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner")): print('\nlibroadrunner already installed.\n') @@ -40,8 +23,8 @@ def reminder_dynamic_link_path_linux(): rr_file = "" url = "" + mac_silicon = False if os_type.lower() == 'darwin': - reminder_dynamic_link_path_macos() if "ARM64" in platform.uname().version: # pass # reminder_dynamic_link_path() @@ -49,29 +32,26 @@ def reminder_dynamic_link_path_linux(): # url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/libs/macos12_arm64/libroadrunner_c_api.dylib" rr_file = "roadrunner_macos_arm64.tar.gz" url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/roadrunner_macos_arm64.tar.gz" + mac_silicon = True else: rr_file = "roadrunner-osx-10.9-cp36m.tar.gz" url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download" - # url = "https://raw.github.com/PhysiCell-Tools/intracellular_libs/blob/main/ode/libs/macos/roadrunner-osx-10.9-cp36m.tar.gz" - - # rr_file = "roadrunner-osx-10.9-cp36m.tar.gz" - # url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/libs/macos/roadrunner-osx-10.9-cp36m.tar.gz" elif os_type.lower().startswith("win"): rr_file = "roadrunner-win64-vs14-cp35m.zip" url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download" elif os_type.lower().startswith("linux"): - reminder_dynamic_link_path_linux() rr_file = "cpplibroadrunner-1.3.0-linux_x86_64.tar.gz" url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.3/" + rr_file + "/download" else: print("Your operating system seems to be unsupported. Please submit a ticket at https://sourceforge.net/p/physicell/tickets/ ") sys.exit(1) - # print("-------- past if block...") - # reminder_dynamic_link_path() - # fname = url.split('/')[-2] - fname = url.split('/')[-1] - print("fname = ",fname) + print("url=",url) + if mac_silicon: + fname = url.split('/')[-1] + else: + fname = url.split('/')[-2] + print("fname=",fname) # home = os.path.expanduser("~") print('libRoadRunner will now be installed into this location:') @@ -115,8 +95,13 @@ def reminder_dynamic_link_path_linux(): if os_type.lower().startswith("win"): rrlib_dir = my_file[:-4] else: # darwin or linux - rrlib_dir = my_file[:-7] - rrlib_dir = my_file[:-6] + if mac_silicon: + # idx_end = my_file.rindex('/') + # rrlib_dir = my_file[:idx_end] + rrlib_dir = my_file[:-7] + # rrlib_dir = my_file + else: + rrlib_dir = my_file[:-7] print('rrlib_dir = ',rrlib_dir) def download_cb(blocknum, blocksize, totalsize): @@ -133,12 +118,10 @@ def download_cb(blocknum, blocksize, totalsize): urllib.request.urlretrieve(url, my_file, download_cb) - # sys.exit(-1) - new_dir_name = "roadrunner" os.chdir(dir_name) print('installing (uncompressing) the file...') - if os_type.lower().startswith("win"): # on Windows + if os_type.lower().startswith("win"): try: with zipfile.ZipFile(rr_file) as zf: zf.extractall('.') @@ -148,23 +131,24 @@ def download_cb(blocknum, blocksize, totalsize): exit(1) else: # Darwin or Linux try: - print("-- attempt to extract from the tar file...", rr_file) + print("untarring ",rr_file) tar = tarfile.open(rr_file) tar.extractall() tar.close() if 'darwin' in os_type.lower(): - if "ARM64" in platform.uname().version: # on the new Mac M1, arm64 processor - # if False: - # print("--- TODO: rename ARM64 lib dir") - # sys.exit(-1) - pass # it already uncompresses and creates the 'roadrunner' dir + if mac_silicon: + os.rename("roadrunner_macos_arm64", new_dir_name) else: os.rename("roadrunner-osx-10.9-cp36m", new_dir_name) else: os.rename("libroadrunner", new_dir_name) except: - print('error untarring the file') - exit(1) + if mac_silicon: + print() + # pass + else: + print('error untarring the file') + exit(1) print('Done.\n') From 30d7f30eaadf5094d68f210ba6a25733d76b6eab Mon Sep 17 00:00:00 2001 From: Randy Heiland Date: Mon, 18 Jul 2022 19:06:55 -0400 Subject: [PATCH 11/13] reminder for dynamic libs path --- beta/setup_libroadrunner.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/beta/setup_libroadrunner.py b/beta/setup_libroadrunner.py index 4f2b37081..4f3156b8b 100644 --- a/beta/setup_libroadrunner.py +++ b/beta/setup_libroadrunner.py @@ -11,6 +11,22 @@ import tarfile import zipfile +def reminder_dynamic_link_path_macos(): + print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") + print("* NOTE: if you have not yet done this, you need to specify where the shared libs can be found, e.g., via bash shell:") + print('export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./addons/libRoadrunner/roadrunner/lib') + + print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.") + print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") + +def reminder_dynamic_link_path_linux(): + print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") + print("* NOTE: if you have not yet done this, you need to specify where the shared libs can be found, e.g., via bash shell:") + print('export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./addons/libRoadrunner/roadrunner/lib') + + print("\n* To make this permanent, add this line to the bottom of the respective shell startup file, e.g., .bashrc, .bash_profile, or .zshenv in your home directory.") + print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") + if os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "addons", "libRoadrunner", "roadrunner")): print('\nlibroadrunner already installed.\n') @@ -25,9 +41,9 @@ mac_silicon = False if os_type.lower() == 'darwin': + reminder_dynamic_link_path_macos() if "ARM64" in platform.uname().version: # pass - # reminder_dynamic_link_path() # print('... for the arm64 processor.') # url = "https://github.com/PhysiCell-Tools/intracellular_libs/raw/main/ode/libs/macos12_arm64/libroadrunner_c_api.dylib" rr_file = "roadrunner_macos_arm64.tar.gz" @@ -40,6 +56,7 @@ rr_file = "roadrunner-win64-vs14-cp35m.zip" url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.4.18/" + rr_file + "/download" elif os_type.lower().startswith("linux"): + reminder_dynamic_link_path_linux() rr_file = "cpplibroadrunner-1.3.0-linux_x86_64.tar.gz" url = "https://sourceforge.net/projects/libroadrunner/files/libroadrunner-1.3/" + rr_file + "/download" else: From f38236fb104fc8aaa1d3996f19b75e3e789937bb Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 21:25:49 -0400 Subject: [PATCH 12/13] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8caf6d686..702d26d0e 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ See changes.md for the full change log. * * * ## Release summary: -Version 1.10.4 primarily fixes bugs in file output, and refines thread safety in cell phagocytosis. +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. @@ -276,6 +276,7 @@ None in this version. See 1.10.0. ### 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 From c63f3d9c8a245373a777230acf8fd83050d5e6a1 Mon Sep 17 00:00:00 2001 From: Paul Macklin Date: Mon, 18 Jul 2022 21:25:55 -0400 Subject: [PATCH 13/13] Update changes.md --- changes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changes.md b/changes.md index f2a5760e1..d620a38a7 100644 --- a/changes.md +++ b/changes.md @@ -74,7 +74,7 @@ See changes.md for the full change log. * * * ## Release summary: -Version 1.10.4 primarily fixes bugs in file output, and refines thread safety in cell phagocytosis. +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. @@ -276,6 +276,7 @@ None in this version. See 1.10.0. ### 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