Skip to content

Instantly share code, notes, and snippets.

@kyleabeauchamp
Created August 22, 2013 21:00
Show Gist options
  • Save kyleabeauchamp/6312718 to your computer and use it in GitHub Desktop.
Save kyleabeauchamp/6312718 to your computer and use it in GitHub Desktop.
Compute Dihedrals
import mdtraj, mdtraj.geometry
import pandas as pd
traj = mdtraj.load("./traj.xtc", top="native.pdb")
atom_names = ["H", "N", "CA", "HA"]
resid, atom_indices = mdtraj.geometry.dihedral.atom_sequence_finder(traj, atom_names)
dih = mdtraj.geometry.compute_dihedrals(traj, atom_indices)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment