Skip to content

Commit

Permalink
Updated examples to work with changes made for unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanRumsey committed Dec 8, 2021
1 parent 96ccc18 commit b6fe71e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 14,786 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -79,8 +79,8 @@
" R8 = spatialpy.Reaction(reactants={EBA:1}, products={EB:1, A:1}, rate=Kd)\n",
" R9 = spatialpy.Reaction(reactants={EBA:1, A:1}, products={EBA2:1}, rate=Ka)\n",
" R10 = spatialpy.Reaction(reactants={EBA2:1}, products={EBA:1, A:1}, rate=Kd)\n",
" R11 = spatialpy.Reaction(reactants={B:1}, products=None, rate=K4)\n",
" R12 = spatialpy.Reaction(reactants={A:1}, products=None, rate=K4)\n",
" R11 = spatialpy.Reaction(reactants={B:1}, products={}, rate=K4)\n",
" R12 = spatialpy.Reaction(reactants={A:1}, products={}, rate=K4)\n",
" self.add_reaction([R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12])\n",
"\n",
" self.add_initial_condition(spatialpy.ScatterInitialCondition(EA, 200, [1]))\n",
Expand All @@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -378716,7 +378716,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -378730,7 +378730,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"data": {
"text/plain": [
"'../../spatialpy/__init__.py'"
"'/Users/bryanrumsey/Documents/SpatialPy/examples/cylinderDemo/../../spatialpy/__init__.py'"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -133,11 +133,11 @@
"\n",
"\n",
" # Define Reactions\n",
" R1 = spatialpy.Reaction(reactants=None, products={A:1}, \n",
" R1 = spatialpy.Reaction(reactants={}, products={A:1}, \n",
" rate=k_creat1, restrict_to=2)\n",
" R2 = spatialpy.Reaction(reactants=None, products={B:1}, \n",
" R2 = spatialpy.Reaction(reactants={}, products={B:1}, \n",
" rate=k_creat2, restrict_to=3)\n",
" R3 = spatialpy.Reaction(reactants={A:1, B:1}, products=None, \n",
" R3 = spatialpy.Reaction(reactants={A:1, B:1}, products={}, \n",
" rate=k_react)\n",
" self.add_reaction([R1, R2, R3])\n",
" \n",
Expand Down Expand Up @@ -39648,7 +39648,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -39662,7 +39662,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
14,806 changes: 40 additions & 14,766 deletions examples/cylinderDemo/SpatialPy_cylinderDemo3D.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/cylinderDemo/cylinder_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def __init__(self, model_name="cylinder_demo3d"):


# Define Reactions
R1 = spatialpy.Reaction(reactants=None, products={A:1},
R1 = spatialpy.Reaction(reactants={}, products={A:1},
rate=k_creat1, restrict_to=2)
R2 = spatialpy.Reaction(reactants=None, products={B:1},
R2 = spatialpy.Reaction(reactants={}, products={B:1},
rate=k_creat2, restrict_to=3)
R3 = spatialpy.Reaction(reactants={A:1, B:1}, products=None,
R3 = spatialpy.Reaction(reactants={A:1, B:1}, products={},
rate=k_react)
self.add_reaction([R1, R2, R3])

Expand Down
10 changes: 5 additions & 5 deletions examples/yeast_polarization/Polarisome_1D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -125,7 +125,7 @@
" self.add_initial_condition(spatialpy.ScatterInitialCondition(Actinc,40))\n",
"\n",
" #self.timespan(range(0,3601,30))\n",
" self.timespan(range(0,201,10))"
" self.timespan(range(0,201,10), timestep_size=1)"
]
},
{
Expand All @@ -137,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -757,7 +757,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -771,7 +771,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b6fe71e

Please sign in to comment.