Editing the chemotaxis plugin
3 months ago by
It seemed to me that this could be easily modeled by adding an if-statement in the chemotaxis plugin, which would make the lambda in the chemotaxis module negative if the gradient was steep enough.
But the xml language doesn't use if-statements and I have trouble finding out how to edit the python code of the chemotaxis plugin.
Does anyone know how to edit the chemotaxis plugin or if there is another way of first attracting and then repulsing cells?
3 months ago by
Instead, I would make two cell types, one that chemotaxes up the gradient and another that chemotaxis down the gradient. When the gradient exceeds a limit you switch from one cell type to another. Attached is a quick CC3D project with a fixed cell that is the source of a gradient ("hormone") and a moving cell that switches between going up and down the gradient based on the steepness of the gradient. To calculate the gradient I used the difference between the minimum and maximum gradient values along the moving cell's perimeter. (There might be a more efficient way to do this.) If the gradient is above a threshold the cell switches to going down the gradient, when the gradient is below a threshold the cell switches to going up the gradient. (I takes a while before the cell starts to move since the field has to build up.)
You could also switch the direction based on the field value at (for example) the center of the cell, instead of the field gradient across the cell as I did here.
File attached: InvertChemoract.zip (10.01 KB)
File attached: InvertChemotract.mov (296.64 KB)
Left: Colored by cell type, green is moving up the gradient and blue is moving down the gradient. Right: The "hormone" field created by the fixed cell in the upper right corner. Click the attached .mov to see the animation.
Please login to add an answer/comment or follow this question.