Spaces:
Sleeping
Sleeping
Reveres ZymCTRl number coordinates
Browse filesLike it was does not match with how we read the sequnece.
hexviz/🧬Attention_Visualization.py
CHANGED
@@ -154,10 +154,15 @@ if selected_model.name == ModelType.ZymCTRL:
|
|
154 |
|
155 |
# Normalize the reverse vector
|
156 |
reverse_vector_normalized = np.array(reverse_vector) / np.linalg.norm(reverse_vector)
|
157 |
-
coordinates
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
161 |
EC_tag = [
|
162 |
ECNumber(number=num, coordinate=coord, color=color, radius=radius)
|
163 |
for num, coord, color in zip(EC_numbers, coordinates, colors)
|
|
|
154 |
|
155 |
# Normalize the reverse vector
|
156 |
reverse_vector_normalized = np.array(reverse_vector) / np.linalg.norm(reverse_vector)
|
157 |
+
# Reveres coordinates to have the first EC number be furthers from the start of the
|
158 |
+
# protein like it is in the sequence with the EC serial number next to the sequence
|
159 |
+
# and the EC main class at the the very start, further from the sequence.
|
160 |
+
coordinates = reversed(
|
161 |
+
[
|
162 |
+
[res_1[j] + i * 2 * radius * reverse_vector_normalized[j] for j in range(3)]
|
163 |
+
for i in range(4)
|
164 |
+
]
|
165 |
+
)
|
166 |
EC_tag = [
|
167 |
ECNumber(number=num, coordinate=coord, color=color, radius=radius)
|
168 |
for num, coord, color in zip(EC_numbers, coordinates, colors)
|