Skip to content

Commit

Permalink
Merge pull request #425 from sys-bio/develop
Browse files Browse the repository at this point in the history
Pull to Develop
  • Loading branch information
Kiri Choi authored Jan 17, 2019
2 parents cd4b3b4 + 2c26e47 commit 08705f3
Show file tree
Hide file tree
Showing 228 changed files with 4,610 additions and 6,261 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ examples/tellurium-files/phrasedml/results/
examples/tellurium-files/omex/results/
tellurium/tests/testdata/sedml/sed-ml/results/

# Mac .DS_store
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ If you use Tellurium in your research, we would appreciate following citations i

Medley et al. (2018) ["Tellurium notebooks—An environment for reproducible dynamical modeling in systems biology"](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006220) PLoS Computational Biology 14(6) e1006220.

Choi et al. (2018) ["Tellurium: An extensible python-based modeling environment for systems and synthetic biology"](https://www.sciencedirect.com/science/article/pii/S0303264718301254) Biosystems.
Choi et al. (2018) ["Tellurium: An extensible python-based modeling environment for systems and synthetic biology"](https://www.sciencedirect.com/science/article/pii/S0303264718301254) Biosystems 171 74-79.

## Contact Us

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/_notebooks/core/antimonyExample.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ simulation.
--------------------------------------------------------------------------------
tellurium : 2.1.0
roadrunner : 1.4.24
roadrunner : 1.5.1
antimony : 2.9.4
libsbml : 5.15.0
libsedml : 0.4.3
Expand Down
Binary file modified docs/_notebooks/core/antimonyExample_files/antimonyExample_2_1.png
Binary file modified docs/_notebooks/core/antimonyExample_files/antimonyExample_2_3.png
6 changes: 3 additions & 3 deletions docs/_notebooks/core/combineExample.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ stored as Combine Archive.

.. parsed-literal::
{'/tmp/tmpuso70njf/main.xml': {'code': 'r"""\n####################################################################################################\n tellurium 2.1.0\n-+++++++++++++++++- Python Environment for Modeling and Simulating Biological Systems\n .+++++++++++++++.\n .+++++++++++++. Homepage: http://tellurium.analogmachine.org/\n-//++++++++++++/. -:/-` Documentation: https://tellurium.readthedocs.io/en/latest/index.html\n.----:+++++++/.++ .++++/ Forum: https://groups.google.com/forum/#!forum/tellurium-discuss\n :+++++: .+:` .--++ Bug reports: https://github.com/sys-bio/tellurium/issues\n -+++- ./+:-://. Repository: https://github.com/sys-bio/tellurium\n .+. `...`\n\nSED-ML simulation experiments: http://www.sed-ml.org/\n sedmlDoc: L1V2 \n inputType: \'SEDML_FILE\'\n workingDir: \'/tmp/tmpuso70njf\'\n saveOutputs: \'False\'\n outputDir: \'None\'\n plottingEngine: \'<MatplotlibEngine>\'\n\nLinux-4.1.7-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two\npython 3.6.3 (default, Oct 25 2017, 01:09:07) \n[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]\n####################################################################################################\n"""\nimport tellurium as te\nfrom roadrunner import Config\nfrom tellurium.sedml.mathml import *\nfrom tellurium.sedml.tesedml import process_trace, terminate_trace, fix_endpoints\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport mpl_toolkits.mplot3d\ntry:\n import tesedml as libsedml\nexcept ImportError:\n import libsedml\nimport pandas\nimport os.path\nConfig.LOADSBMLOPTIONS_RECOMPILE = True\n\nworkingDir = r\'/tmp/tmpuso70njf\'\n\n# --------------------------------------------------------\n# Models\n# --------------------------------------------------------\n# Model <model1>\nmodel1 = te.loadSBMLModel(os.path.join(workingDir, \'myModel.xml\'))\n\n\n\n\n# --------------------------------------------------------\n# Tasks\n# --------------------------------------------------------\n# Task <task1>\n# Task: <task1>\ntask1 = [None]\nmodel1.setIntegrator(\'cvode\')\nif model1.conservedMoietyAnalysis == True: model1.conservedMoietyAnalysis = False\nmodel1.timeCourseSelections = [\'time\', \'[S1]\', \'[S2]\']\nmodel1.reset()\ntask1[0] = model1.simulate(start=0.0, end=5.0, steps=100)\n\n# --------------------------------------------------------\n# DataGenerators\n# --------------------------------------------------------\n# DataGenerator <plot_0_0_0>\n__var__time = np.concatenate([sim[\'time\'] for sim in task1])\nif len(__var__time.shape) == 1:\n __var__time.shape += (1,)\nplot_0_0_0 = __var__time\n# DataGenerator <plot_0_0_1>\n__var__S1 = np.concatenate([sim[\'[S1]\'] for sim in task1])\nif len(__var__S1.shape) == 1:\n __var__S1.shape += (1,)\nplot_0_0_1 = __var__S1\n# DataGenerator <plot_0_1_1>\n__var__S2 = np.concatenate([sim[\'[S2]\'] for sim in task1])\nif len(__var__S2.shape) == 1:\n __var__S2.shape += (1,)\nplot_0_1_1 = __var__S2\n\n# --------------------------------------------------------\n# Outputs\n# --------------------------------------------------------\n# Output <plot_0>\n_stacked = False\nif _stacked:\n tefig = te.getPlottingEngine().newStackedFigure(title=\'Figure 1\', xtitle=\'time\')\nelse:\n tefig = te.nextFigure(title=\'Figure 1\', xtitle=\'time\')\n\nfor k in range(plot_0_0_0.shape[1]):\n extra_args = {}\n if k == 0:\n extra_args[\'name\'] = \'S1\'\n tefig.addXYDataset(plot_0_0_0[:,k], plot_0_0_1[:,k], color=\'C0\', tag=\'tag0\', logx=False, logy=False, **extra_args)\nfor k in range(plot_0_0_0.shape[1]):\n extra_args = {}\n if k == 0:\n extra_args[\'name\'] = \'S2\'\n tefig.addXYDataset(plot_0_0_0[:,k], plot_0_1_1[:,k], color=\'C1\', tag=\'tag1\', logx=False, logy=False, **extra_args)\nif te.tiledFigure():\n\n if te.tiledFigure().renderIfExhausted():\n\n te.clearTiledFigure()\n\nelse:\n\n fig = tefig.render()\n\n####################################################################################################',
{'/tmp/tmp2clb19gp/main.xml': {'code': 'r"""\n####################################################################################################\n tellurium 2.1.0\n-+++++++++++++++++- Python Environment for Modeling and Simulating Biological Systems\n .+++++++++++++++.\n .+++++++++++++. Homepage: http://tellurium.analogmachine.org/\n-//++++++++++++/. -:/-` Documentation: https://tellurium.readthedocs.io/en/latest/index.html\n.----:+++++++/.++ .++++/ Forum: https://groups.google.com/forum/#!forum/tellurium-discuss\n :+++++: .+:` .--++ Bug reports: https://github.com/sys-bio/tellurium/issues\n -+++- ./+:-://. Repository: https://github.com/sys-bio/tellurium\n .+. `...`\n\nSED-ML simulation experiments: http://www.sed-ml.org/\n sedmlDoc: L1V2 \n inputType: \'SEDML_FILE\'\n workingDir: \'/tmp/tmp2clb19gp\'\n saveOutputs: \'False\'\n outputDir: \'None\'\n plottingEngine: \'<MatplotlibEngine>\'\n\nLinux-4.15.0-29-generic-x86_64-with-debian-buster-sid\npython 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) \n[GCC 7.2.0]\n####################################################################################################\n"""\nimport tellurium as te\nfrom roadrunner import Config\nfrom tellurium.sedml.mathml import *\nfrom tellurium.sedml.tesedml import process_trace, terminate_trace, fix_endpoints\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport mpl_toolkits.mplot3d\ntry:\n import tesedml as libsedml\nexcept ImportError:\n import libsedml\nimport pandas\nimport os.path\nConfig.LOADSBMLOPTIONS_RECOMPILE = True\n\nworkingDir = r\'/tmp/tmp2clb19gp\'\n\n# --------------------------------------------------------\n# Models\n# --------------------------------------------------------\n# Model <model1>\nmodel1 = te.loadSBMLModel(os.path.join(workingDir, \'myModel.xml\'))\n\n\n\n\n# --------------------------------------------------------\n# Tasks\n# --------------------------------------------------------\n# Task <task1>\n# Task: <task1>\ntask1 = [None]\nmodel1.setIntegrator(\'cvode\')\nif model1.conservedMoietyAnalysis == True: model1.conservedMoietyAnalysis = False\nmodel1.timeCourseSelections = [\'[S2]\', \'[S1]\', \'time\']\nmodel1.reset()\ntask1[0] = model1.simulate(start=0.0, end=5.0, steps=100)\n\n# --------------------------------------------------------\n# DataGenerators\n# --------------------------------------------------------\n# DataGenerator <plot_0_0_0>\n__var__time = np.concatenate([sim[\'time\'] for sim in task1])\nif len(__var__time.shape) == 1:\n __var__time.shape += (1,)\nplot_0_0_0 = __var__time\n# DataGenerator <plot_0_0_1>\n__var__S1 = np.concatenate([sim[\'[S1]\'] for sim in task1])\nif len(__var__S1.shape) == 1:\n __var__S1.shape += (1,)\nplot_0_0_1 = __var__S1\n# DataGenerator <plot_0_1_1>\n__var__S2 = np.concatenate([sim[\'[S2]\'] for sim in task1])\nif len(__var__S2.shape) == 1:\n __var__S2.shape += (1,)\nplot_0_1_1 = __var__S2\n\n# --------------------------------------------------------\n# Outputs\n# --------------------------------------------------------\n# Output <plot_0>\n_stacked = False\nif _stacked:\n tefig = te.getPlottingEngine().newStackedFigure(title=\'Figure 1\', xtitle=\'time\')\nelse:\n tefig = te.nextFigure(title=\'Figure 1\', xtitle=\'time\')\n\nfor k in range(plot_0_0_0.shape[1]):\n extra_args = {}\n if k == 0:\n extra_args[\'name\'] = \'S1\'\n tefig.addXYDataset(plot_0_0_0[:,k], plot_0_0_1[:,k], color=\'C0\', tag=\'tag0\', logx=False, logy=False, **extra_args)\nfor k in range(plot_0_0_0.shape[1]):\n extra_args = {}\n if k == 0:\n extra_args[\'name\'] = \'S2\'\n tefig.addXYDataset(plot_0_0_0[:,k], plot_0_1_1[:,k], color=\'C1\', tag=\'tag1\', logx=False, logy=False, **extra_args)\nif te.tiledFigure():\n\n if te.tiledFigure().renderIfExhausted():\n\n te.clearTiledFigure()\n\nelse:\n\n fig = tefig.render()\n\n####################################################################################################',
'platform': 'Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid',
'dataGenerators': {'plot_0_0_0': array([[0. ],
[0.05],
[0.1 ],
Expand Down Expand Up @@ -356,7 +357,6 @@ stored as Combine Archive.
[9.92171419],
[9.92553221],
[9.92916402],
[9.9326187 ]])},
'platform': 'Linux-4.1.7-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two'}}
[9.9326187 ]])}}}
Binary file modified docs/_notebooks/core/combineExample_files/combineExample_2_0.png
Binary file modified docs/_notebooks/core/combineExample_files/combineExample_3_0.png
5 changes: 1 addition & 4 deletions docs/_notebooks/core/computeSteadyState.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Steady states can be calculated using ``r.getSteadyStateValues``
import tellurium as te
from roadrunner import Config
Config.setValue(Config.LOADSBMLOPTIONS_CONSERVED_MOIETIES, True)
r = te.loada('''
model pathway()
$Xo -> S1; k1*Xo - k2*S1
Expand All @@ -29,11 +27,10 @@ Steady states can be calculated using ``r.getSteadyStateValues``
values = r.getSteadyStateValues()
for sid, value in zip(r.steadyStateSelections, r.getSteadyStateValues()):
print(sid, "=", value)
Config.setValue(Config.LOADSBMLOPTIONS_CONSERVED_MOIETIES, False)
.. parsed-literal::
[S1] = 0.17857142857142858
[S2] = 0.0
[S2] = 4.5150957559317066e-35
Binary file modified docs/_notebooks/core/introduction_files/introduction_2_0.png
Binary file modified docs/_notebooks/core/introduction_files/introduction_4_0.png
9 changes: 9 additions & 0 deletions docs/_notebooks/core/methods_installing_packages.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

How to install additional packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are using Tellurium notebook or Tellurium Spyder, you can install
additional package using ``installPackage`` function. In Tellurium
Spyder, you can also install packages using included command Prompt. For
more information, see `Running Command Prompt for Tellurium
Spyder <https://tellurium.readthedocs.io/en/latest/walkthrough.html#running-command-prompt-for-tellurium-spyder>`__.

.. code-block:: python
import tellurium as te
Expand Down
50 changes: 2 additions & 48 deletions docs/_notebooks/core/model_modelFromBioModels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,11 @@ URL to directly load ``BIOMD0000000010``.
import tellurium as te
# Load model from biomodels (may not work with https).
r = te.loadSBMLModel("http://biomodels.caltech.edu/download?mid=BIOMD0000000010")
r = te.loadSBMLModel("https://www.ebi.ac.uk/biomodels-main/download?mid=BIOMD0000000010")
result = r.simulate(0, 3000, 5000)
r.plot(result)
::

---------------------------------------------------------------------------

RuntimeError Traceback (most recent call last)

<ipython-input-1-8a25f612667b> in <module>()
5
6 # Load model from biomodels (may not work with https).
----> 7 r = te.loadSBMLModel("http://biomodels.caltech.edu/download?mid=BIOMD0000000010")
8 result = r.simulate(0, 3000, 5000)
9 r.plot(result)


/extra/devel/src/tellurium/tellurium/tellurium.py in loadSBMLModel(sbml)
557 :rtype: roadrunner.ExtendedRoadRunner
558 """
--> 559 return roadrunner.RoadRunner(sbml)
560
561


/extra/devel/src/tellurium/tellurium/roadrunner/extended_roadrunner.py in __init__(self, *args, **kwargs)
14
15 def __init__(self, *args, **kwargs):
---> 16 super(ExtendedRoadRunner, self).__init__(*args, **kwargs)
17
18 # ---------------------------------------------------------------------


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/roadrunner/roadrunner.py in _new_init(self, *args)
3513 return
3514 # Otherwise, use regular init
-> 3515 RoadRunner._swig_init(self, *args)
3516 RoadRunner._makeProperties(self)
3517


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/roadrunner/roadrunner.py in __init__(self, *args)
2520
2521 def __init__(self, *args):
-> 2522 this = _roadrunner.new_RoadRunner(*args)
2523 try:
2524 self.this.append(this)


RuntimeError: static std::string rr::SBMLReader::read(const string&), could not open http://biomodels.caltech.edu/download?mid=BIOMD0000000010 as a file or uri
.. image:: _notebooks/core/model_modelFromBioModels_files/model_modelFromBioModels_2_0.png

98 changes: 7 additions & 91 deletions docs/_notebooks/core/parameter_scan.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
Perform Parameter Scan
~~~~~~~~~~~~~~~~~~~~~~

``plotPolyArray()`` example

Parameter scan
~~~~~~~~~~~~~~

Perform a parameter scan.

.. code:: ipython2
.. code-block:: python
import tellurium as te
Expand Down Expand Up @@ -37,91 +35,11 @@ Perform a parameter scan.
p.plotPolyArray()
::


---------------------------------------------------------------------------

TypeError Traceback (most recent call last)

<ipython-input-1-f092f852a16c> in <module>()
28 )
29 # plot
---> 30 p.plotPolyArray()

/extra/devel/src/tellurium/tellurium/analysis/parameterscan.py in plotPolyArray(self)
349
350 if not IPYTHON:
--> 351 self.plotPolyArrayFunction(result)
352 return result
353 else:


/extra/devel/src/tellurium/tellurium/analysis/parameterscan.py in plotPolyArrayFunction(self, result)
301 if len(self.color) != self.polyNumber:
302 self.color = self.colorCycle()
--> 303 poly = PolyCollection(result, facecolors=self.color, closed=False)
304
305 poly.set_alpha(self.alpha)


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/collections.py in __init__(self, verts, sizes, closed, **kwargs)
961 Collection.__init__(self, **kwargs)
962 self.set_sizes(sizes)
--> 963 self.set_verts(verts, closed)
964 self.stale = True
965


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/collections.py in set_verts(self, verts, closed)
986 self._paths.append(mpath.Path(xy))
987 else:
--> 988 self._paths = [mpath.Path(xy) for xy in verts]
989 self.stale = True
990

.. image:: _notebooks/core/parameter_scan_files/parameter_scan_2_0.png

~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/collections.py in <listcomp>(.0)
986 self._paths.append(mpath.Path(xy))
987 else:
--> 988 self._paths = [mpath.Path(xy) for xy in verts]
989 self.stale = True
990
``plotSurface()`` example


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/path.py in __init__(self, vertices, codes, _interpolation_steps, closed, readonly)
130 and codes as read-only arrays.
131 """
--> 132 vertices = _to_unmasked_float_array(vertices)
133 if (vertices.ndim != 2) or (vertices.shape[1] != 2):
134 raise ValueError(


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x)
2048 return np.ma.asarray(x, float).filled(np.nan)
2049 else:
-> 2050 return np.asarray(x, float)
2051
2052


~/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/numpy/core/numeric.py in asarray(a, dtype, order)
490
491 """
--> 492 return array(a, dtype, copy=False, order=order)
493
494


TypeError: float() argument must be a string or a number, not 'zip'



.. image:: _notebooks/core/parameter_scan_files/parameter_scan_2_1.png


.. code:: ipython2
.. code-block:: python
r = te.loada('''
$Xo -> S1; vo;
Expand Down Expand Up @@ -150,7 +68,5 @@ Perform a parameter scan.
# plot
p.plotSurface()
.. image:: _notebooks/core/parameter_scan_files/parameter_scan_3_0.png

Diff not rendered.
Binary file modified docs/_notebooks/core/parameter_scan_files/parameter_scan_3_0.png
15 changes: 5 additions & 10 deletions docs/_notebooks/core/plot2DParameterScan.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

.. code:: ipython2
.. code-block:: python
import warnings
warnings.filterwarnings("ignore")
import tellurium as te
from tellurium.analysis.parameterscan import plot2DParameterScan
Expand All @@ -26,14 +29,6 @@
.. image:: _notebooks/core/plot2DParameterScan_files/plot2DParameterScan_0_0.png


.. parsed-literal::
/home/poltergeist/.config/Tellurium/telocal/python-3.6.3/lib/python3.6/site-packages/matplotlib/figure.py:459: UserWarning:
matplotlib is currently using a non-GUI backend, so cannot show the figure

.. image:: _notebooks/core/plot2DParameterScan_files/plot2DParameterScan_0_2.png
.. image:: _notebooks/core/plot2DParameterScan_files/plot2DParameterScan_0_1.png

Diff not rendered.
3 changes: 1 addition & 2 deletions docs/_notebooks/core/roadrunnerBasics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ Selections

The selections list can be used to set which state variables will appear
in the output array. By default, it includes all SBML species and the
``time`` variable. Selections can be either given as argument to
``r.simulate``.
``time`` variable. Selections can be given as an argument to ``r.simulate``.

.. code-block:: python
Expand Down
33 changes: 28 additions & 5 deletions docs/_notebooks/core/steadystate_scan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ Steady state scan
Using ``te.ParameterScan.SteadyStateScan`` for scanning the steady
state.

.. code:: ipython2
.. code-block:: python
import tellurium as te
import matplotlib.pyplot as plt
import tellurium as te
import numpy as np
from roadrunner import Config
Config.setValue(Config.LOADSBMLOPTIONS_CONSERVED_MOIETIES, True)
r = te.loada('''
$Xo -> S1; vo;
S1 -> S2; k1*S1 - k2*S2;
Expand All @@ -33,10 +31,35 @@ state.
selection = ['S1', 'S2']
)
p.plotArray()
Config.setValue(Config.LOADSBMLOPTIONS_CONSERVED_MOIETIES, False)
.. image:: _notebooks/core/steadystate_scan_files/steadystate_scan_2_0.png




.. parsed-literal::
array([[2.05263158, 0.5 , 0.48717949],
[2.10526316, 0.5 , 0.475 ],
[2.15789474, 0.5 , 0.46341463],
[2.21052632, 0.5 , 0.45238095],
[2.26315789, 0.5 , 0.44186047],
[2.31578947, 0.5 , 0.43181818],
[2.36842105, 0.5 , 0.42222222],
[2.42105263, 0.5 , 0.41304348],
[2.47368421, 0.5 , 0.40425532],
[2.52631579, 0.5 , 0.39583333],
[2.57894737, 0.5 , 0.3877551 ],
[2.63157895, 0.5 , 0.38 ],
[2.68421053, 0.5 , 0.37254902],
[2.73684211, 0.5 , 0.36538462],
[2.78947368, 0.5 , 0.35849057],
[2.84210526, 0.5 , 0.35185185],
[2.89473684, 0.5 , 0.34545455],
[2.94736842, 0.5 , 0.33928571],
[3. , 0.5 , 0.33333333],
[3.05263158, 0.5 , 0.32758621]])
Loading

0 comments on commit 08705f3

Please sign in to comment.