# Problem constructing reaction system from SBML Biomodel

**URL:** https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548
**Category:** Modelling & Simulations
**Tags:** question, sbml, differentialequation
**Created:** [July 2, 2024, 8:52pm UTC](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548 "2024-07-02T20:52:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jchitpin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jchitpin/32/210424_2.png) [@jchitpin](https://discourse.julialang.org/u/jchitpin)
#### Post date: [July 2, 2024, 8:52pm UTC](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548/1 "2024-07-02T20:52:22Z")

</div>

I am encountering difficulties loading an SBML file from BioModels (see [here](https://www.ebi.ac.uk/biomodels/MODEL1505110000#Files)). Following the `SBMLToolKit` instructions, I loaded the SBML file but am having issues constructing the reaction system with warnings that certain bidirectional reactions cannot be split. Is there any way around this?

```julia
using SBMLToolkit, ModelingToolkit, OrdinaryDiffEq

mdl = readSBML("E_coli_Millard2016.xml", doc -> begin
    set_level_and_version(2, 4)(doc) # level 2 and version 4 according to Biomodels
    convert_promotelocals_expandfuns(doc)
end)

rs = ReactionSystem(mdl) # fails with warnings on splitting reactions

```

The error I get is:

```julia
julia> rs = ReactionSystem(mdl) 
┌ Warning: Cannot separate bidirectional kineticLaw `(XCH_ACE1_Vmax*(ACEx(t) / (XCH_ACE1_Km*ce
ll) + (-ACEp(t)) / (XCH_ACE1_Km*cell_periplasm))) / (1.0 + ACEx(t) / (XCH_ACE1_Km*cell) + ACEp
(t) / (XCH_ACE1_Km*cell_periplasm))` to forward and reverse part. Setting forward to `(XCH_ACE
1_Vmax*(ACEx(t) / (XCH_ACE1_Km*cell) + (-ACEp(t)) / (XCH_ACE1_Km*cell_periplasm))) / (1.0 + AC
Ex(t) / (XCH_ACE1_Km*cell) + ACEp(t) / (XCH_ACE1_Km*cell_periplasm))` and reverse to `0`. Stoc
hastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(GLT_Vmax*cell*((-COA*CIT(t)) / (GLT_Keq*
(cell^2)) + (OAA(t)*ACCOA(t)) / (cell^2))) / (GLT_KdACCOA0*GLT_KmOAA0*((CIT(t)*OAA(t)*ACCOA(t)
) / (GLT_KdACCOA0*GLT_KdcsCIT*GLT_KmOAA0*(cell^3)) + (GLT_KmcsCOA*CIT(t)*ACCOA(t)) / (GLT_KdAC
COA0*GLT_KdcsCOA*GLT_KmcsCIT*(cell^2)) + (ACCOA(t)*(1.0 + AKG(t) / (GLT_Ki1AKG*cell) + NADH(t)
 / (GLT_Ki1NADH*cell))) / (GLT_KdACCOA0*cell) + (GLT_KmcsCOA*CIT(t)) / (GLT_KdcsCOA*GLT_KmcsCI
T*cell) + ((1.0 + NADH(t) / (GLT_Ki2NADH*cell) + AKG(t) / (GLT_Ki2AKG*cell))*OAA(t)*ACCOA(t)) 
/ (GLT_KdACCOA0*GLT_KmOAA0*(cell^2)) + (CIT(t)*OAA(t)) / (GLT_KmOAA0*GLT_KmcsCIT*(cell^2)) + C
OA / (GLT_KdcsCOA*cell) + (COA*CIT(t)*OAA(t)) / (GLT_KdcsCOA*GLT_KdcsOAA*GLT_KmcsCIT*(cell^3))
 + (COA*GLT_KmACCOA0*OAA(t)) / (GLT_KdACCOA0*GLT_KdcsCOA*GLT_KmOAA0*(cell^2)) + (1.0 + (GLT_Km
ACCOA0*OAA(t)) / (GLT_KdACCOA0*GLT_KmOAA0*cell))*(1.0 + ATP(t) / (GLT_KiATP*cell))))` to forwa
rd and reverse part. Setting forward to `(GLT_Vmax*cell*((-COA*CIT(t)) / (GLT_Keq*(cell^2)) + 
(OAA(t)*ACCOA(t)) / (cell^2))) / (GLT_KdACCOA0*GLT_KmOAA0*((CIT(t)*OAA(t)*ACCOA(t)) / (GLT_KdA
CCOA0*GLT_KdcsCIT*GLT_KmOAA0*(cell^3)) + (GLT_KmcsCOA*CIT(t)*ACCOA(t)) / (GLT_KdACCOA0*GLT_Kdc
sCOA*GLT_KmcsCIT*(cell^2)) + (ACCOA(t)*(1.0 + AKG(t) / (GLT_Ki1AKG*cell) + NADH(t) / (GLT_Ki1N
ADH*cell))) / (GLT_KdACCOA0*cell) + (GLT_KmcsCOA*CIT(t)) / (GLT_KdcsCOA*GLT_KmcsCIT*cell) + ((
1.0 + NADH(t) / (GLT_Ki2NADH*cell) + AKG(t) / (GLT_Ki2AKG*cell))*OAA(t)*ACCOA(t)) / (GLT_KdACC
OA0*GLT_KmOAA0*(cell^2)) + (CIT(t)*OAA(t)) / (GLT_KmOAA0*GLT_KmcsCIT*(cell^2)) + COA / (GLT_Kd
csCOA*cell) + (COA*CIT(t)*OAA(t)) / (GLT_KdcsCOA*GLT_KdcsOAA*GLT_KmcsCIT*(cell^3)) + (COA*GLT_
KmACCOA0*OAA(t)) / (GLT_KdACCOA0*GLT_KdcsCOA*GLT_KmOAA0*(cell^2)) + (1.0 + (GLT_KmACCOA0*OAA(t
)) / (GLT_KdACCOA0*GLT_KmOAA0*cell))*(1.0 + ATP(t) / (GLT_KiATP*cell))))` and reverse to `0`. 
Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `PIT_Vmax*((-PIT_Kr*P(t)) / ((PIT_KmP + P(
t) / cell)*cell*(1.0 + 0.18861169701161387(log((cell*Hout(t)) / (Hin*cell_periplasm))^2.0))) +
 (0.18861169701161387Pp(t)*(log((cell*Hout(t)) / (Hin*cell_periplasm))^2.0)) / ((PIT_KmPp + Pp
(t) / cell_periplasm)*cell_periplasm*(1.0 + 0.18861169701161387(log((cell*Hout(t)) / (Hin*cell
_periplasm))^2.0))))` to forward and reverse part. Setting forward to `PIT_Vmax*((-PIT_Kr*P(t)
) / ((PIT_KmP + P(t) / cell)*cell*(1.0 + 0.18861169701161387(log((cell*Hout(t)) / (Hin*cell_pe
riplasm))^2.0))) + (0.18861169701161387Pp(t)*(log((cell*Hout(t)) / (Hin*cell_periplasm))^2.0))
 / ((PIT_KmPp + Pp(t) / cell_periplasm)*cell_periplasm*(1.0 + 0.18861169701161387(log((cell*Ho
ut(t)) / (Hin*cell_periplasm))^2.0))))` and reverse to `0`. Stochastic simulations will be ine
xact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(ACEA_Vmax*cell*(ICIT(t) / cell + (-GLX(t
)*SUC(t)) / (ACEA_Keq*(cell^2)))) / (ACEA_KmICIT*(1.0 + ((1.0 + ICIT(t) / (ACEA_KdICITsuc*cell
))*SUC(t)) / (ACEA_KdSUC*cell) + (ICIT(t)*(1.0 + PEP(t) / (ACEA_KdPEPicit*cell))) / (ACEA_KmIC
IT*cell) + (GLX(t)*SUC(t)) / (ACEA_KdSUC*ACEA_KmGLX*(cell^2)) + (ACEA_KmSUC*GLX(t)*(1.0 + PEP(
t) / (ACEA_KdPEPglx*cell))) / (ACEA_KdSUC*ACEA_KmGLX*cell) + PEP(t) / (ACEA_KdPEP*cell) + PGA3
(t) / (ACEA_KdPGA3*cell)))` to forward and reverse part. Setting forward to `(ACEA_Vmax*cell*(
ICIT(t) / cell + (-GLX(t)*SUC(t)) / (ACEA_Keq*(cell^2)))) / (ACEA_KmICIT*(1.0 + ((1.0 + ICIT(t
) / (ACEA_KdICITsuc*cell))*SUC(t)) / (ACEA_KdSUC*cell) + (ICIT(t)*(1.0 + PEP(t) / (ACEA_KdPEPi
cit*cell))) / (ACEA_KmICIT*cell) + (GLX(t)*SUC(t)) / (ACEA_KdSUC*ACEA_KmGLX*(cell^2)) + (ACEA_
KmSUC*GLX(t)*(1.0 + PEP(t) / (ACEA_KdPEPglx*cell))) / (ACEA_KdSUC*ACEA_KmGLX*cell) + PEP(t) / 
(ACEA_KdPEP*cell) + PGA3(t) / (ACEA_KdPGA3*cell)))` and reverse to `0`. Stochastic simulations
 will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(PDH_Vmax*cell*((COA*PYR(t)*NAD(t)) / (ce
ll^3) + (-HCO3*ACCOA(t)*NADH(t)) / (PDH_Keq*(cell^3)))) / (PDH_KmCOA*PDH_KmNAD*PDH_KmPYR*((ACC
OA(t)*NADH(t)) / (PDH_KmACCOA*PDH_KmNADH*(cell^2)) + (COA*NADH(t)) / (PDH_KmCOA*PDH_KmNADH*(ce
ll^2)) + ((1.0 + PYR(t) / (PDH_KmPYR*cell) + COA / (PDH_KmCOA*cell))*NAD(t)) / (PDH_KmNAD*cell
) + (COA*ACCOA(t)*NADH(t)) / (PDH_KmACCOA*PDH_KmCOA*PDH_KmNADH*(cell^3)) + (COA*ACCOA(t)*PYR(t
)) / (PDH_KmACCOA*PDH_KmCOA*PDH_KmPYR*(cell^3)) + (COA*NAD(t)*NADH(t)) / (PDH_KmCOA*PDH_KmNAD*
PDH_KmNADH*(cell^3)) + (NAD(t)*NADH(t)) / (PDH_KmNAD*PDH_KmNADH*(cell^2)) + NADH(t) / (PDH_KmN
ADH*cell) + (COA*(1.0 + NAD(t) / (PDH_KmNAD*cell))*PYR(t)) / (PDH_KmCOA*PDH_KmPYR*(cell^2)) + 
(ACCOA(t)*PYR(t)) / (PDH_KmACCOA*PDH_KmPYR*(cell^2)) + ACCOA(t) / (PDH_KmACCOA*cell))*(1.0 + H
CO3 / (PDH_KmHCO3*cell)))` to forward and reverse part. Setting forward to `(PDH_Vmax*cell*((C
OA*PYR(t)*NAD(t)) / (cell^3) + (-HCO3*ACCOA(t)*NADH(t)) / (PDH_Keq*(cell^3)))) / (PDH_KmCOA*PD
H_KmNAD*PDH_KmPYR*((ACCOA(t)*NADH(t)) / (PDH_KmACCOA*PDH_KmNADH*(cell^2)) + (COA*NADH(t)) / (P
DH_KmCOA*PDH_KmNADH*(cell^2)) + ((1.0 + PYR(t) / (PDH_KmPYR*cell) + COA / (PDH_KmCOA*cell))*NA
D(t)) / (PDH_KmNAD*cell) + (COA*ACCOA(t)*NADH(t)) / (PDH_KmACCOA*PDH_KmCOA*PDH_KmNADH*(cell^3)
) + (COA*ACCOA(t)*PYR(t)) / (PDH_KmACCOA*PDH_KmCOA*PDH_KmPYR*(cell^3)) + (COA*NAD(t)*NADH(t)) 
/ (PDH_KmCOA*PDH_KmNAD*PDH_KmNADH*(cell^3)) + (NAD(t)*NADH(t)) / (PDH_KmNAD*PDH_KmNADH*(cell^2
)) + NADH(t) / (PDH_KmNADH*cell) + (COA*(1.0 + NAD(t) / (PDH_KmNAD*cell))*PYR(t)) / (PDH_KmCOA
*PDH_KmPYR*(cell^2)) + (ACCOA(t)*PYR(t)) / (PDH_KmACCOA*PDH_KmPYR*(cell^2)) + ACCOA(t) / (PDH_
KmACCOA*cell))*(1.0 + HCO3 / (PDH_KmHCO3*cell)))` and reverse to `0`. Stochastic simulations w
ill be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(XCH_ACE2_Vmax*(ACEp(t) / (XCH_ACE2_Km*ce
ll_periplasm) + (-ACEx_0(t)) / (XCH_ACE2_Km*extracellular))) / (1.0 + ACEp(t) / (XCH_ACE2_Km*c
ell_periplasm) + ACEx_0(t) / (XCH_ACE2_Km*extracellular))` to forward and reverse part. Settin
g forward to `(XCH_ACE2_Vmax*(ACEp(t) / (XCH_ACE2_Km*cell_periplasm) + (-ACEx_0(t)) / (XCH_ACE
2_Km*extracellular))) / (1.0 + ACEp(t) / (XCH_ACE2_Km*cell_periplasm) + ACEx_0(t) / (XCH_ACE2_
Km*extracellular))` and reverse to `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(ICD_kcat*((NADP(t)*ICIT(t)) / (cell^2) +
 (-NADPH(t)*AKG(t)) / (ICD_Keq*(cell^2)))*icd(t)) / (ICD_KmICIT*ICD_KmNADP*(-1.0 + (1.0 + ICIT
(t) / (ICD_KmICIT*cell))*(1.0 + NADP(t) / (ICD_KmNADP*cell)) + (1.0 + NADPH(t) / (ICD_KmNADPH*
cell))*(1.0 + AKG(t) / (ICD_KmAKG*cell))))` to forward and reverse part. Setting forward to `(
ICD_kcat*((NADP(t)*ICIT(t)) / (cell^2) + (-NADPH(t)*AKG(t)) / (ICD_Keq*(cell^2)))*icd(t)) / (I
CD_KmICIT*ICD_KmNADP*(-1.0 + (1.0 + ICIT(t) / (ICD_KmICIT*cell))*(1.0 + NADP(t) / (ICD_KmNADP*
cell)) + (1.0 + NADPH(t) / (ICD_KmNADPH*cell))*(1.0 + AKG(t) / (ICD_KmAKG*cell))))` and revers
e to `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `ADK_k*cell*((AMP(t)*ATP(t)) / (cell^2) + 
(-((ADP(t) / cell)^2.0)) / ADK_Keq)` to forward and reverse part. Setting forward to `ADK_k*ce
ll*((AMP(t)*ATP(t)) / (cell^2) + (-((ADP(t) / cell)^2.0)) / ADK_Keq)` and reverse to `0`. Stoc
hastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(SDH_Vmax*cell*((-FUM(t)*FADH2(t)) / (SDH
_Keq*(cell^2)) + (SUC(t)*FAD(t)) / (cell^2))) / (SDH_KefSUC*SDH_KmQ*(1.0 + FUM(t) / (SDH_KefFU
M*cell) + (FUM(t)*FADH2(t)) / (SDH_KefFUM*SDH_KmQH2*(cell^2)) + (SDH_KmSUC*FAD(t)) / (SDH_KefS
UC*SDH_KmQ*cell) + (SDH_KmFUM*FADH2(t)) / (SDH_KefFUM*SDH_KmQH2*cell) + (SUC(t)*FAD(t)) / (SDH
_KefSUC*SDH_KmQ*(cell^2)) + SUC(t) / (SDH_KefSUC*cell)))` to forward and reverse part. Setting
 forward to `(SDH_Vmax*cell*((-FUM(t)*FADH2(t)) / (SDH_Keq*(cell^2)) + (SUC(t)*FAD(t)) / (cell
^2))) / (SDH_KefSUC*SDH_KmQ*(1.0 + FUM(t) / (SDH_KefFUM*cell) + (FUM(t)*FADH2(t)) / (SDH_KefFU
M*SDH_KmQH2*(cell^2)) + (SDH_KmSUC*FAD(t)) / (SDH_KefSUC*SDH_KmQ*cell) + (SDH_KmFUM*FADH2(t)) 
/ (SDH_KefFUM*SDH_KmQH2*cell) + (SUC(t)*FAD(t)) / (SDH_KefSUC*SDH_KmQ*(cell^2)) + SUC(t) / (SD
H_KefSUC*cell)))` and reverse to `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `cell*((-PTS_1_k2*ei(t)*hprP(t)) / (cell^2
) + (PTS_1_k1*hpr(t)*eiP(t)) / (cell^2))` to forward and reverse part. Setting forward to `cel
l*((-PTS_1_k2*ei(t)*hprP(t)) / (cell^2) + (PTS_1_k1*hpr(t)*eiP(t)) / (cell^2))` and reverse to
 `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `ACEK_1_k*cell*((icd(t)*ATP(t)) / (cell^2)
 + (-icdP(t)*ADP(t)) / (ACEK_1_Keq*(cell^2)))` to forward and reverse part. Setting forward to
 `ACEK_1_k*cell*((icd(t)*ATP(t)) / (cell^2) + (-icdP(t)*ADP(t)) / (ACEK_1_Keq*(cell^2)))` and 
reverse to `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
┌ Warning: Cannot separate bidirectional kineticLaw `(FBA_Vmax*cell*((-GAP(t)*DAP(t)) / (FBA_K
eq*(cell^2)) + FDP(t) / cell)) / (FBA_KmFDP*(1.0 + PEP(t) / (FBA_KmPEP*cell) + FDP(t) / (FBA_K
mFDP*cell) + DAP(t) / (FBA_KmDAP*cell) + (GAP(t)*DAP(t)) / (FBA_KmDAP*FBA_KmGAP*(cell^2))))` t
o forward and reverse part. Setting forward to `(FBA_Vmax*cell*((-GAP(t)*DAP(t)) / (FBA_Keq*(c
ell^2)) + FDP(t) / cell)) / (FBA_KmFDP*(1.0 + PEP(t) / (FBA_KmPEP*cell) + FDP(t) / (FBA_KmFDP*
cell) + DAP(t) / (FBA_KmDAP*cell) + (GAP(t)*DAP(t)) / (FBA_KmDAP*FBA_KmGAP*(cell^2))))` and re
verse to `0`. Stochastic simulations will be inexact.
└ @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:35
ERROR: StackOverflowError:
Stacktrace:
     [1] unsorted_arguments(x::SymbolicUtils.BasicSymbolic{Real})
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/types.jl:138
     [2] (::SymbolicUtils.Rewriters.Walk{…})(x::SymbolicUtils.BasicSymbolic{…})
       @ SymbolicUtils.Rewriters ~/.julia/packages/SymbolicUtils/c0xQb/src/rewriters.jl:198
     [3] (::SymbolicUtils.Rewriters.PassThrough{SymbolicUtils.Rewriters.Walk{…}})(x::SymbolicU
tils.BasicSymbolic{Real})
       @ SymbolicUtils.Rewriters ~/.julia/packages/SymbolicUtils/c0xQb/src/rewriters.jl:188
     [4] iterate(g::Base.Generator, s::Vararg{Any})
       @ Base ./generator.jl:47 [inlined]
     [5] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasSha
pe{…})
       @ Base ./array.jl:854
     [6] collect_similar
       @ ./array.jl:763 [inlined]
     [7] map(f::Any, A::Any)
       @ Base ./abstractarray.jl:3282 [inlined]
--- the last 6 lines are repeated 13073 more times ---
 [78446] (::SymbolicUtils.Rewriters.Walk{…})(x::SymbolicUtils.BasicSymbolic{…})
       @ SymbolicUtils.Rewriters ~/.julia/packages/SymbolicUtils/c0xQb/src/rewriters.jl:198
 [78447] simplify_fractions(x::SymbolicUtils.BasicSymbolic{Real}; polyform::Bool)
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:325
 [78448] simplify_fractions(x::SymbolicUtils.BasicSymbolic{Real})
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:323
 [78449] simplify_div(d::SymbolicUtils.BasicSymbolic{Real})
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:280
 [78450] (::SymbolicUtils.var"#sdiv#135")(a::SymbolicUtils.BasicSymbolic{Real})
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:329
 [78451] call_composed
       @ ./operators.jl:1044 [inlined]
 [78452] (::ComposedFunction{…})(x::SymbolicUtils.BasicSymbolic{…}; kw::@Kwargs{})
       @ Base ./operators.jl:1041
 [78453] (::SymbolicUtils.Rewriters.Walk{…})(x::SymbolicUtils.BasicSymbolic{…})
       @ SymbolicUtils.Rewriters ~/.julia/packages/SymbolicUtils/c0xQb/src/rewriters.jl:200
 [78454] simplify_fractions(x::SymbolicUtils.BasicSymbolic{Real}; polyform::Bool)
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:331
 [78455] simplify_fractions(x::SymbolicUtils.BasicSymbolic{Real})
       @ SymbolicUtils ~/.julia/packages/SymbolicUtils/c0xQb/src/polyform.jl:323
 [78456] simplify_fractions(n::Num; kw::@Kwargs{})
       @ Symbolics ~/.julia/packages/Symbolics/Eas9m/src/Symbolics.jl:165
 [78457] simplify_fractions
       @ ~/.julia/packages/Symbolics/Eas9m/src/Symbolics.jl:165 [inlined]
 [78458] get_massaction(kl::Num, reactants::Vector{Num}, stoich::Vector{Int64})
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:187
 [78459] use_rate(kl::Num, react::Vector{Num}, stoich::Vector{Int64})
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:150
 [78460] add_reaction!(rxs::Vector{…}, kl::Num, reactant_references::Vector{…}, product_refere
nces::Vector{…}, model::SBML.Model; enforce_rate::Bool)
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:66
 [78461] add_reaction!
       @ ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:55 [inlined]
 [78462] get_reactions(model::SBML.Model)
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/reactions.jl:22
 [78463] ReactionSystem(model::SBML.Model; kwargs::@Kwargs{})
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/systems.jl:55
 [78464] ReactionSystem(model::SBML.Model)
       @ SBMLToolkit ~/.julia/packages/SBMLToolkit/JL9bj/src/systems.jl:53
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

```

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [July 3, 2024, 6:32am UTC](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548/2 "2024-07-03T06:32:49Z")

</div>

Can you open an issue? It seems that SBML file is hitting a construct that’s not supported. It would be good to get that documented. The SBML spec is huge so there’s a few bits which still aren’t fully covered.

---

<div class="post-metadata">

### Author: ![jchitpin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jchitpin/32/210424_2.png) [@jchitpin](https://discourse.julialang.org/u/jchitpin)
#### Post date: [July 3, 2024, 1:16pm UTC](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548/3 "2024-07-03T13:16:12Z")

</div>

Thanks and will do @ChrisRackauckas. I opened an [issue](https://github.com/SciML/SBMLToolkit.jl/issues/160).
