From d1c38d3ed8c9b2d4dadc3d1ce22c1e82017e652b Mon Sep 17 00:00:00 2001 From: donerancl Date: Thu, 4 Apr 2024 12:19:34 -0400 Subject: [PATCH] fix check for CuttingLabel in generate_kekule_structure (squashed) --- rmgpy/molecule/resonance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rmgpy/molecule/resonance.py b/rmgpy/molecule/resonance.py index 89b0ab3d78..b207568e71 100644 --- a/rmgpy/molecule/resonance.py +++ b/rmgpy/molecule/resonance.py @@ -62,6 +62,7 @@ from rmgpy.molecule.graph import Vertex from rmgpy.molecule.kekulize import kekulize from rmgpy.molecule.molecule import Atom, Bond, Molecule +from rmgpy.molecule.fragment import CuttingLabel def populate_resonance_algorithms(features=None): @@ -827,7 +828,7 @@ def generate_kekule_structure(mol): cython.declare(atom=Vertex, molecule=Graph) for atom in mol.atoms: - if not isinstance(atom, Atom): + if isinstance(atom,CuttingLabel): continue if atom.atomtype.label == 'Cb' or atom.atomtype.label == 'Cbf': break