LoLab-MSM / pysb

Python framework for Systems Biology modeling [Lopez Lab Mods]
BSD 2-Clause "Simplified" License
6 stars 8 forks source link

we need a pre equilibration function. #34

Open ortega2247 opened 8 years ago

ortega2247 commented 8 years ago

pre equilibration refers to the period of time where reactants and intermediate species interact until they reach equilibration, which means that the net reaction rate = 0. This function would be important because usually cells can be assumed that are in equilibrium and then a drug or ligand is applied and takes the cell from the equilibrium and generates different dynamics and responses.

For example if we have an enzyme that binds a substrate with initial conditions E0 and S0, and with want to perturbate that interaction with a drug D with initial condition D0. If we simulate the system where we put E, S, and D at the same time they are going to be out of equilibrium from the beginning and the dynamics could be completely different than when we allow a pre-equilibration phase between E and S and then we applied the drug that takes the system out of equilibrium.

lh64 commented 8 years ago

It would probably have to be something like sim.equil(model). BioNetGen has a 'steady_state' argument that you can pass to the ODE simulator. It's not all that sophisticated though. You have to give it an end time and it will quit if steady state is detected. If steady state is not detected it will just quit at the end time. The 'steady_state' flag also doesn't work for SSA simulations. I think we can do better than this. I'm not sure what the best approach is but I think it could be done.

ortega2247 commented 8 years ago

I created a very rustic pre_equilibration function: pre_equilibration(model, time_search, tolerance=1e-6, ligand=None, ligand_value=None, parameters=None). It solves that system during the time_search and returns the time to equilibration and the concentration of species at the time of equilibration so it can be passed to the as a parameter for solving the system again. I don't know how bad of idea this is... thoughts?