Commit 42bb9e33 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

add initial concentration, fix certainty of units

parent d8e40b32
......@@ -240,7 +240,15 @@ function extractModel(mdl::VPtr)::SBML.Model
if ccall(sbml(:Species_isSetInitialAmount), Cint, (VPtr,), sp) != 0
ia = (
ccall(sbml(:Species_getInitialAmount), Cdouble, (VPtr,), sp),
get_string(sp, :Species_getSubstanceUnits),
get_optional_string(sp, :Species_getSubstanceUnits),
)
end
ic = nothing
if ccall(sbml(:Species_isSetInitialConcentration), Cint, (VPtr,), sp) != 0
ic = (
ccall(sbml(:Species_getInitialAmount), Cdouble, (VPtr,), sp),
get_optional_string(sp, :Species_getSubstanceUnits),
)
end
......
......@@ -142,12 +142,13 @@ struct Species
boundary_condition::Maybe{Bool}
formula::Maybe{String}
charge::Maybe{Int}
initial_amount::Maybe{Tuple{Float64,String}}
initial_amount::Maybe{Tuple{Float64,Maybe{String}}}
initial_concentration::Maybe{Tuple{Float64,Maybe{String}}}
only_substance_units::Maybe{Bool}
notes::Maybe{String}
annotation::Maybe{String}
Species(na, co, b, f, ch, ia, osu, no = nothing, a = nothing) =
new(na, co, b, f, ch, ia, osu, no, a)
Species(na, co, b, f, ch, ia, ic, osu, no = nothing, a = nothing) =
new(na, co, b, f, ch, ia, ic, osu, no, a)
end
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment