This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |