Open StephanM87 opened 1 year ago
Hi Stephan,
Parameter scanning is only for repeated run of steady-state analyses, not for time simulations. What this method actually does, is changes the two parameters through the list of values and calculates the steady state for each of these, outputting the results.
The syntax of the parameter scan list is as follows:
p1 = ["k1", 1, 10, 10]
p2 = ["k2", 2, 20, 10]
This would vary the parameter "k1" from 1 to 10 in 10 points, i.e. [1, 2, 3, ..., 10]. If you select log
, this would be on a log scale. And parameter "k2" from 2 to 20. The output
argument is a list of steady-state variables to output (this would typically be fluxes or steady-state concentrations). In your example you are outputting the parameters k1 and k2, so that won't work.
What you want to do is different, i.e. run various simulations with different starting conditions. You would have to code this manually in a for loop, each time setting mod.x0_init
and mod.s0_init
(the initial values), setting mod.sim_time
(list of time points you want to simulate over, and then calling mod.Simulate(userinit=1)
.
If you want to see how this is implemented for data fitting of time series, then you can look at the source code of the PySCeS ThinLayer to PyEnzyme: https://github.com/EnzymeML/PyEnzyme/blob/main/pyenzyme/thinlayers/TL_Pysces.py
I am trying to use PySCeS for a very simple chemical reaction, the goal is to define a model, perform a parameter scan and finally run simulations with the fitted parameters.
I followed the documentation for a 2D parameter scan, but unfortunately, I ran into a problem. There is probably a problem with my code, but at the moment I'm not exactly sure what the problem is in detail
My model is:
The code for the parameter fit is:
At the moment I get as an error message:
I'm unfortunately also a little bit confused with the Syntax of the 2D parameter scan: