Spaces:
Sleeping
Sleeping
Update src/bin/binding_affinity_estimator.py
Browse files
src/bin/binding_affinity_estimator.py
CHANGED
@@ -150,11 +150,14 @@ def calculate_vector_multiplications(skempi_vectors_df):
|
|
150 |
vec2 = list(skempi_vectors_df[skempi_vectors_df['PDB_ID'] == row['Protein2']]['Vector'])[0]
|
151 |
multiplied_vec = np.multiply(vec1, vec2)
|
152 |
|
153 |
-
|
154 |
'Protein1': row['Protein1'],
|
155 |
'Protein2': row['Protein2'],
|
156 |
'Vector': multiplied_vec
|
157 |
-
}
|
|
|
|
|
|
|
158 |
|
159 |
return multiplied_vectors
|
160 |
|
|
|
150 |
vec2 = list(skempi_vectors_df[skempi_vectors_df['PDB_ID'] == row['Protein2']]['Vector'])[0]
|
151 |
multiplied_vec = np.multiply(vec1, vec2)
|
152 |
|
153 |
+
new_row = pd.DataFrame([{
|
154 |
'Protein1': row['Protein1'],
|
155 |
'Protein2': row['Protein2'],
|
156 |
'Vector': multiplied_vec
|
157 |
+
}])
|
158 |
+
|
159 |
+
# Concatenate the new row with the existing DataFrame
|
160 |
+
multiplied_vectors = pd.concat([multiplied_vectors, new_row], ignore_index=True)
|
161 |
|
162 |
return multiplied_vectors
|
163 |
|