Skip to content

Commit 3ab8161

Browse files
authored
Merge pull request #173 from markovmodel/th_rev
linking between NB 01-08 & from manuscript to NB 01-08 [ci skip]
2 parents 2af7a29 + 589ebd4 commit 3ab8161

10 files changed

+45
-30
lines changed

manuscript/manuscript.tex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,9 @@ \subsection{Feature selection}
371371
and the more general variational approach for Markov processes (VAMP)~\cite{vamp-preprint}
372372
provide a systematic means to quantitatively compare multiple representations of the simulation data.
373373
In particular, we can use a scalar score obtained using VAMP to directly compare the ability of certain features to capture slow dynamical modes in a particular molecular system.
374+
In Notebook (01), we present in detail how to extract features from MD datasets and how to systematically compare them.
374375

375-
Here, we utilize the VAMP-2 score, which maximizes the kinetic variance contained in the features~\cite{kinetic-maps}.
376+
Throughout this tutorial, we utilize the VAMP-2 score, which maximizes the kinetic variance contained in the features~\cite{kinetic-maps}.
376377
We should always evaluate the score in a cross-validated manner to ensure that we neither include too few features (under-fitting) or too many features (over-fitting)~\cite{gmrq,vamp-preprint}.
377378
To choose among three different molecular features reflecting protein structure,
378379
we compute the (cross-validated) VAMP-2 score (Notebook 00).
@@ -398,6 +399,8 @@ \subsection{Dimensionality reduction}
398399
Discrete jumps between the minima can be observed by visualizing the transformation of the first trajectory into these ICs (Fig.~\ref{fig:io-to-tica}d).
399400
We thus assume that our TICA-transformed backbone torsion features describe one or more metastable processes.
400401

402+
We demonstrate how to apply TICA, suggest how to interpret the projected coordinates, and compare the results to other dimension reduction techniques in Notebook (02).
403+
401404
\begin{figure}
402405
\includegraphics{figure_3}
403406
\caption{Example analysis of the conformational dynamics of a pentapeptide backbone:
@@ -414,7 +417,8 @@ \subsection{Discretization}
414417
which can greatly facilitate the decomposition of our system into the discrete Markovian states necessary for MSM estimation.
415418
Here, we use the $k$-means algorithm to segment the four dimensional TICA space into $k=75$ cluster centers.
416419
The number of cluster centers has been chosen to optimize the VAMP-2 score in a manner identical to how the feature selection was carried out above,
417-
which is shown in the showcase notebook (00).
420+
which is shown in the showcase Notebook (00).
421+
A detailed comparison between different clustering techniques is provided in Notebook (02).
418422

419423
\subsection{MSM estimation and validation}
420424

@@ -447,6 +451,8 @@ \subsection{MSM estimation and validation}
447451
and shows that the MSM we have estimated at lag time $\tau=0.5$~ns indeed predicts the
448452
long-timescale behavior of our system within error (blue/shaded area).
449453

454+
In Notebook (03), we demonstrate in detail how to estimate and validate MSMs with PyEMMA.
455+
450456
\subsection{Analyzing the MSM}
451457

452458
\begin{figure}
@@ -526,6 +532,8 @@ \subsection{Analyzing the MSM}
526532
The transition network can be additionally visualized by plotting representative structures of the five metastable states $\mathcal{S}_{(1-5)}$ according to their committor probability (Fig.~\ref{fig:tpt-network}).
527533
It is easy to see from this depiction that the dominant pathway from $\mathcal{S}_2$ to $\mathcal{S}_4$ proceeds through $\mathcal{S}_5$.
528534

535+
More details about (spectral) properties of MSMs and how to analyze them with PyEMMA are discussed in Notebook (04) and Notebook (05).
536+
529537
\subsection{Connecting the MSM with experimental data}
530538

531539
\begin{figure}
@@ -560,6 +568,8 @@ \subsection{Connecting the MSM with experimental data}
560568
We see that the predicted relaxation signal has a much larger amplitude for the nonequilibrium initialization,
561569
making it more likely to be experimentally measurable.
562570

571+
In addition to a detailed demonstration of the above, Notebook (06) demonstrates how to compute J-couplings and dynamic fingerprints from MSMs.
572+
563573
\subsection{Summary}
564574

565575
In this section, we have summarized how to conduct an MSM-based analysis of biomolecular dynamics data using PyEMMA.
@@ -587,6 +597,7 @@ \subsection{Modeling large systems}
587597
we explain how to deal with those in the tutorials (Notebook 00 and 02).
588598

589599
More details on how to model complex systems with the techniques presented here are described, e.g., by~\cite{plattner_protein_2015,plattner_complete_2017}.
600+
We further examine some symptoms that may indicate problematic or difficult datasets, and demonstrate how to deal with them in Notebook (08).
590601

591602
\subsection{Advanced Methods}
592603

notebooks/00-pentapeptide-showcase.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@
17781778
"name": "python",
17791779
"nbconvert_exporter": "python",
17801780
"pygments_lexer": "ipython3",
1781-
"version": "3.6.6"
1781+
"version": "3.6.5"
17821782
},
17831783
"toc": {
17841784
"base_numbering": 1,

notebooks/01-data-io-and-featurization.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
"metadata": {},
208208
"source": [
209209
"In PyEMMA, the `featurizer` is a central object that incorporates the system's topology.\n",
210-
"We start by creating it object using the topology file.\n",
210+
"We start by creating it using the topology file.\n",
211211
"Features are now easily computed by adding the target feature.\n",
212212
"If no feature is added, the featurizer will extract Cartesian coordinates."
213213
]
@@ -395,7 +395,7 @@
395395
"cell_type": "markdown",
396396
"metadata": {},
397397
"source": [
398-
"We note that the distribution in backbone torsion space contains several basins that will be assigned to metastable states in follow-up notebooks.\n",
398+
"We note that the distribution in backbone torsion space contains several basins that will be assigned to metastable states in follow-up notebooks ([Notebook 05 ➜ 📓](05-pcca-tpt.ipynb), [Notebook 07 ➜ 📓](07-hidden-markov-state-models.ipynb)).\n",
399399
"Again, the free energy plot only depicts a pseudo free energy surface of the sampled data and was not re-weighted to equilibrium.\n",
400400
"\n",
401401
"Let us look at a different featurization example and load the positions of all heavy atoms instead.\n",
@@ -519,7 +519,7 @@
519519
"Using `load()`, we put the full data into memory.\n",
520520
"This is possible for all examples in this tutorial.\n",
521521
"\n",
522-
"Many real world apllications, though, require more memory than your workstation might provide.\n",
522+
"Many real world applications, though, require more memory than your workstation might provide.\n",
523523
"For these cases, you should use the `source()` function:"
524524
]
525525
},
@@ -1086,7 +1086,7 @@
10861086
"name": "python",
10871087
"nbconvert_exporter": "python",
10881088
"pygments_lexer": "ipython3",
1089-
"version": "3.6.6"
1089+
"version": "3.6.5"
10901090
},
10911091
"toc": {
10921092
"base_numbering": 1,

notebooks/02-dimension-reduction-and-discretization.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"\n",
99
"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"><img alt=\"Creative Commons Licence\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" title='This work is licensed under a Creative Commons Attribution 4.0 International License.' align=\"right\"/></a>\n",
1010
"\n",
11-
"In this notebook, we will cover how to perform dimension reduction and discretization of molecular dynamics data. We also repeat data loading and visualization tasks from the previous notebook\n",
12-
"([01 ➜ 📓](01-data-io-and-featurization.ipynb)).\n",
11+
"In this notebook, we will cover how to perform dimension reduction and discretization of molecular dynamics data. We also repeat data loading and visualization tasks from [Notebook 01 ➜ 📓](01-data-io-and-featurization.ipynb).\n",
1312
"\n",
1413
"Maintainers: [@cwehmeyer](https://github.com/cwehmeyer), [@marscher](https://github.com/marscher), [@thempel](https://github.com/thempel), [@psolsson](https://github.com/psolsson)\n",
1514
"\n",
@@ -153,6 +152,8 @@
153152
"⚠️ For large datasets we also offer a mini batch version of $k$-means which has the same semantics as the original method but trains the centers on subsets of your data.\n",
154153
"This tutorial does not cover this case, but you should keep in mind that $k$-means requires your low dimensional space to fit into your main memory.\n",
155154
"\n",
155+
"As the number of cluster centers has to be chosen by the modeler, we will analyze its implications on the MSM analysis in [Notebook 03 ➜ 📓](03-msm-estimation-and-validation.ipynb). A systematic approach to choose this number is proposed in [Notebook 00 ➜ 📓](00-pentapeptide-showcase.ipynb).\n",
156+
"\n",
156157
"The main result of a discretization for Markov modeling, however,\n",
157158
"is not the set of centers but the time series of discrete states.\n",
158159
"These are accessible via the `dtrajs` attribute of any clustering object:"
@@ -387,7 +388,7 @@
387388
"cell_type": "markdown",
388389
"metadata": {},
389390
"source": [
390-
"Following the previous example, we perform a $k$-means ($100$ centers, stride of $5$) and a regspace clustering ($0.3$ radians center distance) on the full two-dimensional data set and visualize the obtained centers:"
391+
"Following the previous example, we perform a $k$-means ($100$ centers, stride of $5$) and a regspace clustering ($0.3$ radians center distance) on the full two-dimensional data set and visualize the obtained centers. In [Notebook 03 ➜ 📓](03-msm-estimation-and-validation.ipynb), we show the effect of different numbers of cluster centers on MSM estimation."
391392
]
392393
},
393394
{
@@ -1338,7 +1339,7 @@
13381339
"name": "python",
13391340
"nbconvert_exporter": "python",
13401341
"pygments_lexer": "ipython3",
1341-
"version": "3.6.6"
1342+
"version": "3.6.5"
13421343
},
13431344
"toc": {
13441345
"base_numbering": 1,

notebooks/03-msm-estimation-and-validation.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@
240240
"\n",
241241
"Please note though that this ITS convergence analysis is based on the assumption that $200$ $k$-means centers are sufficient to discretize the dynamics.\n",
242242
"In order to study the influence of the clustering on the ITS convergence,\n",
243-
"we repeat the clustering and ITS convergence analysis for various number of cluster centers:"
243+
"we repeat the clustering and ITS convergence analysis for various number of cluster centers.\n",
244+
"For the sake of simplicity, we will restrict ourselves to the $k$-means algorithm; alternative clustering methods are presented in [Notebook 02 ➜ 📓](02-dimension-reduction-and-discretization.ipynb)."
244245
]
245246
},
246247
{
@@ -291,7 +292,7 @@
291292
"Now, let's continue with the alanine dipeptide system.\n",
292293
"We estimate an MSM at lag time $10$ ps and, given that we have three slow processes, perform a CK test for four metastable states.\n",
293294
"\n",
294-
"⚠️ In general, the number of metastable states is a modeler's choice and will be explained in further notebooks."
295+
"⚠️ In general, the number of metastable states is a modeler's choice and will be explained in more detail in [Notebook 04 ➜ 📓](04-msm-analysis.ipynb) and [Notebook 07 ➜ 📓](07-hidden-markov-state-models.ipynb)."
295296
]
296297
},
297298
{
@@ -621,7 +622,7 @@
621622
"name": "python",
622623
"nbconvert_exporter": "python",
623624
"pygments_lexer": "ipython3",
624-
"version": "3.6.6"
625+
"version": "3.6.5"
625626
},
626627
"toc": {
627628
"base_numbering": 1,

notebooks/04-msm-analysis.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
"cell_type": "markdown",
238238
"metadata": {},
239239
"source": [
240-
"The stationary distribution can also be used to correct the `pyemma.plots.plot_free_energy()` function.\n",
240+
"The stationary distribution can also be used to correct the `pyemma.plots.plot_free_energy()` function that we used to visualize this dataset in [Notebook 01 ➜ 📓](01-data-io-and-featurization.ipynb).\n",
241241
"This might be necessary if the data points are not sampled from global equilibrium.\n",
242242
"\n",
243243
"In this case, we assign the weight of the corresponding discrete state to each data point and pass this information to the plotting function via its `weights` parameter:"
@@ -339,7 +339,7 @@
339339
"cell_type": "markdown",
340340
"metadata": {},
341341
"source": [
342-
"We now save the model to do more analyses with PCCA++ and TPT in the follow-up notebook:"
342+
"We now save the model to do more analyses with PCCA++ and TPT in [Notebook 05 ➜ 📓](05-pcca-tpt.ipynb):"
343343
]
344344
},
345345
{
@@ -841,7 +841,7 @@
841841
"name": "python",
842842
"nbconvert_exporter": "python",
843843
"pygments_lexer": "ipython3",
844-
"version": "3.6.6"
844+
"version": "3.6.5"
845845
},
846846
"toc": {
847847
"base_numbering": 1,

notebooks/05-pcca-tpt.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"Since PCCA++, in simplified words, does a clustering in eigenvector space and the first eigenvector separated these states already, the nice separation comes to no surprise.\n",
137137
"\n",
138138
"It is important to note, though, that PCCA++ in general does not yield a coarse transition matrix.\n",
139-
"How to obtain this will be covered in the HMM notebook.\n",
139+
"How to obtain this will be covered in [Notebook 07 ➜ 📓](07-hidden-markov-state-models.ipynb).\n",
140140
"However, we can compute mean first passage times (MFPTs) and equilibrium probabilities on the metastable sets and extract representative structures.\n",
141141
"\n",
142142
"The stationary probability of metastable states can simply be computed by summing over all of its micro-states\n",
@@ -436,7 +436,8 @@
436436
"Have you noticed how well the metastable state coloring agrees with the eigenvector visualization of the three slowest processes?\n",
437437
"\n",
438438
"If we could afford a shorter lag time, we might even be able to resolve more processes and, thus,\n",
439-
"subdivide the metastable states three (fifth slowest process) and zero (sixth slowest process).\n",
439+
"subdivide the metastable states three and four.\n",
440+
"We show how to do this with HMMs in [Notebook 07 ➜ 📓](07-hidden-markov-state-models.ipynb).\n",
440441
"\n",
441442
"Now we define a small function to visualize samples of metastable states with NGLView."
442443
]
@@ -620,7 +621,7 @@
620621
"#### Exercise 1\n",
621622
"\n",
622623
"Define a `featurizer` that loads the heavy atom coordinates and load the data into memory.\n",
623-
"Also load the TICA object from the previous notebook to transform the featurized data.\n",
624+
"Also load the TICA object from [Notebook 04 ➜ 📓](04-msm-analysis.ipynb) to transform the featurized data.\n",
624625
"Further, the estimated MSM, Bayesian MSM, and Cluster objects should be loaded from disk. "
625626
]
626627
},
@@ -695,6 +696,7 @@
695696
"cell_type": "code",
696697
"execution_count": null,
697698
"metadata": {
699+
"scrolled": true,
698700
"solution2": "hidden",
699701
"solution2_first": true
700702
},
@@ -993,7 +995,7 @@
993995
"name": "python",
994996
"nbconvert_exporter": "python",
995997
"pygments_lexer": "ipython3",
996-
"version": "3.6.6"
998+
"version": "3.6.5"
997999
},
9981000
"toc": {
9991001
"base_numbering": 1,

notebooks/06-expectations-and-observables.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@
966966
"name": "python",
967967
"nbconvert_exporter": "python",
968968
"pygments_lexer": "ipython3",
969-
"version": "3.6.6"
969+
"version": "3.6.5"
970970
},
971971
"toc": {
972972
"base_numbering": 1,

notebooks/07-hidden-markov-state-models.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@
684684
"metadata": {},
685685
"source": [
686686
"As we see, in addition to the properties described above, HMMs provide the same analysis tools as MSMs.\n",
687-
"For example, eigenvectors and mean first passage times can be extracted as described in previous notebooks. \n",
687+
"For example, eigenvectors and mean first passage times can be extracted as described in [Notebook 04 ➜ 📓](04-msm-analysis.ipynb) and [Notebook 05 ➜ 📓](05-pcca-tpt.ipynb). \n",
688688
"\n",
689689
"Let us now repeat this approach again for another featurization:\n",
690690
"we already know that it is possible to resolve six metastable states (five slow processes) using an HMM estimated on a discretization of the backbone torsions.\n",
@@ -914,7 +914,7 @@
914914
"\n",
915915
"Let us now repeat the analysis of our pentapeptide using an HMM.\n",
916916
"\n",
917-
"We fetch the pentapeptide data set and prepare the discrete trajectories as explained in the showcase notebook.\n",
917+
"We fetch the pentapeptide data set and prepare the discrete trajectories as explained in [Notebook 00 ➜ 📓](00-pentapeptide-showcase.ipynb).\n",
918918
"There, we already learned that $5$ metastable states are a good choice for our model.\n",
919919
"According to our implied timescales plot, we can resolve four processes for up to $2.5$ ns in our data. "
920920
]
@@ -1253,7 +1253,7 @@
12531253
"name": "python",
12541254
"nbconvert_exporter": "python",
12551255
"pygments_lexer": "ipython3",
1256-
"version": "3.6.6"
1256+
"version": "3.6.5"
12571257
},
12581258
"toc": {
12591259
"base_numbering": 1,

notebooks/08-common-problems.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@
700700
"source": [
701701
"Congratulations, we have estimated a well-validated MSM.\n",
702702
"The only question remaining is: What does it actually describe?\n",
703-
"For this, we usually extract representative structures as described in a previous notebook.\n",
703+
"For this, we usually extract representative structures as described in [Notebook 00 ➜ 📓](00-pentapeptide-showcase.ipynb).\n",
704704
"We will not do this here but look at the metastable trajectories instead.\n",
705705
"\n",
706706
"#### What could be wrong about it?\n",
@@ -781,7 +781,7 @@
781781
"the TICA lag time was deliberately chosen way too high.\n",
782782
"That's easy to fix.\n",
783783
"\n",
784-
"Let's now have a look at how the metastable trajectories should look like for a decent model such as the one estimated in the previous notebooks.\n",
784+
"Let's now have a look at how the metastable trajectories should look for a decent model such as the one estimated in [Notebook 05 ➜ 📓](05-pcca-tpt.ipynb).\n",
785785
"We will take the same input data,\n",
786786
"do a TICA transform with a realistic lag time of $10$ ps,\n",
787787
"and coarse grain into $2$ metastable states in order to compare with the example above."
@@ -883,9 +883,9 @@
883883
"- connected but poorly sampled trajectories and how convergence looks in this case,\n",
884884
"- ill-conducted TICA analysis and what it yields.\n",
885885
"\n",
886-
"The most important message from this tutorial is that histograms are not a means of identifying metastability or connectedness.\n",
887-
"One should not forget about the underlying trajectories which should play the role of the ground truth to be modeled.\n",
888-
"Histograms only help us to understand this ground truth but are not necessarily meaningful."
886+
"The most important lesson from this tutorial is that histograms, which are usually calculated in a projected space, are not a sufficient means of identifying metastability or connectedness.\n",
887+
"It is crucial to remember that the underlying trajectories play the role of ground truth for the model. \n",
888+
"Ultimately, histograms only help us to understand this ground truth but cannot provide a complete picture."
889889
]
890890
}
891891
],

0 commit comments

Comments
 (0)