Skip to content

Commit e3a0f40

Browse files
committed
Fix NB 2 for OpenMM 8.1
Also, bump CI versions.
1 parent 6fe168e commit e3a0f40

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ jobs:
2121
strategy:
2222
matrix:
2323
CONDA_PY:
24-
- 3.7
2524
- 3.8
2625
- 3.9
26+
- 3.10
27+
- 3.11
2728

2829
steps:
2930
- uses: actions/checkout@v2

2_tps_analysis_tutorial.ipynb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,13 @@
327327
"metadata": {},
328328
"outputs": [],
329329
"source": [
330+
"# with OpenMM 8.0 or earlier: timestep = engine.snapshot_timestep\n",
331+
"# (also should work for data generated with OpenMM 8.1 or later)\n",
332+
"timestep = 2.0 * openmm.unit.femtosecond\n",
330333
"path_lengths = [len(step.active[0].trajectory) for step in flexible.steps]\n",
331334
"plt.hist(path_lengths, bins=40, alpha=0.5);\n",
332-
"print(\"Maximum:\", max(path_lengths), \"(\"+str(max(path_lengths)*engine.snapshot_timestep)+\")\")\n",
333-
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*engine.snapshot_timestep).format(\"%.3f\")+\")\")\n",
335+
"print(\"Maximum:\", max(path_lengths), \"(\"+str(max(path_lengths)*timestep)+\")\")\n",
336+
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*timestep).format(\"%.3f\")+\")\")\n",
334337
"plt.ylabel(\"Count\")\n",
335338
"plt.xlabel(\"Path length (Frames)\");"
336339
]
@@ -468,7 +471,7 @@
468471
],
469472
"metadata": {
470473
"kernelspec": {
471-
"display_name": "Python 3",
474+
"display_name": "Python 3 (ipykernel)",
472475
"language": "python",
473476
"name": "python3"
474477
},
@@ -482,7 +485,7 @@
482485
"name": "python",
483486
"nbconvert_exporter": "python",
484487
"pygments_lexer": "ipython3",
485-
"version": "3.7.10"
488+
"version": "3.9.13"
486489
},
487490
"toc": {
488491
"base_numbering": 1,

0 commit comments

Comments
 (0)