You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! When I try to draw RDKitBits for a molecule, I get the error Can't kekulize mol. This is because some parts of the molecule have a non-Kekulized structure.
Example of code for reproduce
from rdkit import Chem
from rdkit.Chem import Draw
mol = Chem.MolFromSmiles('CCOC(C1NC2C(=C(C=CC=2)OC)C=1)=O')
bi = {}
fp = Chem.RDKFingerprint(mol, bitInfo=bi)
tpls = [(mol, x, bi) for x in fp.GetOnBits()]
bits = fp.GetOnBits()
Draw.DrawRDKitBits(tpls, molsPerRow=4,legends=[str(x) for x in bits])
Inside the Draw.DrawRDKitBits, the Draw.DrawRDKitEnvs method is called.
I fix it locally by converting submols to smarts and create new mol from that smarts but I think it should be fixed in other way inside of Draw module.
Hello! When I try to draw RDKitBits for a molecule, I get the error
Can't kekulize mol
. This is because some parts of the molecule have a non-Kekulized structure.Example of code for reproduce
Inside the
Draw.DrawRDKitBits
, theDraw.DrawRDKitEnvs
method is called.I fix it locally by converting submols to smarts and create new mol from that smarts but I think it should be fixed in other way inside of Draw module.
Example of fixed
Draw.DrawRDKitEnvs
Not sure if that right solution but its fix my case.
That place in code: https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Draw/__init__.py#L886
The text was updated successfully, but these errors were encountered: