PhysiCell
PhysiCell copied to clipboard
conserve internalized substrates on transform
much like we chose to preserve volume on transform (#284) we should at least consider preserving internalized substrates on transform. within Cell::convert_to_cell_definition
we could go with something like the following lines (specifically those reference Molecular
)
void Cell::convert_to_cell_definition( Cell_Definition& cd )
{
Volume cell_volume = phenotype.volume;
Geometry cell_geometry = phenotype.geometry;
Molecular cell_molecular = phenotype.molecular;
// use the cell defaults;
type = cd.type;
type_name = cd.name;
custom_data = cd.custom_data; // this is kinda risky since users may want to be updating custom_data throughout
parameters = cd.parameters;
functions = cd.functions;
phenotype = cd.phenotype;
phenotype.volume = cell_volume; // leave the cell volume alone..
// ..except for the following target values
// phenotype.volume.target_solid_cytoplasmic = cd.phenotype.volume.target_solid_cytoplasmic; // gets set by standard_volume_update_function anyways
phenotype.volume.target_solid_nuclear = cd.phenotype.volume.target_solid_nuclear;
phenotype.volume.target_fluid_fraction = cd.phenotype.volume.target_fluid_fraction;
phenotype.volume.target_cytoplasmic_to_nuclear_ratio = cd.phenotype.volume.target_cytoplasmic_to_nuclear_ratio;
phenotype.volume.relative_rupture_volume = cd.phenotype.volume.relative_rupture_volume;
phenotype.geometry = cell_geometry; // leave the geometry alone
phenotype.molecular.internalized_total_substrates = cell_molecular.internalized_total_substrates;
...