Spaces:
Sleeping
Sleeping
fix inference_app.py
Browse files- inference_app.py +4 -2
inference_app.py
CHANGED
@@ -390,7 +390,8 @@ def update_pdb_coordinates_from_tensor(input_filename, output_filename, coordina
|
|
390 |
atom.set_parent(original_parent)
|
391 |
# atom.set_name(original_name)
|
392 |
# atom.set_leve
|
393 |
-
|
|
|
394 |
# Save the updated structure to a new PDB file
|
395 |
io = PDBIO()
|
396 |
io.set_structure(structure)
|
@@ -408,6 +409,7 @@ def merge_pdb_files(file1, file2, output_file):
|
|
408 |
- file2 (str): Path to the second PDB file (e.g., ligand).
|
409 |
- output_file (str): Path to the output file where the merged structure will be saved.
|
410 |
"""
|
|
|
411 |
with open(output_file, 'w') as outfile:
|
412 |
# Copy the contents of the first file
|
413 |
with open(file1, 'r') as f1:
|
@@ -418,7 +420,7 @@ def merge_pdb_files(file1, file2, output_file):
|
|
418 |
outfile.write(f2.read())
|
419 |
|
420 |
print(f"Merged PDB saved to {output_file}")
|
421 |
-
|
422 |
class MPNNLayer(MessagePassing):
|
423 |
def __init__(self, emb_dim=64, edge_dim=4, aggr='add'):
|
424 |
r"""Message Passing Neural Network Layer
|
|
|
390 |
atom.set_parent(original_parent)
|
391 |
# atom.set_name(original_name)
|
392 |
# atom.set_leve
|
393 |
+
|
394 |
+
output_filename = "./" + output_filename
|
395 |
# Save the updated structure to a new PDB file
|
396 |
io = PDBIO()
|
397 |
io.set_structure(structure)
|
|
|
409 |
- file2 (str): Path to the second PDB file (e.g., ligand).
|
410 |
- output_file (str): Path to the output file where the merged structure will be saved.
|
411 |
"""
|
412 |
+
output_file = "./" + output_file
|
413 |
with open(output_file, 'w') as outfile:
|
414 |
# Copy the contents of the first file
|
415 |
with open(file1, 'r') as f1:
|
|
|
420 |
outfile.write(f2.read())
|
421 |
|
422 |
print(f"Merged PDB saved to {output_file}")
|
423 |
+
return output_file
|
424 |
class MPNNLayer(MessagePassing):
|
425 |
def __init__(self, emb_dim=64, edge_dim=4, aggr='add'):
|
426 |
r"""Message Passing Neural Network Layer
|