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

Modified SMILES regex in data pipeline to disallow three-digit ring numbers. #184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NicklasOsterbacka
Copy link

This PR removes the ring number reordering in the data pipeline. The ring reordering may render SMILES strings unreadable by RDKit in exceptional cases; see #183. This PR additionally solves that.

To circumvent issues in tokenization, the regex used to parse ring numbers is instead changed from “%\d+” to “%\d{2}”, catching only two-digit numbers following percentage signs. This renders the reordering unnecessary.

Three-digit ring numbers are disallowed under the OpenSMILES standard and would only appear for cases where 100 ring closures are open simultaneously, which should be exceedingly rare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant