Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
e6681aa3
Commit
e6681aa3
authored
Jul 13, 2021
by
Miroslav Kratochvil
🚴
Browse files
constantize the stoichiometry-adding function
parent
f6b416c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/readsbml.jl
View file @
e6681aa3
...
...
@@ -334,13 +334,13 @@ function extractModel(mdl::VPtr)::SBML.Model
# extract stoichiometry
stoi = Dict{String,Float64}()
add_stoi
=
(sr, factor) -> begin
s = get_string(sr, :SpeciesReference_getSpecies)
stoi[s] =
get
(s
toi
, s, 0) +
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) *
factor
end
add_stoi
(sr, factor) = begin
s = get_string(sr, :SpeciesReference_getSpecies)
stoi[s] =
get(stoi, s, 0) +
ccall(sbml(:SpeciesReference_
get
S
toi
chiometry), Cdouble, (VPtr,), sr) *
factor
end
# reactants and products
for j = 1:ccall(sbml(:Reaction_getNumReactants), Cuint, (VPtr,), re)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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