From eb0eab9e9b0d96b01ad82dde06806d83cb8cbce8 Mon Sep 17 00:00:00 2001 From: Bjarne Kreitz Date: Mon, 25 Mar 2024 14:15:53 -0400 Subject: [PATCH] include N --- rmgpy/molecule/pathfinder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rmgpy/molecule/pathfinder.py b/rmgpy/molecule/pathfinder.py index ebe4acb10f..26a0c78414 100644 --- a/rmgpy/molecule/pathfinder.py +++ b/rmgpy/molecule/pathfinder.py @@ -496,9 +496,9 @@ def find_adsorbate_delocalization_paths(atom1): path = [] if atom1.is_surface_site(): for atom2, bond12 in atom1.edges.items(): - if atom2.is_carbon(): + if atom2.is_carbon() or atom2.is_nitrogen(): for atom3, bond23 in atom2.edges.items(): - if atom3.is_carbon(): + if atom3.is_carbon() or atom3.is_nitrogen(): for atom4, bond34 in atom3.edges.items(): if atom4.is_surface_site(): path.append([atom1, atom2, atom3, atom4, bond12, bond23, bond34]) @@ -521,11 +521,11 @@ def find_adsorbate_conjugate_delocalization_paths(atom1): path = [] if atom1.is_surface_site(): for atom2, bond12 in atom1.edges.items(): - if atom2.is_carbon(): + if atom2.is_carbon() or atom2.is_nitrogen(): for atom3, bond23 in atom2.edges.items(): - if atom3.is_carbon(): + if atom3.is_carbon() or atom3.is_nitrogen(): for atom4, bond34 in atom3.edges.items(): - if atom2 is not atom4 and atom4.is_carbon(): + if atom2 is not atom4 and (atom4.is_carbon() or atom4.is_nitrogen()): for atom5, bond45 in atom4.edges.items(): if atom5.is_surface_site(): path.append([atom1, atom2, atom3, atom4, atom5, bond12, bond23, bond34, bond45])