Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on reaction smart parsing #7338

Open
thegodone opened this issue Apr 8, 2024 · 0 comments
Open

Error on reaction smart parsing #7338

thegodone opened this issue Apr 8, 2024 · 0 comments
Labels

Comments

@thegodone
Copy link
Contributor

thegodone commented Apr 8, 2024

Describe the bug

Trying to read this corrupted smart rxn I have the following error is there a workaround ?
There are 9 cases like this in USPTO 1M dataset.
one example:
'C([O:4][CH2:5][C@@:6]12[C@@H:23]3[C@H:14]([C@H:15]4[C@@:19]([CH2:21][CH2:22]3)([CH3:20])[C:18](=[O:24])[CH2:17][CH2:16]4)CCC1=CC(=O)[CH2:8][CH2:7]2)(=O)C>[Br-].C[P+](C1C=CC=CC=1)(C1C=CC=CC=1)C1C=CC=CC=1.CCOCC.C([Li])CCC.CCCCCC>[CH2:8]=[C:7]1[CH2:8][CH2:7][C@@:6]2([CH2:5][OH:4])[C:23]([CH2:22][CH2:21][C@@H:22]3[C@@H:23]2[CH2:14][CH2:15][C@@:19]2([CH3:20])[C@H:21]3[CH2:16][CH2:17][C:18]2=[O:24])=[CH:6]1 |f:1.2|'

return error:

ERROR:root:Error processing structure: C([O:4][CH2:5][C@@:6]12[C@@H:23]3[C@H:14]([C@H:15]4[C@@:19]([CH2:21][CH2:22]3)([CH3:20])[C:18](=[O:24])[CH2:17][CH2:16]4)CCC1=CC(=O)[CH2:8][CH2:7]2)(=O)C>[Br-].C[P+](C1C=CC=CC=1)(C1C=CC=CC=1)C1C=CC=CC=1.CCOCC.C([Li])CCC.CCCCCC>[CH2:8]=[C:7]1[CH2:8][CH2:7][C@@:6]2([CH2:5][OH:4])[C:23]([CH2:22][CH2:21][C@@H:22]3[C@@H:23]2[CH2:14][CH2:15][C@@:19]2([CH3:20])[C@H:21]3[CH2:16][CH2:17][C:18]2=[O:24])=[CH:6]1 |f:1.2| | Error: Invariant Violation
	could not find probe element
	Violation occurred on line 71 in file Code[/RDGeneral/utils.h](http://localhost:8889/RDGeneral/utils.h)
	Failed Expression: foundIt
	RDKIT: 2024.03.1pre
	BOOST: 1_82

To Reproduce

rxn = AllChem.ReactionFromSmarts('C([O:4][CH2:5][C@@:6]12[C@@H:23]3[C@H:14]([C@H:15]4[C@@:19]([CH2:21][CH2:22]3)([CH3:20])[C:18](=[O:24])[CH2:17][CH2:16]4)CCC1=CC(=O)[CH2:8][CH2:7]2)(=O)C>[Br-].C[P+](C1C=CC=CC=1)(C1C=CC=CC=1)C1C=CC=CC=1.CCOCC.C([Li])CCC.CCCCCC>[CH2:8]=[C:7]1[CH2:8][CH2:7][C@@:6]2([CH2:5][OH:4])[C:23]([CH2:22][CH2:21][C@@H:22]3[C@@H:23]2[CH2:14][CH2:15][C@@:19]2([CH3:20])[C@H:21]3[CH2:16][CH2:17][C:18]2=[O:24])=[CH:6]1', useSmiles=True)

Expected behavior
My goal is to remove the atommaps. Or at least have an explanation of the root cause.

Configuration (please complete the following information):

  • RDKit version: master
  • OS: MacOS ARM M3
  • Python version (if relevant): 3.11
  • Are you using conda? no
  • If you are using conda, which channel did you install the rdkit from?
  • If you are not using conda: how did you install the RDKit? Greg proposal

Additional context
Add any other context about the problem here.

@thegodone thegodone added the bug label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant