Calculating NMR observables with mdtraj.nmr()ΒΆ

nmr_evaluated

MDTraj provides convenience functions for predicting various NMR observables such as chemical shifts. To do this, we provide wrapper functions for the SPARTA+, PPM, and ShiftX2 prediction algorithms.

In [1]:
%pylab inline
import mdtraj as md
Populating the interactive namespace from numpy and matplotlib

Let's load a simple trajectory containing three identical frames of the villin headpiece protein.

In [2]:
trj = md.load("1vii_3frames.pdb")

Now, let's calculate the chemical shifts with the program SPARTA+.

In [3]:
shifts = md.nmr.chemical_shifts_spartaplus(trj)
shifts[0:10]
/home/travis/miniconda/envs/2.7/lib/python2.7/site-packages/pandas/core/config.py:570: DeprecationWarning: height has been deprecated.

  warnings.warn(d.msg, DeprecationWarning)
/home/travis/miniconda/envs/2.7/lib/python2.7/site-packages/pandas/core/config.py:570: DeprecationWarning: height has been deprecated.

  warnings.warn(d.msg, DeprecationWarning)

Out[3]:
frame 0 1 2
resSeq name
41 C 176.357 176.357 176.357
CA 55.342 55.342 55.342
CB 32.633 32.633 32.633
HA 4.529 4.529 4.529
42 C 176.712 176.712 176.712
CA 55.349 55.349 55.349
CB 41.825 41.825 41.825
H 8.738 8.738 8.738
HA 4.518 4.518 4.518
N 126.258 126.258 126.258

The data is returned as a Pandas Dataframe object. The rows correspond to the residue numbers and atom names, while each column corresponds to a different frame in your trajectory. Note that here our input had completely identical conformations in each frame, so we see identical values along each row.

In [4]:
 

(nmr.ipynb; nmr_evaluated.ipynb; nmr.py)

Versions