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

Improve error handling in compare-structures

CAD score computation requires residue numbers in model and reference
to match. This raises an error in the Scorer object otherwise.
Catch this early on and raise an error specific to compare-structures
action with instructions on how to get rid of it.
parent a4e9d9a7
No related branches found
No related tags found
No related merge requests found
......@@ -654,6 +654,11 @@ def _Main():
args = _ParseArgs()
try:
compute_cad = args.cad_score or args.local_cad_score
if compute_cad and not args.residue_number_alignment:
raise RuntimeError("Only support CAD score when residue numbers in "
"model and reference match. Use -rna flag if "
"this is the case.")
reference = _LoadStructure(args.reference,
sformat=args.reference_format,
bu_idx=args.reference_biounit,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment