rmcgibbo/mdtraj — pull request #154 by kyleabeauchamp (2013-08-15 05:43:45+00:00)
Title: Pandas in dihedral.py

I don't necessarily want to merge this, I just wanted to test this idea to see how convenient it would be in practice. I don't necessarily think having "phi" as a DataFrame adds any value.

I *do* think having the simpler code for atom lookup does have value though.

Here is some example code:

```
import mdtraj
import mdtraj.geometry
import bpti

traj = bpti.load_traj()

lookup = mdtraj.geometry.dihedral._construct_atom_dict(traj.top.to_dataframe()[0])

atom_tuples = mdtraj.geometry.dihedral.atom_sequence_finder(traj, ["C", "CA", "N"])

phi = mdtraj.geometry.dihedral.compute_phi(traj)
psi = mdtraj.geometry.dihedral.compute_psi(traj)
chi = mdtraj.geometry.dihedral.compute_chi(traj)
omega = mdtraj.geometry.dihedral.compute_omega(traj)
```