(mol, kekulize)
return mc
Prepare mol for SVG depiction (embed 2D coords)
Prepare mol for SVG depiction (embed 2D coords)
Prepare mol for SVG depiction ( embed 2D coords )
def _prepare_mol(mol, kekulize):
    """Prepare mol for SVG depiction (embed 2D coords)
    """
    mc = Chem.Mol(mol.ToBinary())
    if kekulize:
        try:
            Chem.Kekulize(mc)
        except:
            mc = Chem.Mol(mol.ToBinary())
    if not mc.GetNumConformers():
        rdDepictor.Compute2DCoords(mc)
    return mc
def _prepare_mol ( mol , kekulize ) : mc = Chem . Mol ( mol . ToBinary ( ) ) if kekulize : try : Chem . Kekulize ( mc ) except : mc = Chem . Mol ( mol . ToBinary ( ) ) if not mc . GetNumConformers ( ) : rdDepictor . Compute2DCoords ( mc ) return mc