Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
379f6beb
Commit
379f6beb
authored
Jun 25, 2021
by
paulflang
Browse files
test getInitialConcentrations
parent
71305c0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/loadmodels.jl
View file @
379f6beb
...
@@ -32,6 +32,14 @@ sbmlfiles = [
...
@@ -32,6 +32,14 @@ sbmlfiles = [
4
,
4
,
3
,
3
,
),
),
# a cool model with `initialConcentration` from SBML testsuite
(
joinpath
(
@__DIR__
,
"data"
,
"sbml00374.xml"
),
"https://raw.githubusercontent.com/sbmlteam/sbml-test-suite/master/cases/semantic/00374/00374-sbml-l3v2.xml"
,
"424683eea6bbb577aad855d95f2de5183a36e296b06ba18b338572cd7dba6183"
,
4
,
2
,
),
]
]
@testset
"Loading of models from various sources"
begin
@testset
"Loading of models from various sources"
begin
...
@@ -77,4 +85,12 @@ end
...
@@ -77,4 +85,12 @@ end
@test
sum
(
ia
for
(
sp
,
ia
)
in
SBML
.
initial_amounts
(
m
))
==
0.001
@test
sum
(
ia
for
(
sp
,
ia
)
in
SBML
.
initial_amounts
(
m
))
==
0.001
@test
sum
(
ic
for
(
sp
,
ic
)
in
SBML
.
initial_concentrations
(
m
,
convert_amounts
=
true
))
==
@test
sum
(
ic
for
(
sp
,
ic
)
in
SBML
.
initial_concentrations
(
m
,
convert_amounts
=
true
))
==
0.001
0.001
m
=
readSBML
(
joinpath
(
@__DIR__
,
"data"
,
"sbml00374.xml"
))
@test
all
(
isnothing
(
ic
)
for
(
k
,
ic
)
in
SBML
.
initial_amounts
(
m
))
@test
length
(
SBML
.
initial_concentrations
(
m
))
==
4
@test
sum
(
ic
for
(
sp
,
ic
)
in
SBML
.
initial_concentrations
(
m
))
==
0.0020800000000000003
@test
sum
(
ia
for
(
sp
,
ia
)
in
SBML
.
initial_amounts
(
m
,
convert_concentrations
=
true
))
==
0.25
*
0.0020800000000000003
end
end
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