diff --git a/notebooks/copasi_process_composer.ipynb b/notebooks/copasi_process_composer.ipynb new file mode 100644 index 000000000..d8a1edec8 --- /dev/null +++ b/notebooks/copasi_process_composer.ipynb @@ -0,0 +1,2431 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "9f7cc96191d5a2ba", + "metadata": { + "collapsed": false + }, + "source": [ + "## Examples with ```CopasiProcess``` using ``builder.Builder`` and ``biosimulator_processes.data_model``" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "b43cd4493a594e60", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:08.935312Z", + "start_time": "2024-03-04T16:42:08.931881Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "import sys \n", + "\n", + "sys.path.insert(0, '..')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "65385e04f4f5dd1a", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:10.809815Z", + "start_time": "2024-03-04T16:42:09.047667Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CobraProcess registered successfully.\n", + "CopasiProcess registered successfully.\n", + "SmoldynProcess registered successfully.\n", + "TelluriumProcess registered successfully.\n" + ] + } + ], + "source": [ + "from builder import Builder, Process\n", + "from process_bigraph import pp, pf \n", + "from biosimulator_processes import CORE\n", + "from biosimulator_processes.data_model import *\n", + "from biosimulator_processes.biosimulator_builder import BiosimulatorBuilder" + ] + }, + { + "cell_type": "markdown", + "id": "99dbe025aeccc23e", + "metadata": { + "collapsed": false + }, + "source": [ + "#### Initialize a fresh instance of the `BiosimulatorBuilder`, which is inherently configured by `biosimulator_processes.CORE`." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "cc709690e20090cf", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:10.810196Z", + "start_time": "2024-03-04T16:42:10.808054Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "b = BiosimulatorBuilder()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "41034be54d9cf16", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:10.813366Z", + "start_time": "2024-03-04T16:42:10.811517Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "['CobraProcess',\n", + " 'CopasiProcess',\n", + " 'console-emitter',\n", + " 'SmoldynProcess',\n", + " 'TelluriumProcess',\n", + " 'ram-emitter']" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "###### list registered processes\n", + "\n", + "b.list_processes()" + ] + }, + { + "cell_type": "markdown", + "id": "f46d9983b127470", + "metadata": { + "collapsed": false + }, + "source": [ + "Let's load a BIOMODEL from `basico` and inspect the parameters we can adjust:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f1e5eedb251a22c3", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:10.828221Z", + "start_time": "2024-03-04T16:42:10.813820Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "eea00feb4c2651d6", + "metadata": { + "collapsed": false + }, + "source": [ + "#### Example 1: Add a simple `CopasiProcess`-based composite to the bigraph, specifying parameter values through the `data_model`. For now, let's try loading a biomodel and adding a change to initial concentration of a species. We will then add another copasi process instance, whose model is this time loaded from a file (to demonstrate the data model)" + ] + }, + { + "cell_type": "markdown", + "id": "640f49c1e61f116d", + "metadata": { + "collapsed": false + }, + "source": [ + "Let's define a model instance from a file." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "edf123175ec3408c", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:12.560995Z", + "start_time": "2024-03-04T16:42:12.555910Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from basico import * \n", + "\n", + "\n", + "model_filepath = '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'\n", + "\n", + "os.path.exists(model_filepath)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "40ab6f70ac3f4996", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:13.555997Z", + "start_time": "2024-03-04T16:42:13.490510Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
compartmenttypeunitinitial_concentrationinitial_particle_numberinitial_expressionexpressionconcentrationparticle_numberrateparticle_number_ratekeysbml_id
name
Extracellular glucoseextracellularreactionsmmol/l6.7000004.034834e+216.7000004.034834e+21-1.139132e+00-6.860013e+20Metabolite_0GlcX
Cytosolic glucosecytosolreactionsmmol/l0.5730743.451132e+200.5730743.451132e+206.820866e+014.107622e+22Metabolite_1Glc
ATPcytosolreactionsmmol/l2.1000001.264650e+212.1000001.264650e+21-5.374740e-04-3.236744e+17Metabolite_2ATP
Glucose-6-Phosphatecytosolreactionsmmol/l4.2000002.529299e+214.2000002.529299e+212.292073e-051.380319e+16Metabolite_3G6P
ADPcytosolreactionsmmol/l1.5000009.033211e+201.5000009.033211e+209.874740e-045.946708e+17Metabolite_4ADP
Fructose-6-Phosphatecytosolreactionsmmol/l0.4900002.950849e+200.4900002.950849e+20-2.357096e-05-1.419477e+16Metabolite_5F6P
Fructose 1,6-bisphosphatecytosolreactionsmmol/l4.6400002.794273e+214.6400002.794273e+213.000184e-051.806753e+16Metabolite_6FBP
Glyceraldehyde 3-phosphatecytosolreactionsmmol/l0.1150006.925462e+190.1150006.925462e+19-1.056219e-04-6.360699e+16Metabolite_7GAP
Dihydroxyacetone phosphatecytosolreactionsmmol/l2.9500001.776532e+212.9500001.776532e+218.613930e-055.187430e+16Metabolite_8DHAP
NADcytosolreactionsmmol/l0.6500003.914391e+200.6500003.914391e+20-5.799246e-05-3.492388e+16Metabolite_9NAD
1,3-Bisphosphoglyceratecytosolreactionsmmol/l0.0002701.625978e+170.0002701.625978e+175.878219e-053.539946e+16Metabolite_10BPG
NADHcytosolreactionsmmol/l0.3300001.987306e+200.3300001.987306e+205.799246e-053.492388e+16Metabolite_11NADH
Phosphoenolpyruvatecytosolreactionsmmol/l0.0400002.408856e+190.0400002.408856e+19-2.664671e-05-1.604702e+16Metabolite_12PEP
Pyruvatecytosolreactionsmmol/l8.7000005.239262e+218.7000005.239262e+21-3.001996e-05-1.807844e+16Metabolite_13Pyr
Acetaldehydecytosolreactionsmmol/l1.4815308.921982e+201.4815308.921982e+205.754463e-053.465418e+16Metabolite_14ACA
EtOHcytosolreactionsmmol/l19.2379001.158533e+2219.2379001.158533e+227.012204e-054.222848e+16Metabolite_15EtOH
Extracellular ethanolextracellularreactionsmmol/l16.4514009.907265e+2116.4514009.907265e+21-1.437288e-06-8.655551e+14Metabolite_16EtOHX
Glycerolcytosolreactionsmmol/l4.1960002.526890e+214.1960002.526890e+21-1.733231e-05-1.043776e+16Metabolite_17Glyc
Extracellular glycerolextracellularreactionsmmol/l1.6847801.014598e+211.6847801.014598e+213.566102e-072.147557e+14Metabolite_18GlycX
Extracellular acetaldehydeextracellularreactionsmmol/l1.2883607.758685e+201.2883607.758685e+201.261075e-077.594373e+13Metabolite_19ACAX
Extracellular cyanideextracellularreactionsmmol/l5.2035803.133669e+215.2035803.133669e+219.153125e-085.512141e+13Metabolite_20CNX
AMPcytosolreactionsmmol/l0.3300001.987306e+200.3300001.987306e+20-4.500000e-04-2.709963e+17Metabolite_21AMP
Pextracellularfixedmmol/l0.0000000.000000e+000.0000000.000000e+000.000000e+000.000000e+00Metabolite_22P
Mixed flow cyanideextracellularfixedmmol/l5.6000003.372399e+215.6000003.372399e+210.000000e+000.000000e+00Metabolite_23CNX0
Mixed flow glucoseextracellularfixedmmol/l24.0000001.445314e+2224.0000001.445314e+220.000000e+000.000000e+00Metabolite_24GlcX0
\n", + "
" + ], + "text/plain": [ + " compartment type unit \\\n", + "name \n", + "Extracellular glucose extracellular reactions mmol/l \n", + "Cytosolic glucose cytosol reactions mmol/l \n", + "ATP cytosol reactions mmol/l \n", + "Glucose-6-Phosphate cytosol reactions mmol/l \n", + "ADP cytosol reactions mmol/l \n", + "Fructose-6-Phosphate cytosol reactions mmol/l \n", + "Fructose 1,6-bisphosphate cytosol reactions mmol/l \n", + "Glyceraldehyde 3-phosphate cytosol reactions mmol/l \n", + "Dihydroxyacetone phosphate cytosol reactions mmol/l \n", + "NAD cytosol reactions mmol/l \n", + "1,3-Bisphosphoglycerate cytosol reactions mmol/l \n", + "NADH cytosol reactions mmol/l \n", + "Phosphoenolpyruvate cytosol reactions mmol/l \n", + "Pyruvate cytosol reactions mmol/l \n", + "Acetaldehyde cytosol reactions mmol/l \n", + "EtOH cytosol reactions mmol/l \n", + "Extracellular ethanol extracellular reactions mmol/l \n", + "Glycerol cytosol reactions mmol/l \n", + "Extracellular glycerol extracellular reactions mmol/l \n", + "Extracellular acetaldehyde extracellular reactions mmol/l \n", + "Extracellular cyanide extracellular reactions mmol/l \n", + "AMP cytosol reactions mmol/l \n", + "P extracellular fixed mmol/l \n", + "Mixed flow cyanide extracellular fixed mmol/l \n", + "Mixed flow glucose extracellular fixed mmol/l \n", + "\n", + " initial_concentration initial_particle_number \\\n", + "name \n", + "Extracellular glucose 6.700000 4.034834e+21 \n", + "Cytosolic glucose 0.573074 3.451132e+20 \n", + "ATP 2.100000 1.264650e+21 \n", + "Glucose-6-Phosphate 4.200000 2.529299e+21 \n", + "ADP 1.500000 9.033211e+20 \n", + "Fructose-6-Phosphate 0.490000 2.950849e+20 \n", + "Fructose 1,6-bisphosphate 4.640000 2.794273e+21 \n", + "Glyceraldehyde 3-phosphate 0.115000 6.925462e+19 \n", + "Dihydroxyacetone phosphate 2.950000 1.776532e+21 \n", + "NAD 0.650000 3.914391e+20 \n", + "1,3-Bisphosphoglycerate 0.000270 1.625978e+17 \n", + "NADH 0.330000 1.987306e+20 \n", + "Phosphoenolpyruvate 0.040000 2.408856e+19 \n", + "Pyruvate 8.700000 5.239262e+21 \n", + "Acetaldehyde 1.481530 8.921982e+20 \n", + "EtOH 19.237900 1.158533e+22 \n", + "Extracellular ethanol 16.451400 9.907265e+21 \n", + "Glycerol 4.196000 2.526890e+21 \n", + "Extracellular glycerol 1.684780 1.014598e+21 \n", + "Extracellular acetaldehyde 1.288360 7.758685e+20 \n", + "Extracellular cyanide 5.203580 3.133669e+21 \n", + "AMP 0.330000 1.987306e+20 \n", + "P 0.000000 0.000000e+00 \n", + "Mixed flow cyanide 5.600000 3.372399e+21 \n", + "Mixed flow glucose 24.000000 1.445314e+22 \n", + "\n", + " initial_expression expression concentration \\\n", + "name \n", + "Extracellular glucose 6.700000 \n", + "Cytosolic glucose 0.573074 \n", + "ATP 2.100000 \n", + "Glucose-6-Phosphate 4.200000 \n", + "ADP 1.500000 \n", + "Fructose-6-Phosphate 0.490000 \n", + "Fructose 1,6-bisphosphate 4.640000 \n", + "Glyceraldehyde 3-phosphate 0.115000 \n", + "Dihydroxyacetone phosphate 2.950000 \n", + "NAD 0.650000 \n", + "1,3-Bisphosphoglycerate 0.000270 \n", + "NADH 0.330000 \n", + "Phosphoenolpyruvate 0.040000 \n", + "Pyruvate 8.700000 \n", + "Acetaldehyde 1.481530 \n", + "EtOH 19.237900 \n", + "Extracellular ethanol 16.451400 \n", + "Glycerol 4.196000 \n", + "Extracellular glycerol 1.684780 \n", + "Extracellular acetaldehyde 1.288360 \n", + "Extracellular cyanide 5.203580 \n", + "AMP 0.330000 \n", + "P 0.000000 \n", + "Mixed flow cyanide 5.600000 \n", + "Mixed flow glucose 24.000000 \n", + "\n", + " particle_number rate \\\n", + "name \n", + "Extracellular glucose 4.034834e+21 -1.139132e+00 \n", + "Cytosolic glucose 3.451132e+20 6.820866e+01 \n", + "ATP 1.264650e+21 -5.374740e-04 \n", + "Glucose-6-Phosphate 2.529299e+21 2.292073e-05 \n", + "ADP 9.033211e+20 9.874740e-04 \n", + "Fructose-6-Phosphate 2.950849e+20 -2.357096e-05 \n", + "Fructose 1,6-bisphosphate 2.794273e+21 3.000184e-05 \n", + "Glyceraldehyde 3-phosphate 6.925462e+19 -1.056219e-04 \n", + "Dihydroxyacetone phosphate 1.776532e+21 8.613930e-05 \n", + "NAD 3.914391e+20 -5.799246e-05 \n", + "1,3-Bisphosphoglycerate 1.625978e+17 5.878219e-05 \n", + "NADH 1.987306e+20 5.799246e-05 \n", + "Phosphoenolpyruvate 2.408856e+19 -2.664671e-05 \n", + "Pyruvate 5.239262e+21 -3.001996e-05 \n", + "Acetaldehyde 8.921982e+20 5.754463e-05 \n", + "EtOH 1.158533e+22 7.012204e-05 \n", + "Extracellular ethanol 9.907265e+21 -1.437288e-06 \n", + "Glycerol 2.526890e+21 -1.733231e-05 \n", + "Extracellular glycerol 1.014598e+21 3.566102e-07 \n", + "Extracellular acetaldehyde 7.758685e+20 1.261075e-07 \n", + "Extracellular cyanide 3.133669e+21 9.153125e-08 \n", + "AMP 1.987306e+20 -4.500000e-04 \n", + "P 0.000000e+00 0.000000e+00 \n", + "Mixed flow cyanide 3.372399e+21 0.000000e+00 \n", + "Mixed flow glucose 1.445314e+22 0.000000e+00 \n", + "\n", + " particle_number_rate key sbml_id \n", + "name \n", + "Extracellular glucose -6.860013e+20 Metabolite_0 GlcX \n", + "Cytosolic glucose 4.107622e+22 Metabolite_1 Glc \n", + "ATP -3.236744e+17 Metabolite_2 ATP \n", + "Glucose-6-Phosphate 1.380319e+16 Metabolite_3 G6P \n", + "ADP 5.946708e+17 Metabolite_4 ADP \n", + "Fructose-6-Phosphate -1.419477e+16 Metabolite_5 F6P \n", + "Fructose 1,6-bisphosphate 1.806753e+16 Metabolite_6 FBP \n", + "Glyceraldehyde 3-phosphate -6.360699e+16 Metabolite_7 GAP \n", + "Dihydroxyacetone phosphate 5.187430e+16 Metabolite_8 DHAP \n", + "NAD -3.492388e+16 Metabolite_9 NAD \n", + "1,3-Bisphosphoglycerate 3.539946e+16 Metabolite_10 BPG \n", + "NADH 3.492388e+16 Metabolite_11 NADH \n", + "Phosphoenolpyruvate -1.604702e+16 Metabolite_12 PEP \n", + "Pyruvate -1.807844e+16 Metabolite_13 Pyr \n", + "Acetaldehyde 3.465418e+16 Metabolite_14 ACA \n", + "EtOH 4.222848e+16 Metabolite_15 EtOH \n", + "Extracellular ethanol -8.655551e+14 Metabolite_16 EtOHX \n", + "Glycerol -1.043776e+16 Metabolite_17 Glyc \n", + "Extracellular glycerol 2.147557e+14 Metabolite_18 GlycX \n", + "Extracellular acetaldehyde 7.594373e+13 Metabolite_19 ACAX \n", + "Extracellular cyanide 5.512141e+13 Metabolite_20 CNX \n", + "AMP -2.709963e+17 Metabolite_21 AMP \n", + "P 0.000000e+00 Metabolite_22 P \n", + "Mixed flow cyanide 0.000000e+00 Metabolite_23 CNX0 \n", + "Mixed flow glucose 0.000000e+00 Metabolite_24 GlcX0 " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model_from_file = load_model(model_filepath)\n", + "get_species(model=model_from_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "d02a547b85138f96", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:14.251034Z", + "start_time": "2024-03-04T16:42:14.219527Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'global_parameter_changes': [],\n", + " 'reaction_changes': [],\n", + " 'species_changes': [ { 'expression': '',\n", + " 'initial_concentration': 9.261000000000001,\n", + " 'initial_expression': '',\n", + " 'initial_particle_number': None,\n", + " 'name': 'ADP',\n", + " 'unit': ''}]}\n" + ] + } + ], + "source": [ + "# 1. specify model changes\n", + "process_model_changes = ModelChanges(\n", + " species_changes=[SpeciesChanges(name='ADP', initial_concentration=2.1**3)]\n", + ")\n", + "\n", + "\n", + "pp(process_model_changes.model_dump())" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "1b6c269646357d7d", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:14.814108Z", + "start_time": "2024-03-04T16:42:14.810827Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [],\n", + " 'species_changes': [ { 'expression': '',\n", + " 'initial_concentration': 9.261000000000001,\n", + " 'initial_expression': '',\n", + " 'initial_particle_number': None,\n", + " 'name': 'ADP',\n", + " 'unit': ''}]},\n", + " 'model_id': 'copasi_process_from_file',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'Simple Composite Process from File',\n", + " 'model_source': { 'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", + " 'model_units': None}\n" + ] + } + ], + "source": [ + "# 2. define the model schema to be used by the composite process (one of the copasiprocess config parameters)\n", + "\n", + "process_model_from_file = Model(\n", + " model_id='copasi_process_from_file',\n", + " model_source=model_filepath,\n", + " model_name='Simple Composite Process from File',\n", + " model_changes=process_model_changes\n", + ")\n", + "\n", + "\n", + "pp(process_model_from_file.model_dump())" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "5d434956e65b1a42", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:15.337152Z", + "start_time": "2024-03-04T16:42:15.334361Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'method': 'stochastic',\n", + " 'model': { 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [],\n", + " 'species_changes': [ { 'expression': '',\n", + " 'initial_concentration': 9.261000000000001,\n", + " 'initial_expression': '',\n", + " 'initial_particle_number': None,\n", + " 'name': 'ADP',\n", + " 'unit': ''}]},\n", + " 'model_id': 'copasi_process_from_file',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'Simple Composite Process from File',\n", + " 'model_source': { 'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", + " 'model_units': None},\n", + " 'process_name': 'simple_copasi_from_file'}\n" + ] + } + ], + "source": [ + "# 3. Define config schema to be used as 'config' parameter of Process constructor\n", + "process_config_from_file = CopasiProcessConfigSchema(\n", + " method='stochastic',\n", + " model=process_model_from_file,\n", + " process_name='simple_copasi_from_file'\n", + ")\n", + "\n", + "\n", + "pp(process_config_from_file.model_dump())" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "de88e95d8f616779", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:16.043432Z", + "start_time": "2024-03-04T16:42:16.040674Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'model_id': 'copasi_process_from_file',\n", + " 'model_source': {'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'Simple Composite Process from File',\n", + " 'model_changes': {'species_changes': [{'name': 'ADP',\n", + " 'unit': '',\n", + " 'initial_concentration': 9.261000000000001,\n", + " 'initial_particle_number': None,\n", + " 'initial_expression': '',\n", + " 'expression': ''}],\n", + " 'global_parameter_changes': [],\n", + " 'reaction_changes': []},\n", + " 'model_units': None}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "process_config_from_file.model" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "52d81ea2ea688d47", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:16.698339Z", + "start_time": "2024-03-04T16:42:16.522040Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "# 4. Add the process instance by the name of 'simple_copasi' to the builder\n", + "\n", + "\n", + "b[process_config_from_file.process_name].add_process(\n", + " name='CopasiProcess',\n", + " model=process_config_from_file.model,\n", + " method=process_config_from_file.method\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "bfd4af678329923a", + "metadata": { + "collapsed": false + }, + "source": [ + "Let's load a BIOMODEL from `basico` and inspect the parameters we can adjust, and then add it to the composite process:" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "f499f96a817d9faf", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.725829Z", + "start_time": "2024-03-04T16:42:26.443059Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
compartmenttypeunitinitial_concentrationinitial_particle_numberinitial_expressionexpressionconcentrationparticle_numberrateparticle_number_ratekeysbml_id
name
EpoRJAK2cytreactionsnmol/l3.976220e+009.578143e+143.976220e+009.578143e+14-0.314737-7.581552e+13Metabolite_50EpoRJAK2
EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.3147377.581552e+13Metabolite_51EpoRpJAK2
p1EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_52p1EpoRpJAK2
p2EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_53p2EpoRpJAK2
p12EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_54p12EpoRpJAK2
EpoRJAK2_CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_55EpoRJAK2_CIS
SHP1cytreactionsnmol/l2.672510e+016.437693e+152.672510e+016.437693e+150.0000000.000000e+00Metabolite_56SHP1
SHP1Actcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_57SHP1Act
STAT5cytreactionsnmol/l7.975350e+011.921147e+167.975350e+011.921147e+160.0000000.000000e+00Metabolite_58STAT5
pSTAT5cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_59pSTAT5
npSTAT5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_60npSTAT5
CISnRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_61CISnRNA1
CISnRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_62CISnRNA2
CISnRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_63CISnRNA3
CISnRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_64CISnRNA4
CISnRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_65CISnRNA5
CISRNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_66CISRNA
CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_67CIS
SOCS3nRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_68SOCS3nRNA1
SOCS3nRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_69SOCS3nRNA2
SOCS3nRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_70SOCS3nRNA3
SOCS3nRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_71SOCS3nRNA4
SOCS3nRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_72SOCS3nRNA5
SOCS3RNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_73SOCS3RNA
SOCS3cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_74SOCS3
Epocytreactionsnmol/l1.249970e-073.010998e+071.249970e-073.010998e+070.0000000.000000e+00Metabolite_75Epo
\n", + "
" + ], + "text/plain": [ + " compartment type unit initial_concentration \\\n", + "name \n", + "EpoRJAK2 cyt reactions nmol/l 3.976220e+00 \n", + "EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \n", + "p1EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \n", + "p2EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \n", + "p12EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \n", + "EpoRJAK2_CIS cyt reactions nmol/l 0.000000e+00 \n", + "SHP1 cyt reactions nmol/l 2.672510e+01 \n", + "SHP1Act cyt reactions nmol/l 0.000000e+00 \n", + "STAT5 cyt reactions nmol/l 7.975350e+01 \n", + "pSTAT5 cyt reactions nmol/l 0.000000e+00 \n", + "npSTAT5 nuc reactions nmol/l 0.000000e+00 \n", + "CISnRNA1 nuc reactions nmol/l 0.000000e+00 \n", + "CISnRNA2 nuc reactions nmol/l 0.000000e+00 \n", + "CISnRNA3 nuc reactions nmol/l 0.000000e+00 \n", + "CISnRNA4 nuc reactions nmol/l 0.000000e+00 \n", + "CISnRNA5 nuc reactions nmol/l 0.000000e+00 \n", + "CISRNA cyt reactions nmol/l 0.000000e+00 \n", + "CIS cyt reactions nmol/l 0.000000e+00 \n", + "SOCS3nRNA1 nuc reactions nmol/l 0.000000e+00 \n", + "SOCS3nRNA2 nuc reactions nmol/l 0.000000e+00 \n", + "SOCS3nRNA3 nuc reactions nmol/l 0.000000e+00 \n", + "SOCS3nRNA4 nuc reactions nmol/l 0.000000e+00 \n", + "SOCS3nRNA5 nuc reactions nmol/l 0.000000e+00 \n", + "SOCS3RNA cyt reactions nmol/l 0.000000e+00 \n", + "SOCS3 cyt reactions nmol/l 0.000000e+00 \n", + "Epo cyt reactions nmol/l 1.249970e-07 \n", + "\n", + " initial_particle_number initial_expression expression \\\n", + "name \n", + "EpoRJAK2 9.578143e+14 \n", + "EpoRpJAK2 0.000000e+00 \n", + "p1EpoRpJAK2 0.000000e+00 \n", + "p2EpoRpJAK2 0.000000e+00 \n", + "p12EpoRpJAK2 0.000000e+00 \n", + "EpoRJAK2_CIS 0.000000e+00 \n", + "SHP1 6.437693e+15 \n", + "SHP1Act 0.000000e+00 \n", + "STAT5 1.921147e+16 \n", + "pSTAT5 0.000000e+00 \n", + "npSTAT5 0.000000e+00 \n", + "CISnRNA1 0.000000e+00 \n", + "CISnRNA2 0.000000e+00 \n", + "CISnRNA3 0.000000e+00 \n", + "CISnRNA4 0.000000e+00 \n", + "CISnRNA5 0.000000e+00 \n", + "CISRNA 0.000000e+00 \n", + "CIS 0.000000e+00 \n", + "SOCS3nRNA1 0.000000e+00 \n", + "SOCS3nRNA2 0.000000e+00 \n", + "SOCS3nRNA3 0.000000e+00 \n", + "SOCS3nRNA4 0.000000e+00 \n", + "SOCS3nRNA5 0.000000e+00 \n", + "SOCS3RNA 0.000000e+00 \n", + "SOCS3 0.000000e+00 \n", + "Epo 3.010998e+07 \n", + "\n", + " concentration particle_number rate particle_number_rate \\\n", + "name \n", + "EpoRJAK2 3.976220e+00 9.578143e+14 -0.314737 -7.581552e+13 \n", + "EpoRpJAK2 0.000000e+00 0.000000e+00 0.314737 7.581552e+13 \n", + "p1EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "p2EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "p12EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "EpoRJAK2_CIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SHP1 2.672510e+01 6.437693e+15 0.000000 0.000000e+00 \n", + "SHP1Act 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "STAT5 7.975350e+01 1.921147e+16 0.000000 0.000000e+00 \n", + "pSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "npSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISnRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISnRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISnRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISnRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISnRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CISRNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "CIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3nRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3nRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3nRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3nRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3nRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3RNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "SOCS3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \n", + "Epo 1.249970e-07 3.010998e+07 0.000000 0.000000e+00 \n", + "\n", + " key sbml_id \n", + "name \n", + "EpoRJAK2 Metabolite_50 EpoRJAK2 \n", + "EpoRpJAK2 Metabolite_51 EpoRpJAK2 \n", + "p1EpoRpJAK2 Metabolite_52 p1EpoRpJAK2 \n", + "p2EpoRpJAK2 Metabolite_53 p2EpoRpJAK2 \n", + "p12EpoRpJAK2 Metabolite_54 p12EpoRpJAK2 \n", + "EpoRJAK2_CIS Metabolite_55 EpoRJAK2_CIS \n", + "SHP1 Metabolite_56 SHP1 \n", + "SHP1Act Metabolite_57 SHP1Act \n", + "STAT5 Metabolite_58 STAT5 \n", + "pSTAT5 Metabolite_59 pSTAT5 \n", + "npSTAT5 Metabolite_60 npSTAT5 \n", + "CISnRNA1 Metabolite_61 CISnRNA1 \n", + "CISnRNA2 Metabolite_62 CISnRNA2 \n", + "CISnRNA3 Metabolite_63 CISnRNA3 \n", + "CISnRNA4 Metabolite_64 CISnRNA4 \n", + "CISnRNA5 Metabolite_65 CISnRNA5 \n", + "CISRNA Metabolite_66 CISRNA \n", + "CIS Metabolite_67 CIS \n", + "SOCS3nRNA1 Metabolite_68 SOCS3nRNA1 \n", + "SOCS3nRNA2 Metabolite_69 SOCS3nRNA2 \n", + "SOCS3nRNA3 Metabolite_70 SOCS3nRNA3 \n", + "SOCS3nRNA4 Metabolite_71 SOCS3nRNA4 \n", + "SOCS3nRNA5 Metabolite_72 SOCS3nRNA5 \n", + "SOCS3RNA Metabolite_73 SOCS3RNA \n", + "SOCS3 Metabolite_74 SOCS3 \n", + "Epo Metabolite_75 Epo " + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from basico import *\n", + "from basico import biomodels\n", + "\n", + "\n", + "biomodel_id = 'BIOMD0000000861'\n", + "biomodel = load_biomodel(biomodel_id)\n", + "get_species(model=biomodel)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "c24594c6e8229e20", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.737875Z", + "start_time": "2024-03-04T16:42:28.733747Z" + }, + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
schemefluxparticle_fluxfunctionkeysbml_idmapping
name
reaction_1EpoRJAK2 -> EpoRpJAK2; Epo SOCS30.1258957.581552e+13Function for reaction_1Reaction_48reaction_1{'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac...
reaction_2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_2Reaction_49reaction_2{'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ...
reaction_3EpoRpJAK2 -> p1EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_3Reaction_50reaction_3{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E...
reaction_4EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_4Reaction_51reaction_4{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_5p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_5Reaction_52reaction_5{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_6p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_6Reaction_53reaction_6{'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3...
reaction_7p1EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_7Reaction_54reaction_7{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_8p2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_8Reaction_55reaction_8{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_9p12EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_9Reaction_56reaction_9{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_10EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK20.0000000.000000e+00Function for reaction_10Reaction_57reaction_10{'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C...
reaction_11SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_11Reaction_58reaction_11{'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH...
reaction_12SHP1Act -> SHP10.0000000.000000e+00Mass action (irreversible)Reaction_59reaction_12{'k1': 'SHP1Dea', 'substrate': 'SHP1Act'}
reaction_13STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2...0.0000000.000000e+00Function for reaction_13Reaction_60reaction_13{'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '...
reaction_14STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_14Reaction_61reaction_14{'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '...
reaction_15pSTAT5 -> npSTAT50.0000000.000000e+00Function for reaction_15Reaction_62reaction_15{'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5...
reaction_16npSTAT5 -> STAT50.0000000.000000e+00Function for reaction_16Reaction_63reaction_16{'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',...
reaction_17= CISnRNA1; npSTAT50.0000000.000000e+00Function for reaction_17Reaction_64reaction_17{'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI...
reaction_18CISnRNA1 -> CISnRNA20.0000000.000000e+00Mass action (irreversible)Reaction_65reaction_18{'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'}
reaction_19CISnRNA2 -> CISnRNA30.0000000.000000e+00Mass action (irreversible)Reaction_66reaction_19{'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'}
reaction_20CISnRNA3 -> CISnRNA40.0000000.000000e+00Mass action (irreversible)Reaction_67reaction_20{'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'}
reaction_21CISnRNA4 -> CISnRNA50.0000000.000000e+00Mass action (irreversible)Reaction_68reaction_21{'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'}
reaction_22CISnRNA5 -> CISRNA0.0000000.000000e+00Function for reaction_22Reaction_69reaction_22{'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI...
reaction_23CISRNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_70reaction_23{'k1': 'CISRNATurn', 'substrate': 'CISRNA'}
reaction_24-> CIS; CISRNA0.0000000.000000e+00Function for reaction_24Reaction_71reaction_24{'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR...
reaction_25CIS ->0.0000000.000000e+00Mass action (irreversible)Reaction_72reaction_25{'k1': 'CISTurn', 'substrate': 'CIS'}
reaction_26-> CIS0.0000000.000000e+00Function for reaction_26Reaction_73reaction_26{'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '...
reaction_27= SOCS3nRNA1; npSTAT50.0000000.000000e+00Function for reaction_27Reaction_74reaction_27{'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',...
reaction_28SOCS3nRNA1 -> SOCS3nRNA20.0000000.000000e+00Mass action (irreversible)Reaction_75reaction_28{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_29SOCS3nRNA2 -> SOCS3nRNA30.0000000.000000e+00Mass action (irreversible)Reaction_76reaction_29{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_30SOCS3nRNA3 -> SOCS3nRNA40.0000000.000000e+00Mass action (irreversible)Reaction_77reaction_30{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_31SOCS3nRNA4 -> SOCS3nRNA50.0000000.000000e+00Mass action (irreversible)Reaction_78reaction_31{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_32SOCS3nRNA5 -> SOCS3RNA0.0000000.000000e+00Function for reaction_32Reaction_79reaction_32{'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5...
reaction_33SOCS3RNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_80reaction_33{'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'}
reaction_34-> SOCS3; SOCS3RNA0.0000000.000000e+00Function for reaction_34Reaction_81reaction_34{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA...
reaction_35SOCS3 ->0.0000000.000000e+00Mass action (irreversible)Reaction_82reaction_35{'k1': 'SOCS3Turn', 'substrate': 'SOCS3'}
reaction_36-> SOCS30.0000000.000000e+00Function for reaction_36Reaction_83reaction_36{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E...
\n", + "
" + ], + "text/plain": [ + " scheme flux \\\n", + "name \n", + "reaction_1 EpoRJAK2 -> EpoRpJAK2; Epo SOCS3 0.125895 \n", + "reaction_2 EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \n", + "reaction_3 EpoRpJAK2 -> p1EpoRpJAK2; SOCS3 0.000000 \n", + "reaction_4 EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \n", + "reaction_5 p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \n", + "reaction_6 p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS3 0.000000 \n", + "reaction_7 p1EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \n", + "reaction_8 p2EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \n", + "reaction_9 p12EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \n", + "reaction_10 EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK2 0.000000 \n", + "reaction_11 SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo... 0.000000 \n", + "reaction_12 SHP1Act -> SHP1 0.000000 \n", + "reaction_13 STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2... 0.000000 \n", + "reaction_14 STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo... 0.000000 \n", + "reaction_15 pSTAT5 -> npSTAT5 0.000000 \n", + "reaction_16 npSTAT5 -> STAT5 0.000000 \n", + "reaction_17 = CISnRNA1; npSTAT5 0.000000 \n", + "reaction_18 CISnRNA1 -> CISnRNA2 0.000000 \n", + "reaction_19 CISnRNA2 -> CISnRNA3 0.000000 \n", + "reaction_20 CISnRNA3 -> CISnRNA4 0.000000 \n", + "reaction_21 CISnRNA4 -> CISnRNA5 0.000000 \n", + "reaction_22 CISnRNA5 -> CISRNA 0.000000 \n", + "reaction_23 CISRNA -> 0.000000 \n", + "reaction_24 -> CIS; CISRNA 0.000000 \n", + "reaction_25 CIS -> 0.000000 \n", + "reaction_26 -> CIS 0.000000 \n", + "reaction_27 = SOCS3nRNA1; npSTAT5 0.000000 \n", + "reaction_28 SOCS3nRNA1 -> SOCS3nRNA2 0.000000 \n", + "reaction_29 SOCS3nRNA2 -> SOCS3nRNA3 0.000000 \n", + "reaction_30 SOCS3nRNA3 -> SOCS3nRNA4 0.000000 \n", + "reaction_31 SOCS3nRNA4 -> SOCS3nRNA5 0.000000 \n", + "reaction_32 SOCS3nRNA5 -> SOCS3RNA 0.000000 \n", + "reaction_33 SOCS3RNA -> 0.000000 \n", + "reaction_34 -> SOCS3; SOCS3RNA 0.000000 \n", + "reaction_35 SOCS3 -> 0.000000 \n", + "reaction_36 -> SOCS3 0.000000 \n", + "\n", + " particle_flux function key \\\n", + "name \n", + "reaction_1 7.581552e+13 Function for reaction_1 Reaction_48 \n", + "reaction_2 0.000000e+00 Function for reaction_2 Reaction_49 \n", + "reaction_3 0.000000e+00 Function for reaction_3 Reaction_50 \n", + "reaction_4 0.000000e+00 Function for reaction_4 Reaction_51 \n", + "reaction_5 0.000000e+00 Function for reaction_5 Reaction_52 \n", + "reaction_6 0.000000e+00 Function for reaction_6 Reaction_53 \n", + "reaction_7 0.000000e+00 Function for reaction_7 Reaction_54 \n", + "reaction_8 0.000000e+00 Function for reaction_8 Reaction_55 \n", + "reaction_9 0.000000e+00 Function for reaction_9 Reaction_56 \n", + "reaction_10 0.000000e+00 Function for reaction_10 Reaction_57 \n", + "reaction_11 0.000000e+00 Function for reaction_11 Reaction_58 \n", + "reaction_12 0.000000e+00 Mass action (irreversible) Reaction_59 \n", + "reaction_13 0.000000e+00 Function for reaction_13 Reaction_60 \n", + "reaction_14 0.000000e+00 Function for reaction_14 Reaction_61 \n", + "reaction_15 0.000000e+00 Function for reaction_15 Reaction_62 \n", + "reaction_16 0.000000e+00 Function for reaction_16 Reaction_63 \n", + "reaction_17 0.000000e+00 Function for reaction_17 Reaction_64 \n", + "reaction_18 0.000000e+00 Mass action (irreversible) Reaction_65 \n", + "reaction_19 0.000000e+00 Mass action (irreversible) Reaction_66 \n", + "reaction_20 0.000000e+00 Mass action (irreversible) Reaction_67 \n", + "reaction_21 0.000000e+00 Mass action (irreversible) Reaction_68 \n", + "reaction_22 0.000000e+00 Function for reaction_22 Reaction_69 \n", + "reaction_23 0.000000e+00 Mass action (irreversible) Reaction_70 \n", + "reaction_24 0.000000e+00 Function for reaction_24 Reaction_71 \n", + "reaction_25 0.000000e+00 Mass action (irreversible) Reaction_72 \n", + "reaction_26 0.000000e+00 Function for reaction_26 Reaction_73 \n", + "reaction_27 0.000000e+00 Function for reaction_27 Reaction_74 \n", + "reaction_28 0.000000e+00 Mass action (irreversible) Reaction_75 \n", + "reaction_29 0.000000e+00 Mass action (irreversible) Reaction_76 \n", + "reaction_30 0.000000e+00 Mass action (irreversible) Reaction_77 \n", + "reaction_31 0.000000e+00 Mass action (irreversible) Reaction_78 \n", + "reaction_32 0.000000e+00 Function for reaction_32 Reaction_79 \n", + "reaction_33 0.000000e+00 Mass action (irreversible) Reaction_80 \n", + "reaction_34 0.000000e+00 Function for reaction_34 Reaction_81 \n", + "reaction_35 0.000000e+00 Mass action (irreversible) Reaction_82 \n", + "reaction_36 0.000000e+00 Function for reaction_36 Reaction_83 \n", + "\n", + " sbml_id mapping \n", + "name \n", + "reaction_1 reaction_1 {'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac... \n", + "reaction_2 reaction_2 {'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ... \n", + "reaction_3 reaction_3 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E... \n", + "reaction_4 reaction_4 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \n", + "reaction_5 reaction_5 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \n", + "reaction_6 reaction_6 {'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3... \n", + "reaction_7 reaction_7 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \n", + "reaction_8 reaction_8 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \n", + "reaction_9 reaction_9 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \n", + "reaction_10 reaction_10 {'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C... \n", + "reaction_11 reaction_11 {'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH... \n", + "reaction_12 reaction_12 {'k1': 'SHP1Dea', 'substrate': 'SHP1Act'} \n", + "reaction_13 reaction_13 {'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '... \n", + "reaction_14 reaction_14 {'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '... \n", + "reaction_15 reaction_15 {'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5... \n", + "reaction_16 reaction_16 {'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',... \n", + "reaction_17 reaction_17 {'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI... \n", + "reaction_18 reaction_18 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'} \n", + "reaction_19 reaction_19 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'} \n", + "reaction_20 reaction_20 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'} \n", + "reaction_21 reaction_21 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'} \n", + "reaction_22 reaction_22 {'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI... \n", + "reaction_23 reaction_23 {'k1': 'CISRNATurn', 'substrate': 'CISRNA'} \n", + "reaction_24 reaction_24 {'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR... \n", + "reaction_25 reaction_25 {'k1': 'CISTurn', 'substrate': 'CIS'} \n", + "reaction_26 reaction_26 {'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '... \n", + "reaction_27 reaction_27 {'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',... \n", + "reaction_28 reaction_28 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \n", + "reaction_29 reaction_29 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \n", + "reaction_30 reaction_30 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \n", + "reaction_31 reaction_31 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \n", + "reaction_32 reaction_32 {'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5... \n", + "reaction_33 reaction_33 {'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'} \n", + "reaction_34 reaction_34 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA... \n", + "reaction_35 reaction_35 {'k1': 'SOCS3Turn', 'substrate': 'SOCS3'} \n", + "reaction_36 reaction_36 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E... " + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "reaction_names = get_reactions(model=biomodel)\n", + "\n", + "reaction_names" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "454db50d61220bc5", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.738709Z", + "start_time": "2024-03-04T16:42:28.736620Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "rparam = ReactionParameter(\n", + " parameter_name='EpoRpRJAK2',\n", + " value=21312.2\n", + ")\n", + "\n", + "rparam2 = ReactionParameter(\n", + " parameter_name='EpoRJAK2',\n", + " value=21312.2\n", + ")\n", + "\n", + "rc1 = ReactionChanges(\n", + " reaction_name='reaction_1',\n", + " parameter_changes=[rparam, rparam2]\n", + ")\n", + "\n", + "rc2 = ReactionChanges(\n", + " reaction_name='reaction_11',\n", + " reaction_scheme='A + B -> C'\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "bd6781fe4a749c29", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.742401Z", + "start_time": "2024-03-04T16:42:28.739543Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "biomodel_process_changes = ModelChanges(\n", + " reaction_changes=[rc1, rc2]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "e414174a2d6d331b", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:32.179350Z", + "start_time": "2024-03-04T16:42:32.175949Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A + B -> C'}],\n", + " 'species_changes': []}\n" + ] + } + ], + "source": [ + "pp(biomodel_process_changes.model_dump())" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "9de88bc52fb9a164", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:42:32.876207Z", + "start_time": "2024-03-04T16:42:32.872898Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A + B -> C'}],\n", + " 'species_changes': []},\n", + " 'model_id': 'BIOMD0000000861',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'composite_from_biomodel',\n", + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None}\n" + ] + } + ], + "source": [ + "biomodel_process_model = Model(\n", + " model_id=biomodel_id,\n", + " model_source=biomodel_id,\n", + " model_name='composite_from_biomodel',\n", + " model_changes=biomodel_process_changes\n", + ")\n", + "\n", + "pp(biomodel_process_model.model_dump())" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "25ba11c1e1e75f94", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:43:56.030421Z", + "start_time": "2024-03-04T16:43:56.025326Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'method': 'directMethod',\n", + " 'model': { 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A '\n", + " '+ '\n", + " 'B '\n", + " '-> '\n", + " 'C'}],\n", + " 'species_changes': []},\n", + " 'model_id': 'BIOMD0000000861',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'composite_from_biomodel',\n", + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None},\n", + " 'process_name': 'copasi_process_from_biomodel'}\n" + ] + } + ], + "source": [ + "biomodel_process_config = CopasiProcessConfigSchema(\n", + " process_name='copasi_process_from_biomodel',\n", + " method='directMethod',\n", + " model=biomodel_process_model\n", + ")\n", + "\n", + "\n", + "pp(biomodel_process_config.model_dump())" + ] + }, + { + "cell_type": "markdown", + "id": "535828632bf115d", + "metadata": { + "collapsed": false + }, + "source": [ + "Add the biomodel config to the bigraph" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "4c3f073b10e2dcc0", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-04T16:47:41.077497Z", + "start_time": "2024-03-04T16:47:41.072238Z" + }, + "collapsed": false + }, + "outputs": [], + "source": [ + "# b[biomodel_process_config.process_name].add_process(\n", + "# name='CopasiProcess',\n", + "# model=biomodel_process_config.model,\n", + "# method=biomodel_process_config.method\n", + "# )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5e03e6714faf9f4", + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/process_composer_copasi.ipynb b/notebooks/process_composer_copasi.ipynb deleted file mode 100644 index abd16cbd9..000000000 --- a/notebooks/process_composer_copasi.ipynb +++ /dev/null @@ -1,708 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "source": [ - "## Examples with ```CopasiProcess``` using ``builder.Builder`` and ``biosimulator_processes.data_model``" - ], - "metadata": { - "collapsed": false - }, - "id": "9f7cc96191d5a2ba" - }, - { - "cell_type": "code", - "execution_count": 1, - "outputs": [], - "source": [ - "import sys \n", - "\n", - "sys.path.insert(0, '..')" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:08.935312Z", - "start_time": "2024-03-04T16:42:08.931881Z" - } - }, - "id": "b43cd4493a594e60" - }, - { - "cell_type": "code", - "execution_count": 2, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "CobraProcess registered successfully.\n", - "CopasiProcess registered successfully.\n", - "SmoldynProcess registered successfully.\n", - "TelluriumProcess registered successfully.\n" - ] - } - ], - "source": [ - "from builder import Builder, Process\n", - "from process_bigraph import pp, pf \n", - "from biosimulator_processes import CORE\n", - "from biosimulator_processes.data_model import *\n", - "from biosimulator_processes.biosimulator_builder import BiosimulatorBuilder" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:10.809815Z", - "start_time": "2024-03-04T16:42:09.047667Z" - } - }, - "id": "65385e04f4f5dd1a" - }, - { - "cell_type": "markdown", - "source": [ - "#### Initialize a fresh instance of the `BiosimulatorBuilder`, which is inherently configured by `biosimulator_processes.CORE`." - ], - "metadata": { - "collapsed": false - }, - "id": "99dbe025aeccc23e" - }, - { - "cell_type": "code", - "execution_count": 3, - "outputs": [], - "source": [ - "b = BiosimulatorBuilder()" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:10.810196Z", - "start_time": "2024-03-04T16:42:10.808054Z" - } - }, - "id": "cc709690e20090cf" - }, - { - "cell_type": "code", - "execution_count": 4, - "outputs": [ - { - "data": { - "text/plain": "['CobraProcess',\n 'CopasiProcess',\n 'console-emitter',\n 'SmoldynProcess',\n 'TelluriumProcess',\n 'ram-emitter']" - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "###### list registered processes\n", - "\n", - "b.list_processes()" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:10.813366Z", - "start_time": "2024-03-04T16:42:10.811517Z" - } - }, - "id": "41034be54d9cf16" - }, - { - "cell_type": "markdown", - "source": [ - "Let's load a BIOMODEL from `basico` and inspect the parameters we can adjust:" - ], - "metadata": { - "collapsed": false - }, - "id": "f46d9983b127470" - }, - { - "cell_type": "code", - "execution_count": 4, - "outputs": [], - "source": [], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:10.828221Z", - "start_time": "2024-03-04T16:42:10.813820Z" - } - }, - "id": "f1e5eedb251a22c3" - }, - { - "cell_type": "markdown", - "source": [ - "#### Example 1: Add a simple `CopasiProcess`-based composite to the bigraph, specifying parameter values through the `data_model`. For now, let's try loading a biomodel and adding a change to initial concentration of a species. We will then add another copasi process instance, whose model is this time loaded from a file (to demonstrate the data model)" - ], - "metadata": { - "collapsed": false - }, - "id": "eea00feb4c2651d6" - }, - { - "cell_type": "markdown", - "source": [ - "Let's define a model instance from a file." - ], - "metadata": { - "collapsed": false - }, - "id": "640f49c1e61f116d" - }, - { - "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "True" - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from basico import * \n", - "\n", - "\n", - "model_filepath = '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'\n", - "\n", - "os.path.exists(model_filepath)" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:12.560995Z", - "start_time": "2024-03-04T16:42:12.555910Z" - } - }, - "id": "edf123175ec3408c", - "execution_count": 5 - }, - { - "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": " compartment type unit \\\nname \nExtracellular glucose extracellular reactions mmol/l \nCytosolic glucose cytosol reactions mmol/l \nATP cytosol reactions mmol/l \nGlucose-6-Phosphate cytosol reactions mmol/l \nADP cytosol reactions mmol/l \nFructose-6-Phosphate cytosol reactions mmol/l \nFructose 1,6-bisphosphate cytosol reactions mmol/l \nGlyceraldehyde 3-phosphate cytosol reactions mmol/l \nDihydroxyacetone phosphate cytosol reactions mmol/l \nNAD cytosol reactions mmol/l \n1,3-Bisphosphoglycerate cytosol reactions mmol/l \nNADH cytosol reactions mmol/l \nPhosphoenolpyruvate cytosol reactions mmol/l \nPyruvate cytosol reactions mmol/l \nAcetaldehyde cytosol reactions mmol/l \nEtOH cytosol reactions mmol/l \nExtracellular ethanol extracellular reactions mmol/l \nGlycerol cytosol reactions mmol/l \nExtracellular glycerol extracellular reactions mmol/l \nExtracellular acetaldehyde extracellular reactions mmol/l \nExtracellular cyanide extracellular reactions mmol/l \nAMP cytosol reactions mmol/l \nP extracellular fixed mmol/l \nMixed flow cyanide extracellular fixed mmol/l \nMixed flow glucose extracellular fixed mmol/l \n\n initial_concentration initial_particle_number \\\nname \nExtracellular glucose 6.700000 4.034834e+21 \nCytosolic glucose 0.573074 3.451132e+20 \nATP 2.100000 1.264650e+21 \nGlucose-6-Phosphate 4.200000 2.529299e+21 \nADP 1.500000 9.033211e+20 \nFructose-6-Phosphate 0.490000 2.950849e+20 \nFructose 1,6-bisphosphate 4.640000 2.794273e+21 \nGlyceraldehyde 3-phosphate 0.115000 6.925462e+19 \nDihydroxyacetone phosphate 2.950000 1.776532e+21 \nNAD 0.650000 3.914391e+20 \n1,3-Bisphosphoglycerate 0.000270 1.625978e+17 \nNADH 0.330000 1.987306e+20 \nPhosphoenolpyruvate 0.040000 2.408856e+19 \nPyruvate 8.700000 5.239262e+21 \nAcetaldehyde 1.481530 8.921982e+20 \nEtOH 19.237900 1.158533e+22 \nExtracellular ethanol 16.451400 9.907265e+21 \nGlycerol 4.196000 2.526890e+21 \nExtracellular glycerol 1.684780 1.014598e+21 \nExtracellular acetaldehyde 1.288360 7.758685e+20 \nExtracellular cyanide 5.203580 3.133669e+21 \nAMP 0.330000 1.987306e+20 \nP 0.000000 0.000000e+00 \nMixed flow cyanide 5.600000 3.372399e+21 \nMixed flow glucose 24.000000 1.445314e+22 \n\n initial_expression expression concentration \\\nname \nExtracellular glucose 6.700000 \nCytosolic glucose 0.573074 \nATP 2.100000 \nGlucose-6-Phosphate 4.200000 \nADP 1.500000 \nFructose-6-Phosphate 0.490000 \nFructose 1,6-bisphosphate 4.640000 \nGlyceraldehyde 3-phosphate 0.115000 \nDihydroxyacetone phosphate 2.950000 \nNAD 0.650000 \n1,3-Bisphosphoglycerate 0.000270 \nNADH 0.330000 \nPhosphoenolpyruvate 0.040000 \nPyruvate 8.700000 \nAcetaldehyde 1.481530 \nEtOH 19.237900 \nExtracellular ethanol 16.451400 \nGlycerol 4.196000 \nExtracellular glycerol 1.684780 \nExtracellular acetaldehyde 1.288360 \nExtracellular cyanide 5.203580 \nAMP 0.330000 \nP 0.000000 \nMixed flow cyanide 5.600000 \nMixed flow glucose 24.000000 \n\n particle_number rate \\\nname \nExtracellular glucose 4.034834e+21 -1.139132e+00 \nCytosolic glucose 3.451132e+20 6.820866e+01 \nATP 1.264650e+21 -5.374740e-04 \nGlucose-6-Phosphate 2.529299e+21 2.292073e-05 \nADP 9.033211e+20 9.874740e-04 \nFructose-6-Phosphate 2.950849e+20 -2.357096e-05 \nFructose 1,6-bisphosphate 2.794273e+21 3.000184e-05 \nGlyceraldehyde 3-phosphate 6.925462e+19 -1.056219e-04 \nDihydroxyacetone phosphate 1.776532e+21 8.613930e-05 \nNAD 3.914391e+20 -5.799246e-05 \n1,3-Bisphosphoglycerate 1.625978e+17 5.878219e-05 \nNADH 1.987306e+20 5.799246e-05 \nPhosphoenolpyruvate 2.408856e+19 -2.664671e-05 \nPyruvate 5.239262e+21 -3.001996e-05 \nAcetaldehyde 8.921982e+20 5.754463e-05 \nEtOH 1.158533e+22 7.012204e-05 \nExtracellular ethanol 9.907265e+21 -1.437288e-06 \nGlycerol 2.526890e+21 -1.733231e-05 \nExtracellular glycerol 1.014598e+21 3.566102e-07 \nExtracellular acetaldehyde 7.758685e+20 1.261075e-07 \nExtracellular cyanide 3.133669e+21 9.153125e-08 \nAMP 1.987306e+20 -4.500000e-04 \nP 0.000000e+00 0.000000e+00 \nMixed flow cyanide 3.372399e+21 0.000000e+00 \nMixed flow glucose 1.445314e+22 0.000000e+00 \n\n particle_number_rate key sbml_id \nname \nExtracellular glucose -6.860013e+20 Metabolite_0 GlcX \nCytosolic glucose 4.107622e+22 Metabolite_1 Glc \nATP -3.236744e+17 Metabolite_2 ATP \nGlucose-6-Phosphate 1.380319e+16 Metabolite_3 G6P \nADP 5.946708e+17 Metabolite_4 ADP \nFructose-6-Phosphate -1.419477e+16 Metabolite_5 F6P \nFructose 1,6-bisphosphate 1.806753e+16 Metabolite_6 FBP \nGlyceraldehyde 3-phosphate -6.360699e+16 Metabolite_7 GAP \nDihydroxyacetone phosphate 5.187430e+16 Metabolite_8 DHAP \nNAD -3.492388e+16 Metabolite_9 NAD \n1,3-Bisphosphoglycerate 3.539946e+16 Metabolite_10 BPG \nNADH 3.492388e+16 Metabolite_11 NADH \nPhosphoenolpyruvate -1.604702e+16 Metabolite_12 PEP \nPyruvate -1.807844e+16 Metabolite_13 Pyr \nAcetaldehyde 3.465418e+16 Metabolite_14 ACA \nEtOH 4.222848e+16 Metabolite_15 EtOH \nExtracellular ethanol -8.655551e+14 Metabolite_16 EtOHX \nGlycerol -1.043776e+16 Metabolite_17 Glyc \nExtracellular glycerol 2.147557e+14 Metabolite_18 GlycX \nExtracellular acetaldehyde 7.594373e+13 Metabolite_19 ACAX \nExtracellular cyanide 5.512141e+13 Metabolite_20 CNX \nAMP -2.709963e+17 Metabolite_21 AMP \nP 0.000000e+00 Metabolite_22 P \nMixed flow cyanide 0.000000e+00 Metabolite_23 CNX0 \nMixed flow glucose 0.000000e+00 Metabolite_24 GlcX0 ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
compartmenttypeunitinitial_concentrationinitial_particle_numberinitial_expressionexpressionconcentrationparticle_numberrateparticle_number_ratekeysbml_id
name
Extracellular glucoseextracellularreactionsmmol/l6.7000004.034834e+216.7000004.034834e+21-1.139132e+00-6.860013e+20Metabolite_0GlcX
Cytosolic glucosecytosolreactionsmmol/l0.5730743.451132e+200.5730743.451132e+206.820866e+014.107622e+22Metabolite_1Glc
ATPcytosolreactionsmmol/l2.1000001.264650e+212.1000001.264650e+21-5.374740e-04-3.236744e+17Metabolite_2ATP
Glucose-6-Phosphatecytosolreactionsmmol/l4.2000002.529299e+214.2000002.529299e+212.292073e-051.380319e+16Metabolite_3G6P
ADPcytosolreactionsmmol/l1.5000009.033211e+201.5000009.033211e+209.874740e-045.946708e+17Metabolite_4ADP
Fructose-6-Phosphatecytosolreactionsmmol/l0.4900002.950849e+200.4900002.950849e+20-2.357096e-05-1.419477e+16Metabolite_5F6P
Fructose 1,6-bisphosphatecytosolreactionsmmol/l4.6400002.794273e+214.6400002.794273e+213.000184e-051.806753e+16Metabolite_6FBP
Glyceraldehyde 3-phosphatecytosolreactionsmmol/l0.1150006.925462e+190.1150006.925462e+19-1.056219e-04-6.360699e+16Metabolite_7GAP
Dihydroxyacetone phosphatecytosolreactionsmmol/l2.9500001.776532e+212.9500001.776532e+218.613930e-055.187430e+16Metabolite_8DHAP
NADcytosolreactionsmmol/l0.6500003.914391e+200.6500003.914391e+20-5.799246e-05-3.492388e+16Metabolite_9NAD
1,3-Bisphosphoglyceratecytosolreactionsmmol/l0.0002701.625978e+170.0002701.625978e+175.878219e-053.539946e+16Metabolite_10BPG
NADHcytosolreactionsmmol/l0.3300001.987306e+200.3300001.987306e+205.799246e-053.492388e+16Metabolite_11NADH
Phosphoenolpyruvatecytosolreactionsmmol/l0.0400002.408856e+190.0400002.408856e+19-2.664671e-05-1.604702e+16Metabolite_12PEP
Pyruvatecytosolreactionsmmol/l8.7000005.239262e+218.7000005.239262e+21-3.001996e-05-1.807844e+16Metabolite_13Pyr
Acetaldehydecytosolreactionsmmol/l1.4815308.921982e+201.4815308.921982e+205.754463e-053.465418e+16Metabolite_14ACA
EtOHcytosolreactionsmmol/l19.2379001.158533e+2219.2379001.158533e+227.012204e-054.222848e+16Metabolite_15EtOH
Extracellular ethanolextracellularreactionsmmol/l16.4514009.907265e+2116.4514009.907265e+21-1.437288e-06-8.655551e+14Metabolite_16EtOHX
Glycerolcytosolreactionsmmol/l4.1960002.526890e+214.1960002.526890e+21-1.733231e-05-1.043776e+16Metabolite_17Glyc
Extracellular glycerolextracellularreactionsmmol/l1.6847801.014598e+211.6847801.014598e+213.566102e-072.147557e+14Metabolite_18GlycX
Extracellular acetaldehydeextracellularreactionsmmol/l1.2883607.758685e+201.2883607.758685e+201.261075e-077.594373e+13Metabolite_19ACAX
Extracellular cyanideextracellularreactionsmmol/l5.2035803.133669e+215.2035803.133669e+219.153125e-085.512141e+13Metabolite_20CNX
AMPcytosolreactionsmmol/l0.3300001.987306e+200.3300001.987306e+20-4.500000e-04-2.709963e+17Metabolite_21AMP
Pextracellularfixedmmol/l0.0000000.000000e+000.0000000.000000e+000.000000e+000.000000e+00Metabolite_22P
Mixed flow cyanideextracellularfixedmmol/l5.6000003.372399e+215.6000003.372399e+210.000000e+000.000000e+00Metabolite_23CNX0
Mixed flow glucoseextracellularfixedmmol/l24.0000001.445314e+2224.0000001.445314e+220.000000e+000.000000e+00Metabolite_24GlcX0
\n
" - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "model_from_file = load_model(model_filepath)\n", - "get_species(model=model_from_file)" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:13.555997Z", - "start_time": "2024-03-04T16:42:13.490510Z" - } - }, - "id": "40ab6f70ac3f4996", - "execution_count": 6 - }, - { - "cell_type": "code", - "execution_count": 7, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'global_parameter_changes': [],\n", - " 'reaction_changes': [],\n", - " 'species_changes': [ { 'expression': '',\n", - " 'initial_concentration': 9.261000000000001,\n", - " 'initial_expression': '',\n", - " 'initial_particle_number': None,\n", - " 'name': 'ADP',\n", - " 'unit': ''}]}\n" - ] - } - ], - "source": [ - "# 1. specify model changes\n", - "process_model_changes = ModelChanges(\n", - " species_changes=[SpeciesChanges(name='ADP', initial_concentration=2.1**3)]\n", - ")\n", - "\n", - "\n", - "pp(process_model_changes.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:14.251034Z", - "start_time": "2024-03-04T16:42:14.219527Z" - } - }, - "id": "d02a547b85138f96" - }, - { - "cell_type": "code", - "execution_count": 8, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'model_changes': { 'global_parameter_changes': [],\n", - " 'reaction_changes': [],\n", - " 'species_changes': [ { 'expression': '',\n", - " 'initial_concentration': 9.261000000000001,\n", - " 'initial_expression': '',\n", - " 'initial_particle_number': None,\n", - " 'name': 'ADP',\n", - " 'unit': ''}]},\n", - " 'model_id': 'copasi_process_from_file',\n", - " 'model_language': 'sbml',\n", - " 'model_name': 'Simple Composite Process from File',\n", - " 'model_source': { 'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", - " 'model_units': None}\n" - ] - } - ], - "source": [ - "# 2. define the model schema to be used by the composite process (one of the copasiprocess config parameters)\n", - "\n", - "process_model_from_file = Model(\n", - " model_id='copasi_process_from_file',\n", - " model_source=model_filepath,\n", - " model_name='Simple Composite Process from File',\n", - " model_changes=process_model_changes\n", - ")\n", - "\n", - "\n", - "pp(process_model_from_file.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:14.814108Z", - "start_time": "2024-03-04T16:42:14.810827Z" - } - }, - "id": "1b6c269646357d7d" - }, - { - "cell_type": "code", - "execution_count": 9, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'method': 'stochastic',\n", - " 'model': { 'model_changes': { 'global_parameter_changes': [],\n", - " 'reaction_changes': [],\n", - " 'species_changes': [ { 'expression': '',\n", - " 'initial_concentration': 9.261000000000001,\n", - " 'initial_expression': '',\n", - " 'initial_particle_number': None,\n", - " 'name': 'ADP',\n", - " 'unit': ''}]},\n", - " 'model_id': 'copasi_process_from_file',\n", - " 'model_language': 'sbml',\n", - " 'model_name': 'Simple Composite Process from File',\n", - " 'model_source': { 'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", - " 'model_units': None},\n", - " 'process_name': 'simple_copasi_from_file'}\n" - ] - } - ], - "source": [ - "# 3. Define config schema to be used as 'config' parameter of Process constructor\n", - "process_config_from_file = CopasiProcessConfigSchema(\n", - " method='stochastic',\n", - " model=process_model_from_file,\n", - " process_name='simple_copasi_from_file'\n", - ")\n", - "\n", - "\n", - "pp(process_config_from_file.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:15.337152Z", - "start_time": "2024-03-04T16:42:15.334361Z" - } - }, - "id": "5d434956e65b1a42" - }, - { - "cell_type": "code", - "execution_count": 10, - "outputs": [ - { - "data": { - "text/plain": "{'model_id': 'copasi_process_from_file',\n 'model_source': {'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n 'model_language': 'sbml',\n 'model_name': 'Simple Composite Process from File',\n 'model_changes': {'species_changes': [{'name': 'ADP',\n 'unit': '',\n 'initial_concentration': 9.261000000000001,\n 'initial_particle_number': None,\n 'initial_expression': '',\n 'expression': ''}],\n 'global_parameter_changes': [],\n 'reaction_changes': []},\n 'model_units': None}" - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "process_config_from_file.model" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:16.043432Z", - "start_time": "2024-03-04T16:42:16.040674Z" - } - }, - "id": "de88e95d8f616779" - }, - { - "cell_type": "code", - "execution_count": 11, - "outputs": [], - "source": [ - "# 4. Add the process instance by the name of 'simple_copasi' to the builder\n", - "\n", - "\n", - "b[process_config_from_file.process_name].add_process(\n", - " name='CopasiProcess',\n", - " model=process_config_from_file.model,\n", - " method=process_config_from_file.method\n", - ")" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:16.698339Z", - "start_time": "2024-03-04T16:42:16.522040Z" - } - }, - "id": "52d81ea2ea688d47" - }, - { - "cell_type": "markdown", - "source": [ - "Let's load a BIOMODEL from `basico` and inspect the parameters we can adjust, and then add it to the composite process:" - ], - "metadata": { - "collapsed": false - }, - "id": "bfd4af678329923a" - }, - { - "cell_type": "code", - "execution_count": 12, - "outputs": [ - { - "data": { - "text/plain": " compartment type unit initial_concentration \\\nname \nEpoRJAK2 cyt reactions nmol/l 3.976220e+00 \nEpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np1EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np2EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np12EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \nEpoRJAK2_CIS cyt reactions nmol/l 0.000000e+00 \nSHP1 cyt reactions nmol/l 2.672510e+01 \nSHP1Act cyt reactions nmol/l 0.000000e+00 \nSTAT5 cyt reactions nmol/l 7.975350e+01 \npSTAT5 cyt reactions nmol/l 0.000000e+00 \nnpSTAT5 nuc reactions nmol/l 0.000000e+00 \nCISnRNA1 nuc reactions nmol/l 0.000000e+00 \nCISnRNA2 nuc reactions nmol/l 0.000000e+00 \nCISnRNA3 nuc reactions nmol/l 0.000000e+00 \nCISnRNA4 nuc reactions nmol/l 0.000000e+00 \nCISnRNA5 nuc reactions nmol/l 0.000000e+00 \nCISRNA cyt reactions nmol/l 0.000000e+00 \nCIS cyt reactions nmol/l 0.000000e+00 \nSOCS3nRNA1 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA2 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA3 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA4 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA5 nuc reactions nmol/l 0.000000e+00 \nSOCS3RNA cyt reactions nmol/l 0.000000e+00 \nSOCS3 cyt reactions nmol/l 0.000000e+00 \nEpo cyt reactions nmol/l 1.249970e-07 \n\n initial_particle_number initial_expression expression \\\nname \nEpoRJAK2 9.578143e+14 \nEpoRpJAK2 0.000000e+00 \np1EpoRpJAK2 0.000000e+00 \np2EpoRpJAK2 0.000000e+00 \np12EpoRpJAK2 0.000000e+00 \nEpoRJAK2_CIS 0.000000e+00 \nSHP1 6.437693e+15 \nSHP1Act 0.000000e+00 \nSTAT5 1.921147e+16 \npSTAT5 0.000000e+00 \nnpSTAT5 0.000000e+00 \nCISnRNA1 0.000000e+00 \nCISnRNA2 0.000000e+00 \nCISnRNA3 0.000000e+00 \nCISnRNA4 0.000000e+00 \nCISnRNA5 0.000000e+00 \nCISRNA 0.000000e+00 \nCIS 0.000000e+00 \nSOCS3nRNA1 0.000000e+00 \nSOCS3nRNA2 0.000000e+00 \nSOCS3nRNA3 0.000000e+00 \nSOCS3nRNA4 0.000000e+00 \nSOCS3nRNA5 0.000000e+00 \nSOCS3RNA 0.000000e+00 \nSOCS3 0.000000e+00 \nEpo 3.010998e+07 \n\n concentration particle_number rate particle_number_rate \\\nname \nEpoRJAK2 3.976220e+00 9.578143e+14 -0.314737 -7.581552e+13 \nEpoRpJAK2 0.000000e+00 0.000000e+00 0.314737 7.581552e+13 \np1EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \np2EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \np12EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nEpoRJAK2_CIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSHP1 2.672510e+01 6.437693e+15 0.000000 0.000000e+00 \nSHP1Act 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSTAT5 7.975350e+01 1.921147e+16 0.000000 0.000000e+00 \npSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nnpSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISRNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3RNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nEpo 1.249970e-07 3.010998e+07 0.000000 0.000000e+00 \n\n key sbml_id \nname \nEpoRJAK2 Metabolite_50 EpoRJAK2 \nEpoRpJAK2 Metabolite_51 EpoRpJAK2 \np1EpoRpJAK2 Metabolite_52 p1EpoRpJAK2 \np2EpoRpJAK2 Metabolite_53 p2EpoRpJAK2 \np12EpoRpJAK2 Metabolite_54 p12EpoRpJAK2 \nEpoRJAK2_CIS Metabolite_55 EpoRJAK2_CIS \nSHP1 Metabolite_56 SHP1 \nSHP1Act Metabolite_57 SHP1Act \nSTAT5 Metabolite_58 STAT5 \npSTAT5 Metabolite_59 pSTAT5 \nnpSTAT5 Metabolite_60 npSTAT5 \nCISnRNA1 Metabolite_61 CISnRNA1 \nCISnRNA2 Metabolite_62 CISnRNA2 \nCISnRNA3 Metabolite_63 CISnRNA3 \nCISnRNA4 Metabolite_64 CISnRNA4 \nCISnRNA5 Metabolite_65 CISnRNA5 \nCISRNA Metabolite_66 CISRNA \nCIS Metabolite_67 CIS \nSOCS3nRNA1 Metabolite_68 SOCS3nRNA1 \nSOCS3nRNA2 Metabolite_69 SOCS3nRNA2 \nSOCS3nRNA3 Metabolite_70 SOCS3nRNA3 \nSOCS3nRNA4 Metabolite_71 SOCS3nRNA4 \nSOCS3nRNA5 Metabolite_72 SOCS3nRNA5 \nSOCS3RNA Metabolite_73 SOCS3RNA \nSOCS3 Metabolite_74 SOCS3 \nEpo Metabolite_75 Epo ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
compartmenttypeunitinitial_concentrationinitial_particle_numberinitial_expressionexpressionconcentrationparticle_numberrateparticle_number_ratekeysbml_id
name
EpoRJAK2cytreactionsnmol/l3.976220e+009.578143e+143.976220e+009.578143e+14-0.314737-7.581552e+13Metabolite_50EpoRJAK2
EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.3147377.581552e+13Metabolite_51EpoRpJAK2
p1EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_52p1EpoRpJAK2
p2EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_53p2EpoRpJAK2
p12EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_54p12EpoRpJAK2
EpoRJAK2_CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_55EpoRJAK2_CIS
SHP1cytreactionsnmol/l2.672510e+016.437693e+152.672510e+016.437693e+150.0000000.000000e+00Metabolite_56SHP1
SHP1Actcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_57SHP1Act
STAT5cytreactionsnmol/l7.975350e+011.921147e+167.975350e+011.921147e+160.0000000.000000e+00Metabolite_58STAT5
pSTAT5cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_59pSTAT5
npSTAT5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_60npSTAT5
CISnRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_61CISnRNA1
CISnRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_62CISnRNA2
CISnRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_63CISnRNA3
CISnRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_64CISnRNA4
CISnRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_65CISnRNA5
CISRNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_66CISRNA
CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_67CIS
SOCS3nRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_68SOCS3nRNA1
SOCS3nRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_69SOCS3nRNA2
SOCS3nRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_70SOCS3nRNA3
SOCS3nRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_71SOCS3nRNA4
SOCS3nRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_72SOCS3nRNA5
SOCS3RNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_73SOCS3RNA
SOCS3cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_74SOCS3
Epocytreactionsnmol/l1.249970e-073.010998e+071.249970e-073.010998e+070.0000000.000000e+00Metabolite_75Epo
\n
" - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from basico import *\n", - "from basico import biomodels\n", - "\n", - "\n", - "biomodel_id = 'BIOMD0000000861'\n", - "biomodel = load_biomodel(biomodel_id)\n", - "get_species(model=biomodel)" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:28.725829Z", - "start_time": "2024-03-04T16:42:26.443059Z" - } - }, - "id": "f499f96a817d9faf" - }, - { - "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": " scheme flux \\\nname \nreaction_1 EpoRJAK2 -> EpoRpJAK2; Epo SOCS3 0.125895 \nreaction_2 EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_3 EpoRpJAK2 -> p1EpoRpJAK2; SOCS3 0.000000 \nreaction_4 EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \nreaction_5 p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \nreaction_6 p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS3 0.000000 \nreaction_7 p1EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_8 p2EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_9 p12EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_10 EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK2 0.000000 \nreaction_11 SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo... 0.000000 \nreaction_12 SHP1Act -> SHP1 0.000000 \nreaction_13 STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2... 0.000000 \nreaction_14 STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo... 0.000000 \nreaction_15 pSTAT5 -> npSTAT5 0.000000 \nreaction_16 npSTAT5 -> STAT5 0.000000 \nreaction_17 = CISnRNA1; npSTAT5 0.000000 \nreaction_18 CISnRNA1 -> CISnRNA2 0.000000 \nreaction_19 CISnRNA2 -> CISnRNA3 0.000000 \nreaction_20 CISnRNA3 -> CISnRNA4 0.000000 \nreaction_21 CISnRNA4 -> CISnRNA5 0.000000 \nreaction_22 CISnRNA5 -> CISRNA 0.000000 \nreaction_23 CISRNA -> 0.000000 \nreaction_24 -> CIS; CISRNA 0.000000 \nreaction_25 CIS -> 0.000000 \nreaction_26 -> CIS 0.000000 \nreaction_27 = SOCS3nRNA1; npSTAT5 0.000000 \nreaction_28 SOCS3nRNA1 -> SOCS3nRNA2 0.000000 \nreaction_29 SOCS3nRNA2 -> SOCS3nRNA3 0.000000 \nreaction_30 SOCS3nRNA3 -> SOCS3nRNA4 0.000000 \nreaction_31 SOCS3nRNA4 -> SOCS3nRNA5 0.000000 \nreaction_32 SOCS3nRNA5 -> SOCS3RNA 0.000000 \nreaction_33 SOCS3RNA -> 0.000000 \nreaction_34 -> SOCS3; SOCS3RNA 0.000000 \nreaction_35 SOCS3 -> 0.000000 \nreaction_36 -> SOCS3 0.000000 \n\n particle_flux function key \\\nname \nreaction_1 7.581552e+13 Function for reaction_1 Reaction_48 \nreaction_2 0.000000e+00 Function for reaction_2 Reaction_49 \nreaction_3 0.000000e+00 Function for reaction_3 Reaction_50 \nreaction_4 0.000000e+00 Function for reaction_4 Reaction_51 \nreaction_5 0.000000e+00 Function for reaction_5 Reaction_52 \nreaction_6 0.000000e+00 Function for reaction_6 Reaction_53 \nreaction_7 0.000000e+00 Function for reaction_7 Reaction_54 \nreaction_8 0.000000e+00 Function for reaction_8 Reaction_55 \nreaction_9 0.000000e+00 Function for reaction_9 Reaction_56 \nreaction_10 0.000000e+00 Function for reaction_10 Reaction_57 \nreaction_11 0.000000e+00 Function for reaction_11 Reaction_58 \nreaction_12 0.000000e+00 Mass action (irreversible) Reaction_59 \nreaction_13 0.000000e+00 Function for reaction_13 Reaction_60 \nreaction_14 0.000000e+00 Function for reaction_14 Reaction_61 \nreaction_15 0.000000e+00 Function for reaction_15 Reaction_62 \nreaction_16 0.000000e+00 Function for reaction_16 Reaction_63 \nreaction_17 0.000000e+00 Function for reaction_17 Reaction_64 \nreaction_18 0.000000e+00 Mass action (irreversible) Reaction_65 \nreaction_19 0.000000e+00 Mass action (irreversible) Reaction_66 \nreaction_20 0.000000e+00 Mass action (irreversible) Reaction_67 \nreaction_21 0.000000e+00 Mass action (irreversible) Reaction_68 \nreaction_22 0.000000e+00 Function for reaction_22 Reaction_69 \nreaction_23 0.000000e+00 Mass action (irreversible) Reaction_70 \nreaction_24 0.000000e+00 Function for reaction_24 Reaction_71 \nreaction_25 0.000000e+00 Mass action (irreversible) Reaction_72 \nreaction_26 0.000000e+00 Function for reaction_26 Reaction_73 \nreaction_27 0.000000e+00 Function for reaction_27 Reaction_74 \nreaction_28 0.000000e+00 Mass action (irreversible) Reaction_75 \nreaction_29 0.000000e+00 Mass action (irreversible) Reaction_76 \nreaction_30 0.000000e+00 Mass action (irreversible) Reaction_77 \nreaction_31 0.000000e+00 Mass action (irreversible) Reaction_78 \nreaction_32 0.000000e+00 Function for reaction_32 Reaction_79 \nreaction_33 0.000000e+00 Mass action (irreversible) Reaction_80 \nreaction_34 0.000000e+00 Function for reaction_34 Reaction_81 \nreaction_35 0.000000e+00 Mass action (irreversible) Reaction_82 \nreaction_36 0.000000e+00 Function for reaction_36 Reaction_83 \n\n sbml_id mapping \nname \nreaction_1 reaction_1 {'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac... \nreaction_2 reaction_2 {'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ... \nreaction_3 reaction_3 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E... \nreaction_4 reaction_4 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \nreaction_5 reaction_5 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \nreaction_6 reaction_6 {'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3... \nreaction_7 reaction_7 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_8 reaction_8 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_9 reaction_9 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_10 reaction_10 {'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C... \nreaction_11 reaction_11 {'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH... \nreaction_12 reaction_12 {'k1': 'SHP1Dea', 'substrate': 'SHP1Act'} \nreaction_13 reaction_13 {'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '... \nreaction_14 reaction_14 {'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '... \nreaction_15 reaction_15 {'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5... \nreaction_16 reaction_16 {'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',... \nreaction_17 reaction_17 {'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI... \nreaction_18 reaction_18 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'} \nreaction_19 reaction_19 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'} \nreaction_20 reaction_20 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'} \nreaction_21 reaction_21 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'} \nreaction_22 reaction_22 {'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI... \nreaction_23 reaction_23 {'k1': 'CISRNATurn', 'substrate': 'CISRNA'} \nreaction_24 reaction_24 {'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR... \nreaction_25 reaction_25 {'k1': 'CISTurn', 'substrate': 'CIS'} \nreaction_26 reaction_26 {'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '... \nreaction_27 reaction_27 {'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',... \nreaction_28 reaction_28 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_29 reaction_29 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_30 reaction_30 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_31 reaction_31 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_32 reaction_32 {'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5... \nreaction_33 reaction_33 {'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'} \nreaction_34 reaction_34 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA... \nreaction_35 reaction_35 {'k1': 'SOCS3Turn', 'substrate': 'SOCS3'} \nreaction_36 reaction_36 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E... ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
schemefluxparticle_fluxfunctionkeysbml_idmapping
name
reaction_1EpoRJAK2 -> EpoRpJAK2; Epo SOCS30.1258957.581552e+13Function for reaction_1Reaction_48reaction_1{'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac...
reaction_2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_2Reaction_49reaction_2{'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ...
reaction_3EpoRpJAK2 -> p1EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_3Reaction_50reaction_3{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E...
reaction_4EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_4Reaction_51reaction_4{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_5p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_5Reaction_52reaction_5{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_6p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_6Reaction_53reaction_6{'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3...
reaction_7p1EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_7Reaction_54reaction_7{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_8p2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_8Reaction_55reaction_8{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_9p12EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_9Reaction_56reaction_9{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_10EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK20.0000000.000000e+00Function for reaction_10Reaction_57reaction_10{'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C...
reaction_11SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_11Reaction_58reaction_11{'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH...
reaction_12SHP1Act -> SHP10.0000000.000000e+00Mass action (irreversible)Reaction_59reaction_12{'k1': 'SHP1Dea', 'substrate': 'SHP1Act'}
reaction_13STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2...0.0000000.000000e+00Function for reaction_13Reaction_60reaction_13{'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '...
reaction_14STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_14Reaction_61reaction_14{'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '...
reaction_15pSTAT5 -> npSTAT50.0000000.000000e+00Function for reaction_15Reaction_62reaction_15{'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5...
reaction_16npSTAT5 -> STAT50.0000000.000000e+00Function for reaction_16Reaction_63reaction_16{'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',...
reaction_17= CISnRNA1; npSTAT50.0000000.000000e+00Function for reaction_17Reaction_64reaction_17{'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI...
reaction_18CISnRNA1 -> CISnRNA20.0000000.000000e+00Mass action (irreversible)Reaction_65reaction_18{'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'}
reaction_19CISnRNA2 -> CISnRNA30.0000000.000000e+00Mass action (irreversible)Reaction_66reaction_19{'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'}
reaction_20CISnRNA3 -> CISnRNA40.0000000.000000e+00Mass action (irreversible)Reaction_67reaction_20{'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'}
reaction_21CISnRNA4 -> CISnRNA50.0000000.000000e+00Mass action (irreversible)Reaction_68reaction_21{'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'}
reaction_22CISnRNA5 -> CISRNA0.0000000.000000e+00Function for reaction_22Reaction_69reaction_22{'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI...
reaction_23CISRNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_70reaction_23{'k1': 'CISRNATurn', 'substrate': 'CISRNA'}
reaction_24-> CIS; CISRNA0.0000000.000000e+00Function for reaction_24Reaction_71reaction_24{'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR...
reaction_25CIS ->0.0000000.000000e+00Mass action (irreversible)Reaction_72reaction_25{'k1': 'CISTurn', 'substrate': 'CIS'}
reaction_26-> CIS0.0000000.000000e+00Function for reaction_26Reaction_73reaction_26{'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '...
reaction_27= SOCS3nRNA1; npSTAT50.0000000.000000e+00Function for reaction_27Reaction_74reaction_27{'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',...
reaction_28SOCS3nRNA1 -> SOCS3nRNA20.0000000.000000e+00Mass action (irreversible)Reaction_75reaction_28{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_29SOCS3nRNA2 -> SOCS3nRNA30.0000000.000000e+00Mass action (irreversible)Reaction_76reaction_29{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_30SOCS3nRNA3 -> SOCS3nRNA40.0000000.000000e+00Mass action (irreversible)Reaction_77reaction_30{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_31SOCS3nRNA4 -> SOCS3nRNA50.0000000.000000e+00Mass action (irreversible)Reaction_78reaction_31{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_32SOCS3nRNA5 -> SOCS3RNA0.0000000.000000e+00Function for reaction_32Reaction_79reaction_32{'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5...
reaction_33SOCS3RNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_80reaction_33{'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'}
reaction_34-> SOCS3; SOCS3RNA0.0000000.000000e+00Function for reaction_34Reaction_81reaction_34{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA...
reaction_35SOCS3 ->0.0000000.000000e+00Mass action (irreversible)Reaction_82reaction_35{'k1': 'SOCS3Turn', 'substrate': 'SOCS3'}
reaction_36-> SOCS30.0000000.000000e+00Function for reaction_36Reaction_83reaction_36{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E...
\n
" - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "reaction_names = get_reactions(model=biomodel)\n", - "\n", - "reaction_names" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:28.737875Z", - "start_time": "2024-03-04T16:42:28.733747Z" - } - }, - "id": "c24594c6e8229e20", - "execution_count": 13 - }, - { - "cell_type": "code", - "execution_count": 14, - "outputs": [], - "source": [ - "rparam = ReactionParameter(\n", - " parameter_name='EpoRpRJAK2',\n", - " value=21312.2\n", - ")\n", - "\n", - "rparam2 = ReactionParameter(\n", - " parameter_name='EpoRJAK2',\n", - " value=21312.2\n", - ")\n", - "\n", - "rc1 = ReactionChanges(\n", - " reaction_name='reaction_1',\n", - " parameter_changes=[rparam, rparam2]\n", - ")\n", - "\n", - "rc2 = ReactionChanges(\n", - " reaction_name='reaction_11',\n", - " reaction_scheme='A + B -> C'\n", - ")" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:28.738709Z", - "start_time": "2024-03-04T16:42:28.736620Z" - } - }, - "id": "454db50d61220bc5" - }, - { - "cell_type": "code", - "outputs": [], - "source": [ - "biomodel_process_changes = ModelChanges(\n", - " reaction_changes=[rc1, rc2]\n", - ")" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:28.742401Z", - "start_time": "2024-03-04T16:42:28.739543Z" - } - }, - "id": "bd6781fe4a749c29", - "execution_count": 15 - }, - { - "cell_type": "code", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'global_parameter_changes': [],\n", - " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", - " 'value': 21312.2},\n", - " { 'parameter_name': 'EpoRJAK2',\n", - " 'value': 21312.2}],\n", - " 'reaction_name': 'reaction_1',\n", - " 'reaction_scheme': None},\n", - " { 'parameter_changes': [],\n", - " 'reaction_name': 'reaction_11',\n", - " 'reaction_scheme': 'A + B -> C'}],\n", - " 'species_changes': []}\n" - ] - } - ], - "source": [ - "pp(biomodel_process_changes.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:32.179350Z", - "start_time": "2024-03-04T16:42:32.175949Z" - } - }, - "id": "e414174a2d6d331b", - "execution_count": 16 - }, - { - "cell_type": "code", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'model_changes': { 'global_parameter_changes': [],\n", - " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", - " 'value': 21312.2},\n", - " { 'parameter_name': 'EpoRJAK2',\n", - " 'value': 21312.2}],\n", - " 'reaction_name': 'reaction_1',\n", - " 'reaction_scheme': None},\n", - " { 'parameter_changes': [],\n", - " 'reaction_name': 'reaction_11',\n", - " 'reaction_scheme': 'A + B -> C'}],\n", - " 'species_changes': []},\n", - " 'model_id': 'BIOMD0000000861',\n", - " 'model_language': 'sbml',\n", - " 'model_name': 'composite_from_biomodel',\n", - " 'model_source': {'value': 'BIOMD0000000861'},\n", - " 'model_units': None}\n" - ] - } - ], - "source": [ - "biomodel_process_model = Model(\n", - " model_id=biomodel_id,\n", - " model_source=biomodel_id,\n", - " model_name='composite_from_biomodel',\n", - " model_changes=biomodel_process_changes\n", - ")\n", - "\n", - "pp(biomodel_process_model.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:42:32.876207Z", - "start_time": "2024-03-04T16:42:32.872898Z" - } - }, - "id": "9de88bc52fb9a164", - "execution_count": 17 - }, - { - "cell_type": "code", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ 'method': 'directMethod',\n", - " 'model': { 'model_changes': { 'global_parameter_changes': [],\n", - " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", - " 'value': 21312.2},\n", - " { 'parameter_name': 'EpoRJAK2',\n", - " 'value': 21312.2}],\n", - " 'reaction_name': 'reaction_1',\n", - " 'reaction_scheme': None},\n", - " { 'parameter_changes': [],\n", - " 'reaction_name': 'reaction_11',\n", - " 'reaction_scheme': 'A '\n", - " '+ '\n", - " 'B '\n", - " '-> '\n", - " 'C'}],\n", - " 'species_changes': []},\n", - " 'model_id': 'BIOMD0000000861',\n", - " 'model_language': 'sbml',\n", - " 'model_name': 'composite_from_biomodel',\n", - " 'model_source': {'value': 'BIOMD0000000861'},\n", - " 'model_units': None},\n", - " 'process_name': 'copasi_process_from_biomodel'}\n" - ] - } - ], - "source": [ - "biomodel_process_config = CopasiProcessConfigSchema(\n", - " process_name='copasi_process_from_biomodel',\n", - " method='directMethod',\n", - " model=biomodel_process_model\n", - ")\n", - "\n", - "\n", - "pp(biomodel_process_config.model_dump())" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:43:56.030421Z", - "start_time": "2024-03-04T16:43:56.025326Z" - } - }, - "id": "25ba11c1e1e75f94", - "execution_count": 18 - }, - { - "cell_type": "markdown", - "source": [ - "Add the biomodel config to the bigraph" - ], - "metadata": { - "collapsed": false - }, - "id": "535828632bf115d" - }, - { - "cell_type": "code", - "outputs": [], - "source": [ - "# b[biomodel_process_config.process_name].add_process(\n", - "# name='CopasiProcess',\n", - "# model=biomodel_process_config.model,\n", - "# method=biomodel_process_config.method\n", - "# )" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-04T16:47:41.077497Z", - "start_time": "2024-03-04T16:47:41.072238Z" - } - }, - "id": "4c3f073b10e2dcc0", - "execution_count": 19 - }, - { - "cell_type": "code", - "outputs": [], - "source": [], - "metadata": { - "collapsed": false - }, - "id": "c5e03e6714faf9f4" - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.6" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}