Skip to content
Snippets Groups Projects
Commit f3c20500 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

compare-structures: improve error message when structure dumping fails

parent e9baecb7
No related branches found
No related tags found
No related merge requests found
......@@ -519,8 +519,33 @@ def _Process(model, reference, args):
out["patch_dockq"] = scorer.patch_dockq
if args.dump_structures:
io.SavePDB(scorer.model, model.GetName() + args.dump_suffix)
io.SavePDB(scorer.target, reference.GetName() + args.dump_suffix)
try:
io.SavePDB(scorer.model, model.GetName() + args.dump_suffix)
except Exception as e:
if "single-letter" in str(e) and args.model_biounit is not None:
raise RuntimeError("Failed to dump processed model. PDB "
"format only supports single character "
"chain names. This is likely the result of "
"chain renaming when constructing a user "
"specified biounit. Dumping structures "
"fails in this case.")
else:
raise
try:
io.SavePDB(scorer.target, reference.GetName() + args.dump_suffix)
except Exception as e:
if "single-letter" in str(e) and args.reference_biounit is not None:
raise RuntimeError("Failed to dump processed reference. PDB "
"format only supports single character "
"chain names. This is likely the result of "
"chain renaming when constructing a user "
"specified biounit. Dumping structures "
"fails in this case.")
else:
raise
return out
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment