Skip to content

Commit f520a30

Browse files
update pyemma
1 parent c9d863f commit f520a30

56 files changed

Lines changed: 421 additions & 688 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LaTeX/episodes/06-pyemma.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ \subsection{Time-lagged Independent Component Analysis}
9292
\begin{itemize}
9393
\item Measures correlations persisting over lag time $\tau$.
9494
\item Slow processes correspond to large time-lagged correlations.
95+
\item This procedure is known as time-lagged independent component analysis (TICA): the eigenvectors of $C_\tau$ define the slow collective coordinates (tICs).
9596
\end{itemize}
9697
\end{frame}
9798

@@ -218,6 +219,7 @@ \subsection{Spectral analysis and validation}
218219
T(n\tau) \approx T(\tau)^n.
219220
\]
220221
\item Agreement validates chosen lag time.
222+
\item Passing CK ensures that the implied kinetics remain invariant when propagation is computed at multiples of the base lag, confirming the MSM describes the same slow modes.
221223
\end{itemize}
222224
\end{frame}
223225

@@ -235,6 +237,18 @@ \subsection{Transition Path Theory}
235237
q_i=0 \ (i\in A),\;
236238
q_i=1 \ (i\in B).
237239
\]
240+
\item The committor is the probability to reach $B$ before returning to $A$ and defines reactive surfaces.
241+
\end{itemize}
242+
\end{frame}
243+
244+
\begin{frame}
245+
\frametitle{Reactive fluxes}
246+
\begin{itemize}
247+
\item TPT flux:
248+
\[
249+
f_{ij} = \pi_i T_{ij} q_i (1-q_j)
250+
\]
251+
\item Measures net current along transition tubes and highlights dominant pathways.
238252
\end{itemize}
239253
\end{frame}
240254

docs/data.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,6 @@ Script source: <a href="https://github.com/Biocomputing-Teaching/Curso-MD-Analis
9595

9696
Script source: <a href="https://github.com/Biocomputing-Teaching/Curso-MD-Analisis/blob/main/scripts/generate_example_dcd.py">generate_example_dcd.py</a>
9797

98+
Script source: <a href="https://github.com/Biocomputing-Teaching/Curso-MD-Analisis/blob/main/scripts/generate_example_dcd.py">generate_example_dcd.py</a>
99+
98100
Note: the command to generate the DCD is in <a href="{{ site.baseurl }}/reference/">Reference</a>.

docs/episodes/06-pyemma.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ permalink: /episodes/06-pyemma/
2323
- [Tutorial pillars from the official PyEMMA guide](#tutorial-pillars-from-the-official-pyemma-guide)
2424
- [Pentapeptide showcase](#pentapeptide-showcase)
2525
- [Project](#project)
26+
- [References](#references)
2627
<!-- toc:end -->
2728

2829
## Duration
@@ -156,6 +157,8 @@ Time-lagged independent component analysis compresses the torsion data into a fe
156157

157158
##### TICA
158159

160+
Time-lagged Independent Component Analysis (TICA) pulls out the kinetically slow degrees of freedom by searching for linear combinations of features with maximum time-lagged autocorrelation; the resulting ICs (``IC1``, ``IC2``…) form the low-dimensional space where MSM transitions are best resolved.
161+
159162
The torsion-based data are projected with `pyemma.coordinates.tica(..., lag=5)` (0.5 ns) using the default kinetic map scaling and enough components to capture 95% of the kinetic variance. Histograms and densities on the first four ICs show well-separated metastable basins, and one trajectory is plotted over time to illustrate discrete jumps.
160163

161164
##### Discretization
@@ -166,6 +169,8 @@ k-means clustering is applied to the TICA coordinates. A VAMP2 scan over `[5, 10
166169

167170
Implied timescales are computed with `pyemma.msm.its(cluster.dtrajs, lags=50, nits=10, errors='bayes')` and plotted in ns. The timescales converge above 0.5 ns, which justifies a lag time of 5 steps for `pyemma.msm.bayesian_markov_model(cluster.dtrajs, lag=5, dt_traj='0.1 ns')`. Active-state and active-count fractions are printed, and a Chapman–Kolmogorov test with `mlags=6` over five metastable sets confirms Markovian consistency.
168171

172+
The Chapman–Kolmogorov (CK) test checks whether the transition probabilities propagate consistently across multiples of the lag time. By comparing estimates obtained at `` directly to the k-step propagation of the original lag-τ transition matrix, we verify the Markov assumption: a passing CK test indicates the kinetics remain invariant under coarse-graining, lending confidence to the MSM's lag choice.
173+
169174
#### MSM spectral analysis
170175

171176
The sample mean/std of the first 15 timescales are plotted together with their separations, showing the gap between the 4th and 5th process. Stationary distributions, free energies, and the first four right eigenvectors are visualized as contour plots on the first two TICA coordinates, revealing how slow processes connect the dense clusters.
@@ -174,6 +179,8 @@ The sample mean/std of the first 15 timescales are plotted together with their s
174179

175180
`msm.pcca(5)` produces fuzzy memberships that are contoured across IC1/IC2, and the argument-wise `argmax` provides crisp metastable assignments. Sample structures are saved via `pyemma.coordinates.save_traj` and visualized with `nglview`, while the tutorial also prints state free energies, MFPT tables, and direction-specific MFPTs, showing metastable state 1’s short lifetime. Transition path theory between states 2 and 4 uses `pyemma.msm.tpt`, and the committor is plotted as a contour map.
176181

182+
The committor gives the probability that a configuration will reach a specified final macrostate before returning to the initial macrostate, so contour maps of the committor reveal the transition pathways’ location, while the reactive fluxes computed by TPT count the net probability current between states. Examining both the committor surface and the fluxes ensures we understand the preferred transition routes in addition to the equilibrium populations[^noe_tpt].
183+
177184
#### Expectations and observables
178185

179186
Samples of 20 frames per Markov state are converted to MDTraj objects for SASA (`shrake_rupley`) and radius of gyration (`compute_rg`). The Bayesian MSM evaluates ensemble expectations, standard deviations, and confidence intervals for the radius of gyration, while Trp-1 SASA is projected on the TICA plane to produce contour plots, autocorrelation functions, and relaxation curves for ML and Bayesian MSMs. Comparing metastable state expectations against the global average highlights state 1 as the most distinct ensemble.
@@ -221,6 +228,10 @@ Deliverables:
221228

222229
The goal is to get comfortable with the full simulation‑to‑MSM pipeline and produce evidence (scripts + plots) you can share by this afternoon.
223230

231+
## References
232+
233+
- [^noe_tpt]: Noé, F.; Schütte, C.; Vanden-Eijnden, E.; Reich, L.; Weikl, T. R. (2009). *Constructing the equilibrium ensemble of folding pathways from short off-equilibrium simulations*. Proc. Natl. Acad. Sci. U.S.A., 106, 19011–19016.
234+
224235
<div class="episode-nav">
225236
<a href="{{ site.baseurl }}/episodes/05-muestreo-avanzado/">Previous</a>
226237
<a href="{{ site.baseurl }}/episodes/">All episodes</a>

docs/episodes/notebooks/01-introduccion-protein2-ligand-nglview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "8cf93d511ec940ab8cf67becbe274d02",
15+
"id": "016fd9f0b54d4f8b841a98b61c26f22d",
1616
"metadata": {
1717
"codex": {
1818
"auto_toc": true

docs/episodes/notebooks/01-introduccion-protein2-nglview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "105da9b058bd4efd937efa41d64fa11a",
15+
"id": "6250c01dc89549a6859e29d03396cf5b",
1616
"metadata": {
1717
"codex": {
1818
"auto_toc": true

docs/episodes/notebooks/01-introduccion-protein2-protein-nglview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "4ad6d23962eb480a9ef8102bdb844f95",
15+
"id": "517ecf33338b474e99a9af44a7b5fa82",
1616
"metadata": {
1717
"codex": {
1818
"auto_toc": true

docs/episodes/notebooks/01-introduccion.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "markdown",
18-
"id": "6a7b43bbb41448709f44b90a0bde87a2",
18+
"id": "987f4ce3d7474330910eed12c7e82cd4",
1919
"metadata": {
2020
"codex": {
2121
"auto_toc": true

docs/episodes/notebooks/01-introduccion_simple.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "markdown",
18-
"id": "54bb954df9b2482c8fd8bde287bc3715",
18+
"id": "82990682597145f8919dd6e52b1b371d",
1919
"metadata": {
2020
"codex": {
2121
"auto_toc": true

docs/episodes/notebooks/01-introduction-ligand-check.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "9f2a63f159bc46ab92da61893dd46717",
15+
"id": "bdcdb8a48de14b899a6d6507a40e9b43",
1616
"metadata": {
1717
"codex": {
1818
"auto_toc": true

docs/episodes/notebooks/01-introduction-sequence-check.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "fbcd570d17a549168e8e53d09bccafb2",
15+
"id": "3ef50b586b774b04b730d973e848e8d0",
1616
"metadata": {
1717
"codex": {
1818
"auto_toc": true

0 commit comments

Comments
 (0)