pckroon / pysmiles

A lightweight python-only library for reading and writing SMILES strings
Apache License 2.0
144 stars 21 forks source link

pysmiles 'Unmatched ring indices [0]' #14

Closed abitofalchemy closed 2 years ago

abitofalchemy commented 4 years ago

Given the String I get this error. Do you have any suggestions?

----> 5     return pysmiles.read_smiles(smiles_str,explicit_hydrogen=True)
      6 
      7 def graph_from_gnm(n,m):

~/anaconda3/envs/deepnv/lib/python3.6/site-packages/pysmiles/read_smiles.py in read_smiles(smiles, explicit_hydrogen, zero_order_bonds, reinterpret_aromatic)
    180             LOGGER.warning('E/Z stereochemical information, which is specified by "%s", will be discarded', token)
    181     if ring_nums:
--> 182         raise KeyError('Unmatched ring indices {}'.format(list(ring_nums.keys())))
    183 
    184     # Time to deal with aromaticity. This is a mess, because it's not super

KeyError: 'Unmatched ring indices [0]'
pckroon commented 4 years ago

Hey,

what's the SMILES string you're trying to parse? The message means your SMILES is invalid, but without seeing it I can't help you further.