Dear all, I hope you all are doing well.
I've been trying to enumerate all Kekule structures, and apparently it should be done with ResonanceMolSupplier. In this email <https://sourceforge.net/p/rdkit/mailman/message/36034365/> apparently, this snippet works: from rdkit import Chem > from rdkit.Chem import ResonanceMolSupplier, ResonanceFlags mol = Chem.MolFromSmiles("c1ccccc1") suppl = ResonanceMolSupplier(mol, ResonanceFlags.KEKULE_ALL) for m in suppl: > print(Chem.MolToSmiles(m, kekuleSmiles=True)) [out] expected output > C1C=CC=CC=1 C1=CC=CC=C1 [out] rdkit.__version__ == '2020.03.6' > C1=CC=CC=C1 > C1=CC=CC=C1 > [out] rdkit.__version__ == '2022.03.5' > C1=CC=CC=C1 C1=CC=CC=C1 > But I have tried it on Win, RDKit '2022.03.5' and it doesn't work. Also, I tried with RDKit '2020.03.6', and it doesn't work for benzene or naphthalene. > from rdkit import Chem > from rdkit.Chem import ResonanceMolSupplier, ResonanceFlags > > mol = Chem.MolFromSmiles("C1=CC2=C(C=C1)C=CC=C2") # Naphthalene > > suppl = ResonanceMolSupplier(mol, ResonanceFlags.KEKULE_ALL) > for m in suppl: > print(Chem.MolToSmiles(m, kekuleSmiles=True)) > [out] rdkit.__version__ == '2020.03.6' > C1=CC2=C(C=C1)C=CC=C2 > C1=CC2=CC=CC=C2C=C1 > C1=CC=C2C=CC=CC2=C1 [out] rdkit.__version__ == '2022.03.5' > C1=CC2=C(C=C1)C=CC=C2 > C1=CC2=C(C=C1)C=CC=C2 > C1=CC2=C(C=C1)C=CC=C2 Please let me know if you have any workaround to enumerate Kekule structures. All the best, Eduardo
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss