Reading a smiles string in python.
1 from __future__
import print_function
2 from openbabel
import openbabel
as ob
5 conv = ob.OBConversion()
6 if not conv.SetInFormat(
'smi'):
7 print(
'could not find smiles format')
11 if not conv.ReadString(mol,
'CCCC'):
12 print(
'could not read the smiles string')