Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MathCancer committed Aug 16, 2024
1 parent 111db08 commit b132a19
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion config/PhysiCell_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</domain>

<overall>
<max_time units="min">720</max_time>
<max_time units="min">1440</max_time>
<time_units>min</time_units>
<space_units>micron</space_units>
<dt_diffusion units="min">0.01</dt_diffusion>
Expand Down
3 changes: 2 additions & 1 deletion config/cell_rules.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tumor cell,damage,increases,apoptosis,9e9,30,100,0
tumor cell,apoptotic,increases,apoptotic debris secretion,1,0.5,10,1
tumor cell,necrotic,increases,necrotic debris secretion,1,0.5,10,1
// tumor cell,doxorubicin,increases,damage rate,1,0.5,4,0
tumor cell,time,decreases,damage repair rate,0,100,10,0
tumor cell,time,decreases,damage repair rate,0,15,10,0
fast T cell,damage delivered,increases,transformation to exhausted T cell,...
11 changes: 10 additions & 1 deletion config/cells.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ x,y,z,type,apoptosis,necrosis,migration speed,phagocytose apoptotic cell,phagocy
-100,115,0,fast T cell,skip,skip,0,0.00000,0.00,0.025,5,1,skip,skip
-115,100,0,fast T cell,skip,skip,0,0.00000,0.00,0.025,5,1,skip,skip
-85,100,0,fast T cell,skip,skip,0,0.00000,0.00,0.025,5,1,skip,skip
0,-100,0,tumor cell,9e9,0,0,0,0,skip,skip,skip,1,0.05
0,-100,0,tumor cell,9e9,0,0,0,0,skip,skip,skip,1,0.05
-100,-100,0,slow T cell,skip,skip,0,0.00000,0.00,0.025,50,0.1,skip,skip
-115,-100,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-107.5,-113,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-107.5,-87,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-100,-115,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-100,-85,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-92.5,-113,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-92.5,-87,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
-85,-100,0,tumor cell,0,0,0,0,0,skip,skip,skip,skip,skip
14 changes: 8 additions & 6 deletions core/PhysiCell_standard_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double
{
pCell->ingest_cell(pTarget);
phagocytosed = true; // was missing : bugfix
std::cout << "chomp apop " << PhysiCell_globals.current_time << " " << probability << std::endl;
// std::cout << "chomp apop " << PhysiCell_globals.current_time << " " << probability << std::endl;
}

// necrotic phagocytosis
Expand All @@ -1229,7 +1229,7 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double
{
pCell->ingest_cell(pTarget);
phagocytosed = true; // was missing : bugfix
std::cout << "chomp necro " << PhysiCell_globals.current_time << " " << probability << std::endl;
// std::cout << "chomp necro " << PhysiCell_globals.current_time << " " << probability << std::endl;
}

// other dead phagocytosis
Expand All @@ -1238,7 +1238,7 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double
{
pCell->ingest_cell(pTarget);
phagocytosed = true; // was missing : bugfix
std::cout << "chomp other " << PhysiCell_globals.current_time << " " << probability << std::endl;
// std::cout << "chomp other " << PhysiCell_globals.current_time << " " << probability << std::endl;
}
}
else
Expand Down Expand Up @@ -1266,13 +1266,13 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double
if( UniformRandom() < probability )
{
pCell->phenotype.cell_interactions.pAttackTarget = pTarget;
std::cout << "********* ********* ******** start atack **** " << PhysiCell_globals.current_time << std::endl;
attacked = true;

/*
std::cout << "********* ********* ******** start atack **** " << PhysiCell_globals.current_time << std::endl;
std::cout
<< "attack duration: " << pCell->phenotype.cell_interactions.attack_duration << " "
<< "attack damage rate: " << pCell->phenotype.cell_interactions.attack_damage_rate << std::endl;

*/
// spring-link these cells
attach_cells_as_spring(pCell,pTarget);
}
Expand Down Expand Up @@ -1332,12 +1332,14 @@ void standard_cell_cell_interactions( Cell* pCell, Phenotype& phenotype, double

if( UniformRandom() < probability || pTarget->phenotype.death.dead )
{
/*
std::cout << "********* ********* ******** attack done **** " << PhysiCell_globals.current_time << " "
<< probability << " "
<< "attack time: " << pTarget->state.total_attack_time << " "
<< "damage: " << pTarget->phenotype.cell_integrity.damage << " "
<< "dead? " << (int) pTarget->phenotype.death.dead << " "
<< "damage delivered: " << pCell->phenotype.cell_interactions.total_damage_delivered << std::endl;
*/

detach_cells_as_spring(pCell,pTarget);

Expand Down
20 changes: 12 additions & 8 deletions custom_modules/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,28 +216,32 @@ std::vector<std::string> my_coloring_function( Cell* pCell )
out[0] = blah;
out[2] = blah;
out[3] = blah;

if( damage > 30 )
{
std::cout << "\t" << damage << " " << get_single_behavior( pCell , "apoptosis" ) << std::endl;
}
}
return out;
}

if( pCell->type_name == "macrophage" )
{ out[0] = "maroon"; out[2] = "maroon" ; out[3] = "maroon"; return out; }
{ out[0] = "orange"; out[2] = "orange" ; out[3] = "orange"; return out; }


if( pCell->type_name == "fast T cell" )
{
std::string blah = "grey";
std::string blah = "rgb(255,164,164)";
if( get_single_signal(pCell, "attacking") > 0.5 )
{ blah = "red"; }
{ blah = "rgb(196,0,0)"; }
out[0] = blah; out[2] = blah; out[3] = blah;
return out;
}

if( pCell->type_name == "slow T cell" )
{
std::string blah = "rgb(164,255,164)";
if( get_single_signal(pCell, "attacking") > 0.5 )
{ blah = "rgb(0,128,0)"; }
out[0] = blah; out[2] = blah; out[3] = blah;
return out;
}


return out;
}
Expand Down
Binary file added out.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b132a19

Please sign in to comment.