(mol, molSize=(300, 300), kekulize=True, drawer=None, font_size=0.8, **kwargs)
return SVG(svg.replace('svg:', ''))
Generates a SVG from mol structure.
    
    Inspired by: http://rdkit.blogspot.ch/2016/02/morgan-fingerprint-bit-statistics.html
    
    Parameters
    ----------
    mol : rdkit.Chem.rdchem.Mol
    molSize : tuple
    kekulize : bool 
    drawer : funct
        Specify which drawing function to use (default: rdMolDraw2D.MolDraw2DSVG)
    font_size : float
        Atom font size

    Returns
    -------
    IPython.display.SVG
Generates a SVG from mol structure.
    
    Inspired by: http://rdkit.blogspot.ch/2016/02/morgan-fingerprint-bit-statistics.html
    
    Parameters
    ----------
    mol : rdkit.Chem.rdchem.Mol
    molSize : tuple
    kekulize : bool 
    drawer : funct
        Specify which drawing function to use (default: rdMolDraw2D.MolDraw2DSVG)
    font_size : float
        Atom font size
Generates a SVG from mol structure . Inspired by : http : // rdkit . blogspot . ch / 2016 / 02 / morgan - fingerprint - bit - statistics . html Parameters ---------- mol : rdkit . Chem . rdchem . Mol molSize : tuple kekulize : bool drawer : funct Specify which drawing function to use ( default : rdMolDraw2D . MolDraw2DSVG ) font_size : float Atom font size
def mol_to_svg(mol, molSize=(300, 300), kekulize=True, drawer=None, font_size=0.8, **kwargs):
    """Generates a SVG from mol structure.
    
    Inspired by: http://rdkit.blogspot.ch/2016/02/morgan-fingerprint-bit-statistics.html
    
    Parameters
    ----------
    mol : rdkit.Chem.rdchem.Mol
    molSize : tuple
    kekulize : bool 
    drawer : funct
        Specify which drawing function to use (default: rdMolDraw2D.MolDraw2DSVG)
    font_size : float
        Atom font size

    Returns
    -------
    IPython.display.SVG
    """
    from IPython.display import SVG    
    
    mc = _prepare_mol(mol, kekulize)
    mol_atoms = [a.GetIdx() for a in mc.GetAtoms()]
    if drawer is None:
        drawer = rdMolDraw2D.MolDraw2DSVG(*molSize)
    drawer.SetFontSize(font_size)
    drawer.DrawMolecule(mc, highlightAtomRadii={x: 0.5 for x in mol_atoms}, **kwargs)
    drawer.FinishDrawing()
    svg = drawer.GetDrawingText()
    return SVG(svg.replace('svg:', ''))
def mol_to_svg ( mol , molSize = ( 300 , 300 ) , kekulize = True , drawer = None , font_size = 0.8 , * * kwargs ) : from IPython . display import SVG mc = _prepare_mol ( mol , kekulize ) mol_atoms = [ a . GetIdx ( ) for a in mc . GetAtoms ( ) ] if drawer is None : drawer = rdMolDraw2D . MolDraw2DSVG ( * molSize ) drawer . SetFontSize ( font_size ) drawer . DrawMolecule ( mc , highlightAtomRadii = { x : 0.5 for x in mol_atoms } , * * kwargs ) drawer . FinishDrawing ( ) svg = drawer . GetDrawingText ( ) return SVG ( svg . replace ( 'svg:' , '' ) )