forked from enviPath/enviPy
wip
This commit is contained in:
@ -171,12 +171,19 @@ class FormatConverter(object):
|
||||
try:
|
||||
Chem.Kekulize(mol)
|
||||
except Exception:
|
||||
mc = Chem.Mol(mol.ToBinary())
|
||||
mol = Chem.Mol(mol.ToBinary())
|
||||
|
||||
if not mc.GetNumConformers():
|
||||
Chem.rdDepictor.Compute2DCoords(mc)
|
||||
if not mol.GetNumConformers():
|
||||
Chem.rdDepictor.Compute2DCoords(mol)
|
||||
|
||||
pass
|
||||
drawer = rdMolDraw2D.MolDraw2DCairo(*mol_size)
|
||||
opts = drawer.drawOptions()
|
||||
|
||||
opts.clearBackground = False
|
||||
drawer.DrawMolecule(mol)
|
||||
drawer.FinishDrawing()
|
||||
|
||||
return drawer.GetDrawingText()
|
||||
|
||||
@staticmethod
|
||||
def normalize(smiles):
|
||||
|
||||
Reference in New Issue
Block a user