Skip to content

Commit 87bfffd

Browse files
committed
Add file to support py37 in 4_mstis_sampling
1 parent 1106027 commit 87bfffd

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

4_mstis_sampling_tutorial.ipynb

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"* Setting up a path sampling simulation with various move schemes\n",
1515
"* Visualizing trajectories while the path sampling is running\n",
1616
"\n",
17+
"<!--\n",
1718
"<div class=\"alert alert-warning\">\n",
1819
"This notebook is Python 2-only.\n",
19-
"</div>"
20+
"</div>\n",
21+
"-->"
2022
]
2123
},
2224
{
@@ -25,11 +27,13 @@
2527
"metadata": {},
2628
"outputs": [],
2729
"source": [
28-
"%matplotlib inline\n",
2930
"from __future__ import print_function\n",
31+
"%matplotlib inline\n",
32+
"import sys\n",
3033
"import openpathsampling as paths\n",
3134
"import numpy as np\n",
3235
"\n",
36+
"\n",
3337
"# toy_plot_helpers.py has conveniences for plotting the 2D contour plots, etc.\n",
3438
"%run ./toy_plot_helpers.py"
3539
]
@@ -217,7 +221,20 @@
217221
"metadata": {},
218222
"outputs": [],
219223
"source": [
220-
"old_store = paths.AnalysisStorage(\"mstis_bootstrap.nc\")"
224+
"# some aspects of storage depend on Python version\n",
225+
"if sys.version_info > (3,):\n",
226+
" filename = \"mstis_bootstrap_py3.nc\"\n",
227+
"else:\n",
228+
" filename = \"mstis_bootstrap_py2.nc\""
229+
]
230+
},
231+
{
232+
"cell_type": "code",
233+
"execution_count": null,
234+
"metadata": {},
235+
"outputs": [],
236+
"source": [
237+
"old_store = paths.AnalysisStorage(filename)"
221238
]
222239
},
223240
{

mstis_bootstrap_py3.nc

50.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)