Hi, everyone,? ??I want to draw two molecules in a svg file with rdMolDraw2D.
When I executed the following code, the jupyter cracked without any error or
warning.```drawer = rdMolDraw2D.MolDraw2DSVG(400,400)
i=0
for mol in mols:
? if mol.HasSubstructMatch(smarts):
? ? rdDepictor.Compute2DCoords(mol)?? ? #if i == 1:? ? # ?continue
? ? drawer.DrawMolecule(mol,highlightAtoms=mol.GetSubstructMatch(smarts))
? ? i+=1
? ? if i > 1:
? ? ? break
drawer.FinishDrawing()
svg = drawer.GetDrawingText().replace('svg:','')
SVG(svg)```
It seems that we cannot directly draw two molecules with the same drawer? So
how can I draw as I wanted?
By the way, I've no idea why it cracked. From the experiment of the commented
code, I can conclude it was caused by the drawer. So is it possible to fix the
bug, adding error or warning instead of "KernelRestarter: restarting kernel" in
console.
Hongbin Yang?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss