Commit d1fbeaf6 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

cleaning: distinguish between missing and empty formula

parent da50e144
...@@ -111,7 +111,7 @@ function extractModel(mdl::VPtr)::Model ...@@ -111,7 +111,7 @@ function extractModel(mdl::VPtr)::Model
for i = 1:ccall(sbml(:Model_getNumSpecies), Cuint, (VPtr,), mdl) for i = 1:ccall(sbml(:Model_getNumSpecies), Cuint, (VPtr,), mdl)
sp = ccall(sbml(:Model_getSpecies), VPtr, (VPtr, Cuint), mdl, i - 1) sp = ccall(sbml(:Model_getSpecies), VPtr, (VPtr, Cuint), mdl, i - 1)
sp_fbc = ccall(sbml(:SBase_getPlugin), VPtr, (VPtr, Cstring), sp, "fbc") # FbcSpeciesPlugin_t sp_fbc = ccall(sbml(:SBase_getPlugin), VPtr, (VPtr, Cstring), sp, "fbc") # FbcSpeciesPlugin_t
formula = "" formula = nothing
charge = nothing charge = nothing
if sp_fbc != C_NULL if sp_fbc != C_NULL
# if the FBC plugin is present, try to get the chemical formula and charge # if the FBC plugin is present, try to get the chemical formula and charge
......
...@@ -51,7 +51,7 @@ identifier ...@@ -51,7 +51,7 @@ identifier
struct Species struct Species
name::String name::String
compartment::String compartment::String
formula::String formula::Maybe{String}
charge::Maybe{Int} charge::Maybe{Int}
notes::Maybe{String} notes::Maybe{String}
annotation::Maybe{String} annotation::Maybe{String}
......
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