From b7cce4f80d50e948d41fcafab4832e9c7d2dd64b Mon Sep 17 00:00:00 2001 From: Bjarne Kreitz Date: Mon, 23 Sep 2024 16:41:23 -0400 Subject: [PATCH] check for adsorbates in resonance --- rmgpy/molecule/resonance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rmgpy/molecule/resonance.py b/rmgpy/molecule/resonance.py index b207568e71..c898b7b1c1 100644 --- a/rmgpy/molecule/resonance.py +++ b/rmgpy/molecule/resonance.py @@ -96,9 +96,9 @@ def populate_resonance_algorithms(features=None): method_list.append(generate_allyl_delocalization_resonance_structures) if features['is_cyclic']: method_list.append(generate_aryne_resonance_structures) - if features['hasNitrogenVal5']: + if features['hasNitrogenVal5'] and not features['is_adsorbate']: method_list.append(generate_N5dc_radical_resonance_structures) - if features['hasLonePairs']: + if features['hasLonePairs'] and not features['is_adsorbate']: method_list.append(generate_adj_lone_pair_radical_resonance_structures) method_list.append(generate_adj_lone_pair_multiple_bond_resonance_structures) method_list.append(generate_adj_lone_pair_radical_multiple_bond_resonance_structures) @@ -130,6 +130,7 @@ def analyze_molecule(mol, save_order=False): 'is_aryl_radical': False, 'hasNitrogenVal5': False, 'hasLonePairs': False, + 'is_adsorbate':mol.contains_surface_site(), } if features['is_cyclic']: