If Molecule contains a ~ load it as SMARTS (#71)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#71
This commit is contained in:
2025-08-29 09:14:24 +12:00
parent dd7b28046c
commit 52931526c1

View File

@ -682,7 +682,10 @@ class IndigoUtils(object):
i.setOption("render-image-size", width, height) i.setOption("render-image-size", width, height)
i.setOption("render-bond-line-width", 2.0) i.setOption("render-bond-line-width", 2.0)
mol = i.loadMolecule(mol_data) if '~' in mol_data:
mol = i.loadSmarts(mol_data)
else:
mol = i.loadMolecule(mol_data)
if len(functional_groups.keys()) > 0: if len(functional_groups.keys()) > 0:
IndigoUtils._colorize(i, mol, functional_groups, False) IndigoUtils._colorize(i, mol, functional_groups, False)