~dhogan/rnap

882a608e987b6eb6914d5264ebb0d12fe5f765a5 — Daniel Hogan 1 year, 2 months ago e889dcf master
add literature distance calculations
1 files changed, 71 insertions(+), 0 deletions(-)

A distance.py
A distance.py => distance.py +71 -0
@@ 0,0 1,71 @@
#!/usr/bin/env python3

import numpy as np


def distance(a, b):
    return np.sqrt(np.dot(a - b, a - b))


ljzi = np.array([-63.246, -182.743, -106.358])
ljzj = np.array([-20.603, -177.020, -66.409])
alfi = np.array([210.831, 213.231, 148.138])
alfj = np.array([163.287, 209.794, 127.712])
asxi = np.array([210.254, 211.884, 145.572])
asxj = np.array([160.219, 209.173, 126.987])
bjsi = np.array([209.628, 213.749, 147.005])
bjsj = np.array([162.470, 208.401, 126.024])
meyi = np.array([-19.817, 177.125, 64.744])
meyj = np.array([-59.203, 175.864, 104.502])
rh3c = np.array([130.044, 97.612, 110.283])
rh3d = np.array([179.651, 118.064, 109.321])
ri7c = np.array([122.720, 199.770, 186.323])
ri7d = np.array([176.432, 188.735, 185.640])
ri9c = np.array([138.304, 100.021, 110.569])
ri9d = np.array([184.561, 128.391, 109.152])
ripc = np.array([137.293, 101.666, 109.360])
ripd = np.array([186.668, 127.677, 111.345])
c6ui = np.array([208.912, 210.477, 146.337])
c6uj = np.array([160.517, 205.997, 127.926])
yg2i = np.array([30.570, -79.336, -106.007])
yg2j = np.array([73.131, -73.300, -65.750])
ylni = np.array([-49.036, 142.106, 228.391])
ylnj = np.array([-98.463, 131.263, 244.106])


print(
    f"\tDarst (2013)          & holoenzyme                & 4LJZ & {distance(ljzi, ljzj):.2f}"
)
print(
    f"\tMurakami (2013)       & holoenzyme                & 4YG2 & {distance(yg2i, yg2j):.2f}"
)
print(
    f"\tEbright (2014)        & holoenzyme                & 4MEY & {distance(meyi, meyj):.2f}"
)
print(
    f"\tLandick, Darst (2018) & elongating                & 6ALF & {distance(alfi, alfj):.2f}"
)
print(
    f"\t                      & hairpin pause             & 6ASX & {distance(asxi, asxj):.2f}"
)
print(
    f"\t                      & non-hairpin pause         & 6BJS & {distance(bjsi, bjsj):.2f}"
)
print(
    f"\tLandick, Darst (2018) & nusG, ops pause           & 6C6U & {distance(c6ui, c6uj):.2f}"
)
print(
    f"\tWeixlbaumer (2019)    & elongating, awaiting CTP  & 6RH3 & {distance(rh3c, rh3d):.2f}"
)
print(
    f"\t                      & elongating, greB bound    & 6RI7 & {distance(ri7c, ri7d):.2f}"
)
print(
    f"\t                      & backtracked, non-swiveled & 6RI9 & {distance(ri9c, ri9d):.2f}"
)
print(
    f"\t                      & backtracked, swiveled     & 6RIP & {distance(ripc, ripd):.2f}"
)
print(
    f"\tSteitz (2015)         & ITC                       & 4YLN & {distance(ylni, ylnj):.2f}"
)