Skip to content

Instantly share code, notes, and snippets.

View schwancr's full-sized avatar

Christian Schwantes schwancr

  • Capital One
  • Richmond, VA
View GitHub Profile
@schwancr
schwancr / trans.py
Created July 8, 2014 19:43
translation for theobald rmsd code from original syntax/indexing to mdtraj's
import re
with open('toadd.txt') as fh:
lines = fh.readlines()
def trans(m):
s = m.group(0)
return 'k%d%d%s' % tuple([int(s[i]) - 1 for i in [1, 2]] + [s[-1]])
def trans2(m):
@schwancr
schwancr / testlprmsd.py
Created July 8, 2014 06:50
test for lprmsd + mdtraj from msmbuilder
from msmbuilder.metrics import LPRMSD
import mdtraj as md
import numpy as np
import IPython
pdbstring1="""
ATOM 11 CB ALA 2 0.000 0.000 0.000 1.00 0.00
ATOM 12 H1 ALA 2 0.000 10.000 0.000 1.00 0.00
ATOM 13 H2 ALA 2 0.000 20.000 0.000 1.00 0.00
"""