From b7a2c22ce450346e33972c1a57b0b234e677ec7f Mon Sep 17 00:00:00 2001 From: Luke2Sky Date: Fri, 19 Jul 2024 09:46:45 -0300 Subject: [PATCH] Fixes problem that NoneTypes are TypeErrors not RuntimeErrors when using mol2's with disorder. --- .../multi_component_hydrogen_bond_propensity_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py b/scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py index c49fffe..cf3f6d3 100644 --- a/scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py +++ b/scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py @@ -362,7 +362,7 @@ def main(structure, work_directory, failure_directory, library, csdrefcode, forc tdata = get_mc_scores(propensities, crystal.identifier) json.dump(tdata, file) mc_dictionary[coformer_name] = get_mc_scores(propensities, crystal.identifier) - except RuntimeError as error_message: + except Exception as error_message: print("Propensity calculation failure for %s!" % coformer_name) error_string = f"{coformer_name}: {error_message}" warnings.warn(error_string)