Repository navigation
Conversation
… mappings in some BioDynamo versions
…ic a cylindrical capsule
…python draft file to analyse the csv
…oth the basal necrosis probability and the factor
… cup both with and without aging factor. fitting oxygen_saturation_for_proliferation
…ndaries z and generalization of CART cell spwan
… parameters. Add new parameters to initialize substances in restricted areas. New tumoral and cart cell volumes
New hyperparameter from add glucose gradient
…s for result analysis and radius analysis
There was a problem hiding this comment.
Can we ask claude to draw this with mermaid for github?
There was a problem hiding this comment.
Yes, it is ugly but I believe it can replay 1:1 yours…
|
Please find all other classes marked as "final" and consider dropping it. |
| "lateral_oxygen_production_max_z": 300.0, | ||
| "min_initial_z_substances": -300.0, | ||
| "max_initial_z_substances": 300.0, | ||
| "diffuse_oxygen_on_z_axis": false, |
There was a problem hiding this comment.
Could you please remind me why both oxygen and glucose diffusion along the z-axis are disabled? Are we using only one layer of cells?
There was a problem hiding this comment.
It is a very shallow cylindrical medium, very close to a dish containing a single layer of cells. When the lid of the device is removed, oxygen can diffuse freely along the z-axis, whereas glucose cannot, thus preventing it from escaping the dish. The lid stops the z-flow for both substances
| "max_volume_new_cart_cell": 336.25, | ||
| "oncoprotein_mean": 1.0, | ||
| "oncoprotein_standard_deviation": 0.0, | ||
| "initial_oxygen_level": 0.0, |
There was a problem hiding this comment.
Are we actually starting the model with an oxygen-depleted tumour?
There was a problem hiding this comment.
Yes but it makes no difference because the oxygen flows very fast and just after a few steps the cells have access to a time-constant oxygen concentration that only depends on their position.
| if (radi_sq > max_r_sq) { | ||
| // Scale down the movement to stay within the allowed radius | ||
| const double scale_factor = std::sqrt(max_r_sq / radi_sq); | ||
| movement_at_next_step[0] *= scale_factor; | ||
| movement_at_next_step[1] *= scale_factor; | ||
| } |
There was a problem hiding this comment.
This scales the displacement, not the final position, have we checked whether the cells remain within the permitted boundary?
There was a problem hiding this comment.
Yes, I checked! Anyway I just fixed it to project the final position, thanks! :)
There was a problem hiding this comment.
The diffusion equation that we implement includes a decay term (
This line divides the decay term into three directional solving steps, so when solving in x, y and z, each directional step accounts for one-third of the decay term.
You've introduced the option to skip the z-direction, which makes sense when simulating 2D systems, however, from what I see here, the decay coefficient is still divided by three, even when only two directional steps are executed. Is that the case? If so, could we adjust the decay-term splitting according to the number of active diffusion directions?
There was a problem hiding this comment.
Indeed, you are both super correct. Thank you so much for spotting that bug and for the accurate solution :)
| @@ -303,6 +335,57 @@ Real3 TumorCell::CalculateDisplacement(const InteractionForce* force, | |||
|
|
|||
| older_velocity_ = translation_velocity_on_point_mass; | |||
There was a problem hiding this comment.
older_velocity_ is updated before the boundary correction is applied to the displacement.
Could retaining the unconstrained velocity affect cell movement across subsequent timesteps when cells are repeatedly pushed against the boundary?
This is not high priority but worth keeping in mind.
There was a problem hiding this comment.
Yes, older_velocity_ stores the velocity before the boundary correction. While a cell is pushed against the wall, this has no effect: its position is corrected back to the boundary every step. The only effect is a very small extra push inward for one step an therefore moving the cell further away from the wall. Nevertheless we'll keep an eye on it in case of artifacts
| spatial_diffusion_coeff_(dc * dt / (d_space_ * d_space_)), | ||
| neg_diffusion_factor_(-spatial_diffusion_coeff_), | ||
| temporal_decay_coeff_(mu * dt / 3.0), | ||
| temporal_decay_coeff_(mu * dt / (diffuse_on_z_axis ? 3.0 : 2.0)), |
There was a problem hiding this comment.
warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
temporal_decay_coeff_(mu * dt / (diffuse_on_z_axis ? 3.0 : 2.0)),
^| spatial_diffusion_coeff_(dc * dt / (d_space_ * d_space_)), | ||
| neg_diffusion_factor_(-spatial_diffusion_coeff_), | ||
| temporal_decay_coeff_(mu * dt / 3.0), | ||
| temporal_decay_coeff_(mu * dt / (diffuse_on_z_axis ? 3.0 : 2.0)), |
There was a problem hiding this comment.
warning: 3.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
temporal_decay_coeff_(mu * dt / (diffuse_on_z_axis ? 3.0 : 2.0)),
^
This PR extends and calibrates CARTopiaX to reproduce the experimental results reported in Ando et al., Evaluating CAR-T Cell Therapy in a Hypoxic 3D Tumor Model (Advanced Healthcare Materials, 2019).
The implemented changes improve the biological realism of the simulation by reproducing the experimental setup and the observed CAR T-cell behavior under hypoxic conditions. This demonstrates CARTopiaX as a flexible and robust in silico hypothesis-testing framework capable of replicating published studies, accelerating CAR T-cell research, and reducing reliance on costly and time-consuming wet-lab experiments.