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]
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-3-622189b941f2> in <module>()
----> 1 shifts = md.nmr.chemical_shifts_spartaplus(trj)
      2 shifts[0:10]

/Users/rmcgibbo/miniconda/envs/2.7.9/lib/python2.7/site-packages/mdtraj-1.3.0-py2.7-macosx-10.5-x86_64.egg/mdtraj/nmr/shift_wrappers.pyc in chemical_shifts_spartaplus(trj, rename_HN)
    275     binary = find_executable(SPARTA_PLUS)
    276     if binary is None:
--> 277         raise OSError('External command not found. Looked for %s in PATH. `chemical_shifts_spartaplus` requires the external program SPARTA+, available at http://spin.niddk.nih.gov/bax/software/SPARTA+/' % ', '.join(SPARTA_PLUS))
    278 
    279     names = ["resSeq", "resName", "name", "SS_SHIFT", "SHIFT", "RC_SHIFT", "HM_SHIFT", "EF_SHIFT", "SIGMA"]

OSError: External command not found. Looked for sparta+, SPARTA+, SPARTA+.linux in PATH. `chemical_shifts_spartaplus` requires the external program SPARTA+, available at http://spin.niddk.nih.gov/bax/software/SPARTA+/

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