-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patholdDetect.txt
28 lines (24 loc) · 1.01 KB
/
oldDetect.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
short = {}
np.set_printoptions(suppress=True)
for pair in matrices:
rows = pca(matrices[pair])
cols = pca(np.transpose(matrices[pair]))
comparisons[pair] = np.asarray(comparisons[pair])
comparisons[pair] = comparisons[pair][rows]
T = np.transpose(comparisons[pair])
comparisons[pair] = np.transpose(T[cols])
for clus in comparisons[pair]:
atom2 = []
r = []
for at in clus:
atom2.append(at.atom2)
r.append(at.dist)
atom1 = clus[0].atom1
res1 = clus[0].res1
res2 = clus[0].res2
if pair not in short:
short[pair] = []
else:
short[pair].append(Comparison(atom1=atom1, atom2=atom2, res1=res1, res2=res2, r=r))
for cluster in short[pair]:
short[pair] = matchEach(r=cluster.dist, res1=cluster.res1, atom1=cluster.atom1, res2 = cluster.res2, atom2 = cluster.atom2)