From 0ff2881d7ccd7cc914380dbd9f3b4d25c33496b6 Mon Sep 17 00:00:00 2001 From: Benjamin Ries Date: Wed, 27 Mar 2024 10:25:06 +0100 Subject: [PATCH] Update element_change.py fix for issue #37 --- src/kartograf/filters/element_change.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kartograf/filters/element_change.py b/src/kartograf/filters/element_change.py index f592331..265c9cd 100644 --- a/src/kartograf/filters/element_change.py +++ b/src/kartograf/filters/element_change.py @@ -17,8 +17,8 @@ def filter_atoms_h_only_h_mapped( atomA = molA.GetAtomWithIdx(atomA_idx) atomB = molB.GetAtomWithIdx(atomB_idx) - if (atomA.GetAtomicNum() == atomB.GetAtomicNum() == 1) or ( - atomA.GetAtomicNum() == atomB.GetAtomicNum() != 1 + if (atomA.GetAtomicNum() == 1 and atomB.GetAtomicNum() == 1) or ( + atomA.GetAtomicNum() != 1 and atomB.GetAtomicNum() != 1 ): filtered_mapping[atomA_idx] = atomB_idx logger.debug(