Skip to content

Commit

Permalink
fixing bug in cleaning tools and filename retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Jgmedina95 committed Jan 31, 2024
1 parent 2f0224d commit a710acc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mdagent/tools/base_tools/preprocess_tools/clean_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,17 @@ def _run(self, **input_args) -> str:
file_description = "Cleaned File: "
CleaningTools()
try:
pdbfile = self.path_registry.get_mapped_path(pdbfile_id)
if "/" in pdbfile:
pdbfile = pdbfile.split("/")[-1]

name = pdbfile.split("_")[0]
end = pdbfile.split(".")[1]
pdbfile_path = self.path_registry.get_mapped_path(pdbfile_id)
if "/" in pdbfile_path:
pdbfile = pdbfile_path.split("/")[-1]
else:
pdbfile = pdbfile_path
name, end = pdbfile.split(".")

except Exception as e:
print(f"error retrieving from path_registry, trying to read file {e}")
return "File not found in path registry. "
fixer = PDBFixer(filename=pdbfile)
fixer = PDBFixer(filename=pdbfile_path)
try:
fixer.findMissingResidues()
except Exception:
Expand Down

0 comments on commit a710acc

Please sign in to comment.