Spaces:
Sleeping
Sleeping
fix inference_app.py
Browse files- inference_app.py +5 -3
inference_app.py
CHANGED
@@ -897,10 +897,12 @@ def predict (input_seq_1, input_msa_1, input_protein_1, input_seq_2,input_msa_2,
|
|
897 |
mat = mat.to(device)
|
898 |
vect = vect.to(device)
|
899 |
ligand1 = torch.tensor(extract_coordinates_from_pdb(input_protein_1),dtype=torch.float).to(device)
|
|
|
900 |
transformed_ligand = torch.matmul(ligand1, mat) + vect
|
901 |
-
|
902 |
-
|
903 |
-
|
|
|
904 |
# return an output pdb file with the protein and two chains A and B.
|
905 |
# also return a JSON with any metrics you want to report
|
906 |
metrics = {"mean_plddt": 80, "binding_affinity": 2}
|
|
|
897 |
mat = mat.to(device)
|
898 |
vect = vect.to(device)
|
899 |
ligand1 = torch.tensor(extract_coordinates_from_pdb(input_protein_1),dtype=torch.float).to(device)
|
900 |
+
receptor1 = torch.tensor(extract_coordinates_from_pdb(input_protein_2),dtype=torch.float).to(device)
|
901 |
transformed_ligand = torch.matmul(ligand1, mat) + vect
|
902 |
+
transformed_receptor = torch.matmul(receptor1, mat) + vect
|
903 |
+
file1 = update_pdb_coordinates_from_tensor(input_protein_1, "holo_ligand.pdb", transformed_ligand)
|
904 |
+
file2 = update_pdb_coordinates_from_tensor(input_protein_2, "holo_receptor.pdb", transformed_receptor)
|
905 |
+
out_pdb = merge_pdb_files(file1,file2,"output.pdb")
|
906 |
# return an output pdb file with the protein and two chains A and B.
|
907 |
# also return a JSON with any metrics you want to report
|
908 |
metrics = {"mean_plddt": 80, "binding_affinity": 2}
|