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