Question regarding getCurrentSBML method

12 views
Skip to first unread message

Jorin Diemer

unread,
May 6, 2020, 1:30:00 AM5/6/20
to tellurium-discuss
Hey all,

I ran into a behaviour of the getCurrentSBML() method, which surprised me: In the return sbml string the concentrations are multiplied by the volume, but when re-loaded the concentration is set to the saved concentration value, i.e. if one wants to store the sbml somewhere and loads it again, the initial values changed. Here an example:

import tellurium as te
model = """
model test
    compartment C1;
    C1 = 2.0;
    species S1, S2;

    S1 = 10.0;
    S2 = 0.0;
    S1 in C1; S2 in C1;
    J1: S1 -> S2; k1*S1;

    k1 = 1.0;
end
"""
# load models
r = te.loada(model)
print(r.S1)   --> 10

sbml = r.getCurrentSBML()
new = te.loadSBMLModel(sbml)
print(new.S1)  --> 20

sbml = new.getCurrentSBML()
newer = te.loadSBMLModel(sbml)
print(newer.S1) --> 40


The value of S1 is multiplied by C1 each time I call the getCurrentSBML method. This doesn't happen for getSBML.
I was wondering if there is a specific reason for this behaviour.

Thanks,
Jorin

Herbert M Sauro

unread,
May 6, 2020, 12:20:06 PM5/6/20
to Jorin Diemer, tellurium-discuss
Thanks for the report, we'll look into this. This may be a bug that is already on our list, I'll prioritize it.

Herbert Sauro

--
You received this message because you are subscribed to the Google Groups "tellurium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tellurium-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tellurium-discuss/58f99341-6789-40e5-936a-d4ac56c15db8%40googlegroups.com.


--
Herbert Sauro, Professor
University of Washington, Bioengineering
Reply all
Reply to author
Forward
0 new messages