rmcgibbo/mdtraj — pull request #402 by kyleabeauchamp (2014-03-24 00:06:34+00:00)
Title: [WIP] Chemical Shift Wrappers

So I made a rough attempt at streamlining the calculation of chemical shifts via MDTraj. There's still some work for me to do on futher standardizing the output style, checking for atom nomenclature changes, etc.

Here's example driver script:

```
import pandas as pd
import mdtraj as md

trj = md.load("./trj.pdb")[0:3]

d0 = md.nmr.chemical_shifts_shiftx2(trj)
d1 = md.nmr.chemical_shifts_ppm(trj)
d2 = md.nmr.chemical_shifts_spartaplus(trj)

```

```
In [13]: d0[::150]
Out[13]:
frame 0 1 2
resSeq name
41 C 175.1211 175.1211 175.1211
53 CB 34.1491 34.1491 34.1491
65 CD 29.1723 29.1723 29.1723
75 HB3 1.5067 1.5067 1.5067

[4 rows x 3 columns]

In [14]: d1[::150]
Out[14]:
0 1 2
resSeq name
42 CA 55.044 55.044 55.044
72 CA 59.754 59.754 59.754

[2 rows x 3 columns]

In [15]: d2[::150]
Out[15]:
frame 0 1 2
resSeq name
41 C 176.357 176.357 176.357
66 HN 8.003 8.003 8.003

[2 rows x 3 columns]
```