Re: [Tellurium discuss] Digest for - 5 updates in 1 topic

Skip to first unread message

Jalil Nourisa

Mar 26, 2021, 6:38:05 AM3/26/21
to, Lucian Smith
Thank you very much, Lucian,
That’s what I was looking for.

On 26. Mar 2021, at 10:35, wrote:

Jalil Nourisa <>: Mar 25 09:51PM

In my simulation, I have a SBML file of a previous model that I need to extend in certain ways. I wonder, is such a thing possible in Tellurium, and if yes, can you pls give me a hint how to do it?
Jalil Nourisa
Herbert M Sauro <>: Mar 25 03:04PM -0700

If you have an existing model I would convert the SBML into Antimony format
and then edit that. Antimony will give you a list of
reactions, species,rate laws etc, Any changes you make can be converted
back to SBML, or loaded straight into the tellurium simulator.
For example, if you have an SBML file or a string containing some SBML you
can do:
import tellurium as te
r = te.loadSBMLModel (string or file name of SBML model)
To get the Antimony you can use
antStr = r.getAntimony ()
You can print out the antStr and copy the string to a new editor window.
What I generally do is if you're using the Windows spyder distribution of
tellurium, there is an import sbml option in the file menu and that will
convert the SBML to antimony and drop it in the editor windows.
On Thu, Mar 25, 2021 at 2:54 PM Jalil Nourisa <>
Herbert Sauro, Professor
University of Washington, Bioengineering
Lucian Smith <>: Mar 25 03:09PM -0700

It's also possible to use the functions like 'addReaction' or 'addSpecies'
in roadrunner, i.e.:
r = tellurium.loada(antimonyStr)
r.addSpecies("S1", "c", 3.0)
would add species S1 in compartment c.
There are similar functions for deleting elements, too.
Jalil Nourisa <>: Mar 25 11:06PM

Thank you very much, Herbert,
I was more looking for a clean way of doing that without opening the SBML model. But, this would do the job.
Herbert M Sauro <>: Mar 25 07:16PM -0700

See Lucian reply, I’d forgotten we have a new api to manipulate a model
On Thu, Mar 25, 2021 at 4:07 PM Jalil Nourisa <>
> On 25. Mar 2021, at 22:04, Herbert M Sauro <> wrote:
> antStr = r.getAntimony ()
> --
Herbert Sauro, Professor
University of Washington, Bioengineering
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to

Reply all
Reply to author
0 new messages