# Elementary tutorial: Importing systems biology models from SBML

See PySCes_import_test.py.

PyDSTool does not directly support the importing of Systems Biology Markup Language (SBML) model specifications. Instead, the systems biology package PySCes is relied upon. Details of installing that software can be found in the link. The PySCes_SBML toolbox is currently in development. Only some features are currently imported, but it is being actively developed in collaboration with the authors of PySCes.


from PyDSTool import *
from PyDSTool.Toolbox.PySCes_SBML import *

print "Modify the path variable to indicate where your PySCes models are..."
path = '/pysces/pscmodels/'
### Select one of the models provided by the package by uncommenting!
#fname = 'pysces_test_linear1.psc'
fname = 'pysces_test_branch1.psc'
#fname = 'pysces_test_pitcon.psc'

gen = get_pysces_model(path+fname, 'Vode')
gen.set(tdata=[0,10])
gen.set(algparams={'init_step': 0.03})
traj=gen.compute('test')
pts=traj.sample()
for x in pts.coordnames:
plot(pts['t'],pts[x])



## Importing models with SloppyCell

An alternative is importing SBML models into the python-based SloppyCell systems biology software package. SloppyCell was developed by Jim Sethna's group at Cornell University. This interface toolkit builds PyDSTool models from exported SloppyCell model specifications, using the ModelSpec scripting language. See the example script PyDSTool/Toolbox/makeSloppyModel.py taking its input from SloppyCell's ReactionNetworks.Network_mod.get_eqn_structure export method (read here for a recent forum discussion).