rdkit: Segfault when parsing InChI for Pubchem compound
Configuration:
- RDKit Version: ‘2020.03.2’ or ‘2020.03.1’
- Operating system: Linux
- Python version (if relevant): 3.7.6
- Are you using conda? Yes
- If you are using conda, which channel did you install the rdkit from? conda-forge
- If you are not using conda: how did you install the RDKit?
Description:
I got Segmentation fault output when I run the code below
from rdkit import Chem
Chem.MolFromInchi('InChI=1S/C5H14O3SSi/c1-5-9(10,6-2,7-3)8-4/h5H2,1-4H3')
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 16 (12 by maintainers)
The problem here is that
S=[Si]is a radical (as is the original molecule) and InChI doesn’t handle radicals correctly. The warning is telling you this (as usual, it’s often not a good idea to ignore warnings).Here’s a simple demonstration of this:
The RDKit should probably still not fail with the
S=[Si]InChI, but it’s not going to produce anything correct