Skip to content

Commit 8ec4290

Browse files
committed
Revert back rates as members instead of methds in secretion and molecular
1 parent 4d5f423 commit 8ec4290

File tree

18 files changed

+206
-269
lines changed

18 files changed

+206
-269
lines changed

addons/dFBA/src/dfba_intracellular.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int dFBAIntracellular::update_phenotype_parameters(PhysiCell::Phenotype& phenoty
192192
// how to rescale FBA exchanges into net_export_rates
193193
float scaling = 1;
194194
flux *= scaling;
195-
phenotype.secretion.net_export_rates()[ex_strut.density_index] = flux;
195+
phenotype.secretion.net_export_rates[ex_strut.density_index] = flux;
196196
}
197197

198198
float delta_vol = 1;

addons/libRoadrunner/src/librr_intracellular.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,24 +389,24 @@ int RoadRunnerIntracellular::update_phenotype_parameters(PhysiCell::Phenotype& p
389389
if (elm.first.substr(0,3) == "sur")
390390
{
391391
//std::cout << sub_index << std::endl;
392-
//std::cout << "Before sur1 : " << phenotype.secretion.uptake_rates()[sub_index] << std::endl;
393-
phenotype.secretion.uptake_rates()[1] = phenotype.intracellular->get_parameter_value(elm.second);
394-
//std::cout << "After sur1 : " << phenotype.secretion.uptake_rates()[sub_index] << std::endl;
392+
//std::cout << "Before sur1 : " << phenotype.secretion.uptake_rates[sub_index] << std::endl;
393+
phenotype.secretion.uptake_rates[1] = phenotype.intracellular->get_parameter_value(elm.second);
394+
//std::cout << "After sur1 : " << phenotype.secretion.uptake_rates[sub_index] << std::endl;
395395
}
396396
//secretion rate
397397
else if (elm.first.substr(0,3) == "ssr")
398398
{
399-
phenotype.secretion.secretion_rates()[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
399+
phenotype.secretion.secretion_rates[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
400400
}
401401
//secretion density
402402
else if (elm.first.substr(0,3) == "ssd")
403403
{
404-
phenotype.secretion.saturation_densities()[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
404+
phenotype.secretion.saturation_densities[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
405405
}
406406
//net export rate
407407
else if (elm.first.substr(0,3) == "ser")
408408
{
409-
phenotype.secretion.net_export_rates()[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
409+
phenotype.secretion.net_export_rates[sub_index] = phenotype.intracellular->get_parameter_value(elm.second);
410410
}
411411
else
412412
{

core/PhysiCell_cell.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ Cell* Cell::divide( )
598598
// if these are not actively tracked, they are zero anyway
599599
for ( int n = 0 ; n < phenotype.molecular.pMicroenvironment->number_of_densities() ; n++ )
600600
{
601-
phenotype.molecular.internalized_total_substrates()[n] *= 0.5;
602-
child->phenotype.molecular.internalized_total_substrates()[n] =
603-
phenotype.molecular.internalized_total_substrates()[n];
601+
phenotype.molecular.internalized_total_substrates[n] *= 0.5;
602+
child->phenotype.molecular.internalized_total_substrates[n] =
603+
phenotype.molecular.internalized_total_substrates[n];
604604
}
605605

606606
// The following is already performed by create_cell(). JULY 2017 ***
@@ -858,9 +858,9 @@ void Cell::turn_off_reactions(double dt)
858858

859859
for(int i=0;i< phenotype.secretion.pMicroenvironment->number_of_densities();i++)
860860
{
861-
phenotype.secretion.uptake_rates()[i] = 0.0;
862-
phenotype.secretion.secretion_rates()[i] = 0.0;
863-
phenotype.secretion.net_export_rates()[i] = 0.0;
861+
phenotype.secretion.uptake_rates[i] = 0.0;
862+
phenotype.secretion.secretion_rates[i] = 0.0;
863+
phenotype.secretion.net_export_rates[i] = 0.0;
864864
}
865865
set_internal_uptake_constants(dt);
866866

@@ -994,8 +994,8 @@ void Cell::copy_data(Cell* copy_me)
994994
// expected_phenotype = copy_me-> expected_phenotype; //it is taken care in set_phenotype
995995
for ( int i = 0 ; i < copy_me->phenotype.molecular.pMicroenvironment->number_of_densities() ; i++ )
996996
{
997-
phenotype.molecular.internalized_total_substrates()[i] =
998-
copy_me->phenotype.molecular.internalized_total_substrates()[i];
997+
phenotype.molecular.internalized_total_substrates[i] =
998+
copy_me->phenotype.molecular.internalized_total_substrates[i];
999999
}
10001000

10011001
return;
@@ -1476,13 +1476,13 @@ void Cell::ingest_cell( Cell* pCell_to_eat )
14761476

14771477
for ( int i = 0 ; i < pCell_to_eat->phenotype.molecular.pMicroenvironment->number_of_densities() ; i++ )
14781478
{
1479-
pCell_to_eat->phenotype.molecular.internalized_total_substrates()[i] *=
1479+
pCell_to_eat->phenotype.molecular.internalized_total_substrates[i] *=
14801480
pCell_to_eat->custom_data["fraction_transferred_when_ingested"]; //
14811481

1482-
phenotype.molecular.internalized_total_substrates()[i] +=
1483-
pCell_to_eat->phenotype.molecular.internalized_total_substrates()[i];
1482+
phenotype.molecular.internalized_total_substrates[i] +=
1483+
pCell_to_eat->phenotype.molecular.internalized_total_substrates[i];
14841484

1485-
pCell_to_eat->phenotype.molecular.internalized_total_substrates()[i] = 0.0;
1485+
pCell_to_eat->phenotype.molecular.internalized_total_substrates[i] = 0.0;
14861486
}
14871487

14881488
// conserved quantitites in custom data during phagocytosis
@@ -1647,10 +1647,10 @@ void Cell::fuse_cell( Cell* pCell_to_fuse )
16471647
// absorb the internalized substrates
16481648
for ( int i = 0 ; i < pCell_to_fuse->phenotype.molecular.pMicroenvironment->number_of_densities() ; i++ )
16491649
{
1650-
phenotype.molecular.internalized_total_substrates()[i] +=
1651-
pCell_to_fuse->phenotype.molecular.internalized_total_substrates()[i];
1650+
phenotype.molecular.internalized_total_substrates[i] +=
1651+
pCell_to_fuse->phenotype.molecular.internalized_total_substrates[i];
16521652

1653-
pCell_to_fuse->phenotype.molecular.internalized_total_substrates()[i] = 0.0;
1653+
pCell_to_fuse->phenotype.molecular.internalized_total_substrates[i] = 0.0;
16541654
}
16551655

16561656
// set target volume(s)
@@ -2135,10 +2135,10 @@ Cell_Definition* initialize_cell_definition_from_pugixml( pugi::xml_node cd_node
21352135
// secretion
21362136
for (int i = 0; i < number_of_substrates; i++ )
21372137
{
2138-
pCD->phenotype.secretion.secretion_rates()[i] = 0.0;
2139-
pCD->phenotype.secretion.uptake_rates()[i] = 0.0;
2140-
pCD->phenotype.secretion.net_export_rates()[i] = 0.0;
2141-
pCD->phenotype.secretion.saturation_densities()[i] = 0.0;
2138+
pCD->phenotype.secretion.secretion_rates[i] = 0.0;
2139+
pCD->phenotype.secretion.uptake_rates[i] = 0.0;
2140+
pCD->phenotype.secretion.net_export_rates[i] = 0.0;
2141+
pCD->phenotype.secretion.saturation_densities[i] = 0.0;
21422142
}
21432143

21442144
// interaction
@@ -2975,22 +2975,22 @@ Cell_Definition* initialize_cell_definition_from_pugixml( pugi::xml_node cd_node
29752975
// secretion rate
29762976
pugi::xml_node node_sec1 = node_sec.child( "secretion_rate" );
29772977
if( node_sec1 )
2978-
{ pS->secretion_rates()[index] = xml_get_my_double_value( node_sec1 ); }
2978+
{ pS->secretion_rates[index] = xml_get_my_double_value( node_sec1 ); }
29792979

29802980
// secretion target
29812981
node_sec1 = node_sec.child( "secretion_target" );
29822982
if( node_sec1 )
2983-
{ pS->saturation_densities()[index] = xml_get_my_double_value( node_sec1 ); }
2983+
{ pS->saturation_densities[index] = xml_get_my_double_value( node_sec1 ); }
29842984

29852985
// uptake rate
29862986
node_sec1 = node_sec.child( "uptake_rate" );
29872987
if( node_sec1 )
2988-
{ pS->uptake_rates()[index] = xml_get_my_double_value( node_sec1 ); }
2988+
{ pS->uptake_rates[index] = xml_get_my_double_value( node_sec1 ); }
29892989

29902990
// net export rate
29912991
node_sec1 = node_sec.child( "net_export_rate" );
29922992
if( node_sec1 )
2993-
{ pS->net_export_rates()[index] = xml_get_my_double_value( node_sec1 ); }
2993+
{ pS->net_export_rates[index] = xml_get_my_double_value( node_sec1 ); }
29942994

29952995
node_sec = node_sec.next_sibling( "substrate" );
29962996
}

0 commit comments

Comments
 (0)