sys-bio / temp-biomodels

Temporary place for coordination of updating existing Biomodels
Creative Commons Zero v1.0 Universal
2 stars 2 forks source link

Deal with KINSOL used as the steady state algorithm. #114

Open luciansmith opened 2 years ago

luciansmith commented 2 years ago

Every biomodels that uses steady state uses the KISAO term 282 ('KINSOL'), and the checker returns this error:

NotImplementedError: Algorithm substitution for "KINSOL" (http://www.biomodels.net/kisao/KISAO#KISAO_0000282) for policy SAME_VARIABLES is not supported.

Now, if a model has an algebraic rule, it must use the KINSOL solver to find the steady state. But if it doesn't (and no biomodels does), other solvers can also be used.

There are two ways we can work with this, and perhaps both should be done:

1) Let the algorithm substitution algorithm have access to the referenced model. If there are no algebraic rules present, allow substitution of a different solver.

2) Change the biomodels SEDML files to use a more permissive steady state solver, since we know there aren't algebraic rules.

Any opinions?

The biomodels in question are:

final/BIOMD0000000498/BIOMD0000000498.sedml: final/BIOMD0000000500/MODEL1311130001_highcoop.sedml: final/BIOMD0000000500/MODEL1311130001_lowcoop.sedml: final/BIOMD0000000501/MODEL1311130000_lowcoop.sedml: final/BIOMD0000000574/MODEL1405060000_CaMKIIeffect.sedml: final/BIOMD0000000637/Bush2016-Simplified-Carrousel-model-of-GPCR.sedml: final/BIOMD0000000638/Bush2016-Extended-Carrousel-model-of-GPCR-RGS.sedml: final/BIOMD0000000643/ARPP-16_Layer1_mutualInhibitions.sedml: final/BIOMD0000000644/ARPP-16_Layer1and2_mutualInhibitions_PKAinhibitsMAST3.sedml: final/BIOMD0000000645/ARPP-16_Layer1and2and3_mutualInhibitions_PKAinhibitsMAST3_dominantNegative.sedml: final/BIOMD0000000803/Park2019.sedml: final/BIOMD0000000847/Adams2019.sedml: final/BIOMD0000000865/Nikolaev2019.sedml: final/BIOMD0000000866/Simon2019.sedml: final/BIOMD0000000868/simon2019_model2.sedml: final/BIOMD0000000869/Simon2019_model3.sedml: final/BIOMD0000000870/Simon2019_model4.sedml: final/BIOMD0000000871/Simon2019_Figure3b.sedml: final/BIOMD0000000881/Kogan2013.sedml: final/BIOMD0000000919/Ledzewicz2013.sedml: final/BIOMD0000000927/Grigolon2018_fig1b.sedml:

jonrkarr commented 2 years ago

The algorithm substitution is intended to be in reference to a particular simulation tool.

My recollection is that COPASI didn't originally export any SED-ML that needed KINSOL. Since there was no SED-ML with KINSOL, I didn't deal with it. I believe tellurium is the only case where we've mapped a KISAO term to a steady state method. All of the infrastructure is in place to do the same for other methods and tools. In this case, we'd ideally expose KINSOL through COPASI, or whatever COPASI implements. I think I might just need a little help from Frank to know what the appropriate COPASI syntax is.

Algorithm substitution might also need to be adjusted. Also relatively easy to do.

I think this summarizes the status for the interfaces to SBML tools:

luciansmith commented 2 years ago

Well, since it's COPASI itself that is exporting this SED-ML, one presumes that their normal steady state solver is KINSOL.

What do you think is best for Biomodels? COPASI is actually using KINSOL, but there are simulation tools that don't support it. It would be easy enough to swap out 282 for 407 (the generic 'a steady state algorithm') or 408 (the Newton method and parent of 282) when there aren't algebraic rules (which is, as of now, 100% of the time).

jonrkarr commented 2 years ago

I think the ideal is:

hsauro commented 2 years ago

Note roadrunner supports kinsol as of 4 months ago?

luciansmith commented 2 years ago

Oh, hey, excellent. Does that mean that we could support algebraic rules if we could store them? Or is that something different?

jonrkarr commented 2 years ago

Added tellurium/KINSOL to todo list above

hsauro commented 2 years ago

That's different, I put that into the next grant if we get it.