Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
f6b416c8
Commit
f6b416c8
authored
Jul 13, 2021
by
Miroslav Kratochvil
Browse files
quickfix: do not load invalid information for species with double stoichiometry
parent
70778a8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/readsbml.jl
View file @
f6b416c8
...
@@ -335,10 +335,12 @@ function extractModel(mdl::VPtr)::SBML.Model
...
@@ -335,10 +335,12 @@ function extractModel(mdl::VPtr)::SBML.Model
# extract stoichiometry
# extract stoichiometry
stoi = Dict{String,Float64}()
stoi = Dict{String,Float64}()
add_stoi =
add_stoi =
(sr, factor) ->
(sr, factor) -> begin
stoi[get_string(sr, :SpeciesReference_getSpecies)] =
s = get_string(sr, :SpeciesReference_getSpecies)
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) *
stoi[s] =
factor
get(stoi, s, 0) +
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) * factor
end
# reactants and products
# reactants and products
for j = 1:ccall(sbml(:Reaction_getNumReactants), Cuint, (VPtr,), re)
for j = 1:ccall(sbml(:Reaction_getNumReactants), Cuint, (VPtr,), re)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment