Spaces:
Sleeping
Sleeping
Remove unused attention pair values
Browse files
hexviz/attention.py
CHANGED
@@ -227,9 +227,7 @@ def get_attention_pairs(
|
|
227 |
except KeyError:
|
228 |
continue
|
229 |
|
230 |
-
attention_pairs.append(
|
231 |
-
(attn_value, coord_1, coord_2, chain.id, res_1, res_2)
|
232 |
-
)
|
233 |
residue_attention[res_1] = residue_attention.get(res_1, 0) + attn_value
|
234 |
residue_attention[res_2] = residue_attention.get(res_2, 0) + attn_value
|
235 |
|
|
|
227 |
except KeyError:
|
228 |
continue
|
229 |
|
230 |
+
attention_pairs.append((attn_value, coord_1, coord_2))
|
|
|
|
|
231 |
residue_attention[res_1] = residue_attention.get(res_1, 0) + attn_value
|
232 |
residue_attention[res_2] = residue_attention.get(res_2, 0) + attn_value
|
233 |
|
hexviz/🧬Attention_Visualization.py
CHANGED
@@ -159,7 +159,7 @@ def get_3dview(pdb):
|
|
159 |
else:
|
160 |
xyzview.zoomTo()
|
161 |
|
162 |
-
for att_weight, first, second
|
163 |
stmol.add_cylinder(
|
164 |
xyzview,
|
165 |
start=first,
|
|
|
159 |
else:
|
160 |
xyzview.zoomTo()
|
161 |
|
162 |
+
for att_weight, first, second in attention_pairs:
|
163 |
stmol.add_cylinder(
|
164 |
xyzview,
|
165 |
start=first,
|