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

Reactions should not use strict implicit valence calculations #3097

Closed
mwojcikowski opened this issue Apr 17, 2020 · 1 comment · Fixed by #3098
Closed

Reactions should not use strict implicit valence calculations #3097

mwojcikowski opened this issue Apr 17, 2020 · 1 comment · Fixed by #3098
Labels
Milestone

Comments

@mwojcikowski
Copy link
Contributor

mwojcikowski commented Apr 17, 2020

Configuration:

  • RDKit Version: 2020.09 (present in 2019.09+)
  • Operating system: MacOS

Description:
RunReactants should just apply the transformation and return unsanitized mols, instead it is forcing calculation of explicit valence in strict mode, thus producing error. This is a regression that happened somewhere after 2019.03 release.

Expected behavior:
The reaction should not fail in such way, even with messed up (but still valid) SMARTS.

Example
I understand that the SMARTS is not ideal, although that is the minimal example that triggers the error.

rxn = AllChem.ReactionFromSmarts('[c:6][n:7][c:8].[N:14]#[N:15]>>[C:6].[C:8][N:7]=[N+:14]=[N-:15]')                                                                                                                                                              
rxn.RunReactants((Chem.MolFromSmiles('c1cc[nH]c1'), Chem.MolFromSmiles('N#N')))                                                                                                                                                                                  

Error: [14:57:42] Explicit valence for atom # 1 N, 4, is greater than permitted

@mwojcikowski
Copy link
Contributor Author

mwojcikowski commented Apr 17, 2020

I believe these are the offending lines. PR coming soon.

@greglandrum greglandrum added the bug label May 4, 2020
@greglandrum greglandrum added this to the 2020_03_2 milestone May 4, 2020
@greglandrum greglandrum changed the title RunReactants triggers strict calculation of explicit valence Reactions should not use strict implicit valence calculations May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants