Conformational analysis of CXCL12

In this tutorial, we demonstrate how to use the HTMD code for doing conformational analysis.

To analyze, one needs MD trajectories first, which can be generated with HTMD. Here, we already provide the trajectories (data) to analyze. You can download the data from here. (Warning: 2.6 GB filesize)

Alternatively, you can download the dataset using wget.

import os
assert os.system('wget -rcN -np -nH -q --cut-dirs=2 -R index.html* http://pub.htmd.org/tutorials/cxcl12-conformational-analysis/filtered/') == 0

Getting started

First we import the modules we are going to need for the tutorial:

%pylab inline
from htmd.ui import *
config(viewer='webgl')
Populating the interactive namespace from numpy and matplotlib

Please cite HTMD: Doerr et al.(2016)JCTC,12,1845.
https://dx.doi.org/10.1021/acs.jctc.6b00049
Documentation: http://software.acellera.com/
To update: conda update htmd -c acellera -c psi4

You are on the latest HTMD version (unpackaged : /home/joao/maindisk/software/repos/Acellera/htmd/htmd).

Introduction to CXCL12

CXCL12 is a chemokine involved in…

  • many types of cancer
  • inflammatory diseases
  • early development events

system

Sampling major conformational states

There are many different metrics to assess the overall conformational changes of a protein. From them all, phi and psi angles of the protein backbone (dihedrals) have been the most successful descriptors in “blindly” capturing the major protein conformations.

In this section we will project our trajectories on the backbone dihedrals and, we will reduce the dimensionality by using tICA and then we will build a Markov Model to asses the major protein conformations in equilibrium.

conformations

Load the trajectories into a simlist

fsims = simlist(glob('./filtered/*/'), './filtered/filtered.pdb')
Creating simlist: 100%|██████████| 289/289 [00:00<00:00, 2795.13it/s]

Calculate metrics: protein backbone dihedrals

CXCL12 has a very flexible C-terminus loop as well as a transiently disorderable N-terminal alfa helix. In this study we are not interested in them but in the core of the chemokine. For this reason, we will select residues from 10 to 54.

metr = Metric(fsims)
metr.set(MetricDihedral(protsel='protein and resid 10 to 54', sincos=True))
data = metr.project()
data.fstep = 0.1
Projecting trajectories:   0%|          | 1/289 [00:00<01:13,  3.89it/s]2018-03-20 02:12:04,241 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x4/1x4-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4400_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:04,259 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:04,271 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x3/1x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2434_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:04,286 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x12/1x12-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5012_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  11%|█         | 32/289 [00:02<00:19, 13.05it/s]2018-03-20 02:12:06,279 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x16/1x16-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7668_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:06,341 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x32/1x32-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8404_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  15%|█▍        | 43/289 [00:03<00:18, 13.63it/s]2018-03-20 02:12:06,984 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:06,990 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x38/1x38-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0319_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:07,027 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x3/2x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2726_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  19%|█▊        | 54/289 [00:03<00:16, 14.04it/s]2018-03-20 02:12:07,694 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x19/2x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0663_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:07,739 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x24/2x24-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7758_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:07,853 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x25/2x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7152_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  20%|██        | 58/289 [00:04<00:18, 12.48it/s]2018-03-20 02:12:08,594 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x35/2x35-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3807_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  24%|██▍       | 70/289 [00:05<00:16, 12.96it/s]2018-03-20 02:12:09,082 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x2/3x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3083_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:09,231 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x5/3x5-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0952_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  26%|██▌       | 74/289 [00:05<00:16, 12.87it/s]2018-03-20 02:12:09,314 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x8/3x8-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1271_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:09,355 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x11/3x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9275_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  28%|██▊       | 81/289 [00:06<00:15, 13.21it/s]2018-03-20 02:12:09,686 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x14/3x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5196_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  31%|███       | 89/289 [00:06<00:15, 13.18it/s]2018-03-20 02:12:10,321 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x25/3x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7475_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  37%|███▋      | 106/289 [00:07<00:13, 13.56it/s]2018-03-20 02:12:11,526 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x9/4x9-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8576_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  37%|███▋      | 108/289 [00:08<00:13, 13.45it/s]2018-03-20 02:12:11,609 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x13/4x13-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1867_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  40%|████      | 116/289 [00:08<00:12, 13.81it/s]2018-03-20 02:12:12,069 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x22/4x22-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4765_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  42%|████▏     | 120/289 [00:08<00:12, 13.71it/s]2018-03-20 02:12:12,360 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x29/4x29-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5193_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  42%|████▏     | 122/289 [00:08<00:12, 13.62it/s]2018-03-20 02:12:12,530 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x31/4x31-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3619_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  44%|████▍     | 128/289 [00:09<00:11, 13.73it/s]2018-03-20 02:12:12,975 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  45%|████▍     | 130/289 [00:09<00:11, 13.70it/s]2018-03-20 02:12:13,062 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x40/4x40-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3949_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:13,181 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x2/5x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5764_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  46%|████▌     | 133/289 [00:09<00:11, 13.76it/s]2018-03-20 02:12:13,305 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x4/5x4-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2596_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  48%|████▊     | 138/289 [00:09<00:10, 13.87it/s]2018-03-20 02:12:13,634 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  55%|█████▍    | 158/289 [00:11<00:09, 14.00it/s]2018-03-20 02:12:14,911 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x3/6x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8829_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  56%|█████▌    | 161/289 [00:11<00:09, 14.06it/s]2018-03-20 02:12:15,087 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x2/6x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8150_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  57%|█████▋    | 166/289 [00:11<00:08, 14.15it/s]2018-03-20 02:12:15,450 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x10/6x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7487_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  58%|█████▊    | 168/289 [00:11<00:08, 14.07it/s]2018-03-20 02:12:15,586 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x13/6x13-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0906_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  64%|██████▎   | 184/289 [00:12<00:07, 14.25it/s]2018-03-20 02:12:16,480 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x32/6x32-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6786_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  64%|██████▍   | 186/289 [00:13<00:07, 14.25it/s]2018-03-20 02:12:16,732 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x36/6x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0862_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  65%|██████▌   | 188/289 [00:13<00:07, 14.18it/s]2018-03-20 02:12:16,906 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x39/6x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6616_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  69%|██████▊   | 198/289 [00:13<00:06, 14.26it/s]2018-03-20 02:12:17,442 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x15/7x15-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9516_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  69%|██████▉   | 200/289 [00:14<00:06, 14.26it/s]2018-03-20 02:12:17,669 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x19/7x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5246_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  70%|██████▉   | 202/289 [00:14<00:06, 14.29it/s]2018-03-20 02:12:17,704 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x21/7x21-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1683_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  75%|███████▌  | 217/289 [00:15<00:05, 14.36it/s]2018-03-20 02:12:18,857 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x2/8x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9548_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  78%|███████▊  | 224/289 [00:15<00:04, 14.36it/s]2018-03-20 02:12:19,297 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x12/8x12-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8911_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  79%|███████▉  | 228/289 [00:15<00:04, 14.43it/s]2018-03-20 02:12:19,452 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  81%|████████  | 233/289 [00:16<00:03, 14.36it/s]2018-03-20 02:12:19,790 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x25/8x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1273_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:19,809 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x27/8x27-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6514_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  83%|████████▎ | 239/289 [00:16<00:03, 14.47it/s]2018-03-20 02:12:20,303 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x36/8x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7283_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  84%|████████▎ | 242/289 [00:16<00:03, 14.45it/s]2018-03-20 02:12:20,489 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x6/9x6-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9895_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  91%|█████████ | 262/289 [00:17<00:01, 14.59it/s]2018-03-20 02:12:21,651 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x24/9x24-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4916_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:21,697 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x29/9x29-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3439_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:21,755 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x33/9x33-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1977_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  94%|█████████▍| 273/289 [00:18<00:01, 14.62it/s]2018-03-20 02:12:22,384 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x2/10x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3128_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  99%|█████████▊| 285/289 [00:19<00:00, 14.70it/s]2018-03-20 02:12:23,165 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x14/10x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4610_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:23,335 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x19/10x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3196_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories: 100%|██████████| 289/289 [00:19<00:00, 14.52it/s]
2018-03-20 02:12:24,038 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x31/10x31-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4437_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:12:24,959 - htmd.projections.metric - WARNING - Multiple framesteps [0.1, 0.10000000149] ns were read from the simulations. Taking the statistical mode: 0.10000000149011612ns. If it looks wrong, you can modify it by manually setting the MetricData.fstep property.
data.plotTrajSizes()
../../_images/cxcl12-conformational-analysis_17_0.png

Dimensionality reduction

tica = TICA(data, 20)
dataTica = tica.project(3)
A Jupyter Widget
/home/joao/maindisk/SANDBOX/miniconda3/miniconda3/lib/python3.6/site-packages/pyemma/__init__.py:91: UserWarning: You are not using the latest release of PyEMMA. Latest is 2.5.1, you have 2.4.
  .format(latest=latest, current=current), category=UserWarning)
A Jupyter Widget

Clustering

dataTica.cluster(MiniBatchKMeans(n_clusters=200), mergesmall=5)
2018-03-20 02:13:49,608 - htmd.metricdata - INFO - Mergesmall removed 0 clusters. Original ncluster 200, new ncluster 200.

MSM analysis and visualization

model = Model(dataTica)
model.plotTimescales(lags=list(range(1,1000,50)))
A Jupyter Widget
../../_images/cxcl12-conformational-analysis_23_1.png

Build Markov Model

model.markovModel(600, 8)
eqDist = model.eqDistribution()
print(eqDist)
2018-03-20 02:16:18,334 - htmd.model - INFO - 99.7% of the data was used
2018-03-20 02:16:18,373 - htmd.model - INFO - Number of trajectories that visited each macrostate:
2018-03-20 02:16:18,375 - htmd.model - INFO - [ 39 289  37   7   6  16  15 160]
../../_images/cxcl12-conformational-analysis_25_1.png
[ 0.01553383  0.0581622   0.03868523  0.05355839  0.0984875   0.1093136
  0.25694181  0.36931744]

We can now visualize representatives for each of the equilibrium species

model.numsamples=1
model.viewStates(protein=True)
Getting state Molecules:   0%|          | 0/8 [00:00<?, ?it/s]2018-03-20 02:16:27,708 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x33/9x33-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1977_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  12%|█▎        | 1/8 [00:01<00:09,  1.32s/it]2018-03-20 02:16:29,036 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x10/6x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7487_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  25%|██▌       | 2/8 [00:02<00:07,  1.24s/it]2018-03-20 02:16:30,182 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  38%|███▊      | 3/8 [00:03<00:06,  1.32s/it]2018-03-20 02:16:31,640 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,644 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,647 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,651 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,655 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,658 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,662 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,666 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,669 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,673 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,679 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,686 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:31,690 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  50%|█████     | 4/8 [00:06<00:06,  1.54s/it]2018-03-20 02:16:33,860 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,864 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,868 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,871 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,875 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,879 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,882 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,886 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,890 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,893 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,897 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,901 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,904 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,907 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:33,911 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  75%|███████▌  | 6/8 [00:09<00:03,  1.64s/it]2018-03-20 02:16:37,521 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:37,525 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:37,533 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:37,539 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:37,545 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules:  88%|████████▊ | 7/8 [00:11<00:01,  1.66s/it]2018-03-20 02:16:39,314 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x32/1x32-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8404_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:39,320 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x15/7x15-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9516_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:16:39,331 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
Getting state Molecules: 100%|██████████| 8/8 [00:13<00:00,  1.70s/it]
A Jupyter Widget
A Jupyter Widget

Statistics: What are the major differences between the states X and Y?

means = getStateStatistic(model, data, range(model.macronum))
plt.figure()
plt.bar(range(len(means[0])), means[7] - means[6])
idx = np.where(np.abs(means[7] - means[6]) > 0.6)[0]
data.map.ix[idx]
atomIndexes description type
22 [253, 255, 262, 264] Sine of angle of (SER 16 N A A) (SER 16 CA A A... dihedral
23 [253, 255, 262, 264] Cosine of angle of (SER 16 N A A) (SER 16 CA A... dihedral
28 [262, 264, 266, 279] Sine of angle of (SER 16 C A A) (HSD 17 N A A)... dihedral
55 [371, 373, 391, 393] Cosine of angle of (LYS 24 N A A) (LYS 24 CA A... dihedral
140 [723, 725, 727, 737] Sine of angle of (ASN 44 C A A) (ASN 45 N A A)... dihedral
../../_images/cxcl12-conformational-analysis_29_1.png
# we can visualize which residues are different between states
filtered = Molecule('./filtered/filtered.pdb')
filtered.view(sel='protein',style='NewCartoon',hold=True)
filtered.view(sel='resid 16 17 24 25 32 33 44 45',style='Licorice')
The installed widget Javascript is the wrong version.

Mapping back: Which trajectory originated the state X?

np.where(model.macro_ofmicro == 6)
(array([ 40,  87, 115]),)
_,rel = model.sampleStates(10, 10, statetype='micro')
print(rel)
[array([[ 175, 1223],
       [ 201,  119],
       [ 155,  404],
       [   0, 1344],
       [ 215,  354],
       [  16,   15],
       [ 189,  197],
       [ 175, 1192],
       [ 177, 1406],
       [ 262,   33]])]
print(model.data.simlist[232])
simid = 232
parent = None
input = []
trajectory = ['./filtered/9x9/9x9-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2283_9.filtered.xtc']
molfile = ./filtered/filtered.pdb
numframes = [2000]

Studying a defined reaction coordinate

Revising the literature related to CXCL12, we find a paper published by Andrea Bernini et al. (2014), where they describe the opening of a pocket in CXCL12 located between the 2nd and 3rd beta sheet (see figure). To try to capture this phenomenon in our simulations, we will project our trajectories along the 2nd and 3rd beta-sheet distance.

|openclose\_struc|

Figure extracted from Bernini et al., 2014, 1844(3):561-6. DOI:10.1016/j.bbapap.2013.12.012.

The first selection corresponds to beta-sheet 2 carbons alpha, the second one to beta-sheet 3 CA. We specify metric='contacts' to create contact maps instead of proper distances. This means: create an interatom matrix and with 1’s if the distance is below cutoff and 0’s otherwise.

metr = Metric(fsims)
metr.set(MetricDistance('resid 38 to 42 and noh', 'resid 22 to 28 and noh', metric='contacts'))
data3 = metr.project()
data3.fstep = 0.1
Projecting trajectories:   0%|          | 1/289 [00:00<02:09,  2.22it/s]2018-03-20 02:20:30,897 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x3/1x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2434_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:30,899 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x11/1x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0220_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:30,889 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x4/1x4-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4400_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:30,961 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x12/1x12-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5012_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  10%|█         | 30/289 [00:01<00:10, 24.47it/s]2018-03-20 02:20:31,494 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x16/1x16-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7668_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:31,634 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x32/1x32-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8404_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  13%|█▎        | 38/289 [00:01<00:12, 20.11it/s]2018-03-20 02:20:32,148 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x36/1x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9406_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:32,207 - htmd.molecule.readers - WARNING - No time information read from ./filtered/1x38/1x38-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0319_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  15%|█▌        | 44/289 [00:02<00:13, 18.70it/s]2018-03-20 02:20:32,354 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x3/2x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2726_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  18%|█▊        | 52/289 [00:02<00:11, 20.22it/s]2018-03-20 02:20:32,907 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x19/2x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0663_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:32,990 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x24/2x24-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7758_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:33,001 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x25/2x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7152_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  21%|██        | 60/289 [00:03<00:12, 19.04it/s]2018-03-20 02:20:33,485 - htmd.molecule.readers - WARNING - No time information read from ./filtered/2x35/2x35-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3807_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  23%|██▎       | 66/289 [00:03<00:12, 18.45it/s]2018-03-20 02:20:33,595 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x2/3x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3083_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  26%|██▌       | 74/289 [00:03<00:11, 19.30it/s]2018-03-20 02:20:34,020 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x5/3x5-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0952_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:34,117 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x8/3x8-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1271_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:34,166 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x11/3x11-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9275_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  27%|██▋       | 77/289 [00:04<00:11, 18.23it/s]2018-03-20 02:20:34,236 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x14/3x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5196_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  30%|███       | 88/289 [00:04<00:11, 18.25it/s]2018-03-20 02:20:34,848 - htmd.molecule.readers - WARNING - No time information read from ./filtered/3x25/3x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7475_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  37%|███▋      | 106/289 [00:05<00:09, 18.63it/s]2018-03-20 02:20:35,954 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x9/4x9-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8576_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  38%|███▊      | 110/289 [00:06<00:09, 18.32it/s]2018-03-20 02:20:35,968 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x13/4x13-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1867_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  40%|████      | 117/289 [00:06<00:09, 18.54it/s]2018-03-20 02:20:36,359 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x22/4x22-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4765_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  42%|████▏     | 121/289 [00:06<00:09, 18.44it/s]2018-03-20 02:20:36,653 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x31/4x31-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3619_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:36,694 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x29/4x29-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5193_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  46%|████▌     | 132/289 [00:07<00:08, 18.56it/s]2018-03-20 02:20:37,182 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x39/4x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5184_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:37,184 - htmd.molecule.readers - WARNING - No time information read from ./filtered/4x40/4x40-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3949_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:37,248 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x2/5x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5764_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:37,260 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x4/5x4-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2596_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  48%|████▊     | 140/289 [00:07<00:08, 18.60it/s]2018-03-20 02:20:37,598 - htmd.molecule.readers - WARNING - No time information read from ./filtered/5x10/5x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND2718_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  56%|█████▌    | 162/289 [00:08<00:06, 18.56it/s]2018-03-20 02:20:38,719 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x3/6x3-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8829_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  57%|█████▋    | 165/289 [00:08<00:06, 18.66it/s]2018-03-20 02:20:38,810 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x2/6x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8150_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:39,107 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x10/6x10-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7487_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  58%|█████▊    | 168/289 [00:09<00:06, 18.28it/s]2018-03-20 02:20:39,170 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x13/6x13-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0906_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  62%|██████▏   | 180/289 [00:09<00:05, 18.34it/s]2018-03-20 02:20:39,846 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x32/6x32-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6786_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  65%|██████▌   | 188/289 [00:10<00:05, 18.67it/s]2018-03-20 02:20:40,215 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x36/6x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND0862_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:40,306 - htmd.molecule.readers - WARNING - No time information read from ./filtered/6x39/6x39-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6616_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  69%|██████▊   | 198/289 [00:10<00:04, 18.63it/s]2018-03-20 02:20:40,793 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x15/7x15-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9516_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  70%|██████▉   | 201/289 [00:10<00:04, 18.35it/s]2018-03-20 02:20:40,937 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x21/7x21-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1683_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:40,957 - htmd.molecule.readers - WARNING - No time information read from ./filtered/7x19/7x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5246_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  76%|███████▋  | 221/289 [00:11<00:03, 18.65it/s]2018-03-20 02:20:41,968 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x2/8x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9548_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  78%|███████▊  | 224/289 [00:12<00:03, 18.34it/s]2018-03-20 02:20:42,198 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x12/8x12-GERARD_VERYLONG_CXCL12_confAna-0-1-RND8911_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:42,235 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x14/8x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND5878_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  81%|████████  | 234/289 [00:12<00:02, 18.52it/s]2018-03-20 02:20:42,721 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x25/8x25-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1273_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:42,778 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x27/8x27-GERARD_VERYLONG_CXCL12_confAna-0-1-RND6514_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  84%|████████▍ | 244/289 [00:13<00:02, 18.63it/s]2018-03-20 02:20:43,192 - htmd.molecule.readers - WARNING - No time information read from ./filtered/8x36/8x36-GERARD_VERYLONG_CXCL12_confAna-0-1-RND7283_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:43,375 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x6/9x6-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9895_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  89%|████████▊ | 256/289 [00:13<00:01, 18.62it/s]2018-03-20 02:20:43,992 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x24/9x24-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4916_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  91%|█████████ | 262/289 [00:14<00:01, 18.53it/s]2018-03-20 02:20:44,223 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x29/9x29-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3439_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  92%|█████████▏| 267/289 [00:14<00:01, 18.66it/s]2018-03-20 02:20:44,421 - htmd.molecule.readers - WARNING - No time information read from ./filtered/9x33/9x33-GERARD_VERYLONG_CXCL12_confAna-0-1-RND1977_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  93%|█████████▎| 270/289 [00:14<00:01, 18.44it/s]2018-03-20 02:20:44,665 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x2/10x2-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3128_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories:  99%|█████████▊| 285/289 [00:15<00:00, 18.58it/s]2018-03-20 02:20:45,314 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x14/10x14-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4610_9.filtered.xtc. Defaulting to 0.1ns framestep.
Projecting trajectories: 100%|██████████| 289/289 [00:15<00:00, 18.71it/s]
2018-03-20 02:20:45,655 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x19/10x19-GERARD_VERYLONG_CXCL12_confAna-0-1-RND3196_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:46,216 - htmd.molecule.readers - WARNING - No time information read from ./filtered/10x31/10x31-GERARD_VERYLONG_CXCL12_confAna-0-1-RND4437_9.filtered.xtc. Defaulting to 0.1ns framestep.
2018-03-20 02:20:46,590 - htmd.projections.metric - WARNING - Multiple framesteps [0.1, 0.10000000149] ns were read from the simulations. Taking the statistical mode: 0.10000000149011612ns. If it looks wrong, you can modify it by manually setting the MetricData.fstep property.

tICA projection

Dimensionality reduction along the slow process

tica3 = TICA(data3, 20)
dataTica3 = tica3.project(3)
A Jupyter Widget
A Jupyter Widget

Clustering

dataTica3.cluster(MiniBatchKMeans(n_clusters=200), mergesmall=5)
2018-03-20 02:29:10,507 - htmd.metricdata - INFO - Mergesmall removed 0 clusters. Original ncluster 200, new ncluster 200.

Plot timescales

model3 = Model(dataTica3)
model3.plotTimescales(lags=list(range(1,1000,50)))
A Jupyter Widget
../../_images/cxcl12-conformational-analysis_47_1.png

Build a Markov Model

We want to pick a lagtime where the timescales are converged (timescale is flat). 600 is the lagtime we want to use (600 frames is equivalent to 60ns). 4 is the number of macrostates.

model3.markovModel(600, 4)
eqDist = model3.eqDistribution(plot=True)
print(eqDist)
2018-03-20 02:29:38,610 - htmd.model - INFO - 100.0% of the data was used
2018-03-20 02:29:38,638 - htmd.model - INFO - Number of trajectories that visited each macrostate:
2018-03-20 02:29:38,640 - htmd.model - INFO - [  5   9  20 289]
../../_images/cxcl12-conformational-analysis_50_1.png
[ 0.02611681  0.06178354  0.10258197  0.80951768]

Visualize states

model3.viewStates(protein=True, numsamples=1)
Getting state Molecules: 100%|██████████| 4/4 [00:07<00:00,  1.83s/it]
A Jupyter Widget
A Jupyter Widget

Analyse Open Conformation

Did you see any macrostate where the pocket is open? What is the equilibrium population probability? Let’s try to find the trajectory that produced the state…

# Map back the trajectory/ies that originated the macro. Substitute 1 for the macro that showed the pocket opening.
# This function is giving you the microclusters that are inside a given macrocluster
np.where(model3.macro_ofmicro ==1)
(array([ 5, 17]),)
# substitute 48 for the micro number from the previous step
# This function gives you trajectory-frame pairs that visited a given micro
_, rel = model3.sampleStates(48, 5, statetype='micro')
print(rel)
[array([[ 159,  622],
       [ 203,  622],
       [  79, 1356],
       [ 123, 1653],
       [ 151, 1222]])]
print(model3.data.simlist[277])
simid = 277
parent = None
input = []
trajectory = ['./filtered/10x23/10x23-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9861_9.filtered.xtc']
molfile = ./filtered/filtered.pdb
numframes = [2000]

Calculate RMSD of the site of interest for a selected trajectory

simus = simlist(glob('./filtered/10x23/'), './filtered/filtered.pdb')
Creating simlist: 100%|██████████| 1/1 [00:00<00:00, 523.83it/s]
refmol = Molecule('./filtered/filtered.pdb')
metr = Metric(simus)
metr.set(MetricRmsd(refmol, 'resid 38 to 42 or resid 22 to 28 and noh', trajalnstr='protein'))
rmsd = metr.project()
Projecting trajectories: 100%|██████████| 1/1 [00:00<00:00,  1.46it/s]
2018-03-20 02:30:34,130 - htmd.projections.metric - INFO - Frame step 0.10000000149011612ns was read from the trajectories. If it looks wrong, redefine it by manually setting the MetricData.fstep property.

Do you see the pocket opening at 50ns?

plt.plot(rmsd.dat[0])
plt.xlabel('Simulation length (frames; 0.1ns)', fontsize=10)
plt.ylabel('RMSD (Angstroms)', fontsize=10)
plt.show()
../../_images/cxcl12-conformational-analysis_63_0.png

Visualize the trajectory from your browser

refmol.read('./filtered/10x23/10x23-GERARD_VERYLONG_CXCL12_confAna-0-1-RND9861_9.filtered.xtc')
refmol.align('protein')
refmol.view()
A Jupyter Widget

This concludes the conformational analysis tutorial