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

Fix for cases where tokenization failed #54

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

wukevin
Copy link
Contributor

@wukevin wukevin commented Sep 17, 2024

Description

When tokenization failed (e.g., given a malformed SMILES string like Zn), we did not properly add None to structure contexts, resulting in a mismatch between entity_data and structure_context data when we zip them together afterwards. This fixes the issue and adds new logic to assign chain_id only based on non-null structural contexts. This is because the ranking code expects contiguous numbering of chain_id.

Test plan

Tested examples that crashed previously with malformed SMILES strings; these do not crash as they did before and instead produce output with malformed SMILES omitted.

wukevin and others added 3 commits September 17, 2024 20:23
Co-authored-by: Alex Rogozhnikov <arogozhnikov@users.noreply.github.com>
@arogozhnikov arogozhnikov enabled auto-merge (squash) September 17, 2024 20:27
@arogozhnikov arogozhnikov merged commit bf90332 into main Sep 17, 2024
4 checks passed
@arogozhnikov arogozhnikov deleted the kevin/fix-failed-tokenization branch September 17, 2024 20:27
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.

2 participants