SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
138 stars 34 forks source link

Modifying hopping_constants in a callback #258

Open RobertGregg opened 2 years ago

RobertGregg commented 2 years ago

This is in response to a discourse question:

https://discourse.julialang.org/t/jumpproblem-hopping-constants-callback/86045?u=robertgregg

Essentially, it would be nice to be able to modify hopping_constants in a callback to simulate a moving boundary separates two regions with different diffusion rates. It sounds like reset_aggregated_jumps! would have to be modified to allow this functionality.

RobertGregg commented 1 year ago

I just wanted to bump this issue with an update. I've been building up a Cellular Potts Modeling package and want to incorporate spatial diffusion with JumpProcesses.jl. Given that these types of models already discretize biological cells onto a grid, I think it makes a lot of sense to use a discrete model for simulating chemical reaction networks within the model.

Basically my question becomes: Does using the hopping_constants in a callback to match the cell's moving boundary the right approach? Or is there a better way to approach this problem?

Sorry in advance if this isn't the best place to have this discussion. I just didn't want this issue to become an xy problem

isaacsas commented 1 year ago

Looks like a great package! Sorry we haven't made progress on this yet -- unfortunately this semester got busy and I haven't had time yet to get to it. I'm hoping I can make progress on it in a couple weeks once winter break starts.

RobertGregg commented 1 year ago

No worries! I just thought of it the other day and wanted to follow up. No rush.

The main issue is that the cells containing the chemical reactions move in these models so I have to figure out how to deal with that.