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

Replace recursion with stack (fix #115) #116

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

haydn-jones
Copy link
Contributor

@haydn-jones haydn-jones commented Jul 9, 2024

Changed _derive_smiles_from_fragment to use a stack rather than recursion as #115 is triggered by hitting the stack limit.

Test suite passed and to verify further I compared the encodings AND decodings of every smile in the test set csv's with and without this change (there were no differences).

Closes #115.

Edit: test suite passed up to the linting errors, which do not seem to be new.

@MarioKrenn6240
Copy link
Collaborator

Thanks for the PR. I have had a brief look at it and as i understand it looks good. Alston Lo (who actually wrote the entire base code of v2.x) will have a look at it too very soon.

in the meantime, we decided to remove the linter from the CI, could u do so aswell please in your PR? also, i think your example if a great additional case for the CI, could u add it to test_specific_cases.py?

We will announce this as v2.1.2 when its merged.

@haydn-jones
Copy link
Contributor Author

Pulled the recent changes and added the test case. For my own peace of mind I also compared the decodings of the current and previous implementations for ~130 million molecules from ZINC20 and everything checked out.

@MarioKrenn6240 MarioKrenn6240 merged commit 1fe121b into aspuru-guzik-group:master Jul 15, 2024
1 check passed
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.

Decoding failure for SELFIES string
2 participants