Skip to content

Commit

Permalink
Merge pull request #2647 from donerancl/resonance_structure_bug
Browse files Browse the repository at this point in the history
Update resonance structure generation function to skip CuttingLabel correctly
  • Loading branch information
JacksonBurns committed Apr 18, 2024
2 parents 50df700 + d1c38d3 commit a027e42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rmgpy/molecule/resonance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a027e42

Please sign in to comment.