Skip to content

Commit 8636309

Browse files
authored
Merge pull request #7 from dwhswenson/molsim2021-updates
Updates based on feedback from MolSim 2021
2 parents 06fb894 + 122667f commit 8636309

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

2_tps_analysis_tutorial.ipynb

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,13 @@
9898
"cell_type": "markdown",
9999
"metadata": {},
100100
"source": [
101+
"From looking at the path tree, we can get a sense of how well our sampling is going. Some questions to consider:\n",
102+
"\n",
101103
"* Do you see acceptance of both forward and backward shots?\n",
102104
"* How many decorrelated paths do you see? \n",
103-
"* How many accepted moves between decorrelated paths? How many total moves?"
105+
"* How many accepted moves between decorrelated paths? How many total moves?\n",
106+
"\n",
107+
"If you don't see acceptance of both forward and backward shots, that might indicate a problem in either the state definitions or in the sampling (which might be remedied by using a more advanced shooting point selection algorithm). The number MC steps between decorrelated paths gives a sense of how quickly your simulation is exploring path space. If you see very few decorrelated paths (or none at all), that may indicate that you should switch to a more advanced algorithm such as spring shooting."
104108
]
105109
},
106110
{
@@ -152,6 +156,13 @@
152156
"```"
153157
]
154158
},
159+
{
160+
"cell_type": "markdown",
161+
"metadata": {},
162+
"source": [
163+
"Next let's visualize the shooting point from one of your MC steps. There are two reasons we do this: First, this gives you more practice visualizing OPS data with NGLView. Second, this shows you how to extract the shooting point snapshot from a MC step. Analyzing the shooting points can give ideas on how to troubleshoot problems with sampling (e.g., if you had very few accepted backward shots)."
164+
]
165+
},
155166
{
156167
"cell_type": "code",
157168
"execution_count": null,
@@ -319,14 +330,16 @@
319330
"path_lengths = [len(step.active[0].trajectory) for step in flexible.steps]\n",
320331
"plt.hist(path_lengths, bins=40, alpha=0.5);\n",
321332
"print(\"Maximum:\", max(path_lengths), \"(\"+str(max(path_lengths)*engine.snapshot_timestep)+\")\")\n",
322-
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*engine.snapshot_timestep).format(\"%.3f\")+\")\")"
333+
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*engine.snapshot_timestep).format(\"%.3f\")+\")\")\n",
334+
"plt.ylabel(\"Count\")\n",
335+
"plt.xlabel(\"Path length (Frames)\");"
323336
]
324337
},
325338
{
326339
"cell_type": "markdown",
327340
"metadata": {},
328341
"source": [
329-
"* Estimate (by eye) what the path length should be if you ensured that fixed-length TPS would include 99% of the paths. How much longer is that than the average path length here?"
342+
"* Estimate (by eye) what the path length should be if you ensured that fixed-length TPS would include 99% of the paths. How much longer is that than the average path length here? What does that mean about the simulation time required for fixed-length TPS as compared the flexible-length TPS?"
330343
]
331344
},
332345
{
@@ -395,7 +408,9 @@
395408
" xticklabels=tick_labels,\n",
396409
" yticklabels=tick_labels, \n",
397410
" label_format=\"{:4.2f}\")\n",
398-
"ax = plotter.plot(cmap=\"Blues\")"
411+
"ax = plotter.plot(cmap=\"Blues\")\n",
412+
"plt.xlabel(\"$\\phi$\")\n",
413+
"plt.ylabel(\"$\\psi$\");"
399414
]
400415
},
401416
{
@@ -407,7 +422,7 @@
407422
"* Which one appears to be more frequent? \n",
408423
"* Do they look like completely separate channels, or does it look like some paths involves parts of both?\n",
409424
"\n",
410-
"Next, you'll find a representative trajectory for each channel. This will just involve trial and error until you find one."
425+
"Next, you'll find a representative trajectory for each channel. This will just involve trial and error until you find one. You're likely to also find trajectories that at least partly cross into the other channel -- these two channels are not very strictly separated."
411426
]
412427
},
413428
{
@@ -431,14 +446,16 @@
431446
"ax = plotter.plot(xlim=(-np.pi, 0), ylim=(-np.pi/2, np.pi), cmap=\"Blues\")\n",
432447
"plotter.plot_trajectory(trajA, '-r', lw=1)\n",
433448
"plotter.plot_trajectory(trajB, '-k', lw=1)\n",
449+
"plt.xlabel(\"$\\phi$\")\n",
450+
"plt.ylabel(\"$\\psi$\");\n",
434451
"#plt.savefig(\"AD_tps_pathdensity.pdf\") # uncomment this line to save as PDF"
435452
]
436453
},
437454
{
438455
"cell_type": "markdown",
439456
"metadata": {},
440457
"source": [
441-
"If you have the full simulation data, you could visualize these trajectories with NGLView. (Full simulation data not provided online, due to size), using the same approach as above."
458+
"If you have the full simulation data, you could visualize these trajectories with NGLView, using the same approach as above. (Full simulation data not provided online, due to size.)"
442459
]
443460
},
444461
{
@@ -465,7 +482,7 @@
465482
"name": "python",
466483
"nbconvert_exporter": "python",
467484
"pygments_lexer": "ipython3",
468-
"version": "3.7.3"
485+
"version": "3.7.10"
469486
},
470487
"toc": {
471488
"base_numbering": 1,

3_committor_analysis_tutorial.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@
236236
"source": [
237237
"You'll notice that this is *not* very sharply peaked in $\\psi$. This means that $\\psi$ alone probably doesn't define the transition state.\n",
238238
"\n",
239-
"If $\\psi$ did define the transition state, we'd probably expect the transition state to be around $\\psi = 0.6$ (\\~35 degrees) to $\\psi = 1.0$ (\\~60 degrees). Now, instead of keeping the committor probability fixed and histogramming the values of $\\psi$, let's see what the values of the committor are for a fixed value of $\\psi = \\psi^*$. If $\\psi^*$ defined the transition state, then the committor would always be 0.5 here."
239+
"If $\\psi$ did define the transition state, we'd probably expect the transition state to be around $\\psi = 0.6$ (\\~35 degrees) to $\\psi = 1.0$ (\\~60 degrees). Now, instead of keeping the committor probability fixed and histogramming the values of $\\psi$, let's see what the values of the committor are for a fixed value of $\\psi = \\psi^*$. If $\\psi^*$ defined the transition state, then the committor would always be 0.5 here.\n",
240+
"\n",
241+
"Previous, we tried to show that frames with a committor around 0.5 had a certain value of $\\psi$. Now we're trying to see if that value of $\\psi$ always implies that frames have a committor around 0.5. We need to show both directions before we can claim that the transition state is defined by that value of $\\psi$."
240242
]
241243
},
242244
{
@@ -320,7 +322,7 @@
320322
"name": "python",
321323
"nbconvert_exporter": "python",
322324
"pygments_lexer": "ipython3",
323-
"version": "3.7.3"
325+
"version": "3.7.10"
324326
},
325327
"toc": {
326328
"base_numbering": 1,

0 commit comments

Comments
 (0)