I'm having trouble removing bonds from molecules with the Python API. (In particular, I want to remove "Unknown"-type bonds, but the problem seems to apply to all bonds. For example, after loading the JEXNAB crystal with the 2018 Python API, executing the following snippet gives the following error:
>>> crystal.molecule.remove_bonds([b for b in crystal.molecule.bonds])
File <long-fs-path>/miniconda/lib/python2.7/site-packages/ccdc/molecule.py", line 1815, in remove_bonds
raise RuntimeError('A bond is not in the molecule')
RuntimeError: A bond is not in the molecule
The same thing happens if I try to remove only 1 bond. Any idea what's going on?