fix(ml): don't require CCD leaving groups when substituting residues - #95
Open
benz0id wants to merge 1 commit into
Open
fix(ml): don't require CCD leaving groups when substituting residues#95benz0id wants to merge 1 commit into
benz0id wants to merge 1 commit into
Conversation
In _map_to_closest_canonical_residue we use a template canonical residue to check if an unwanted residue might be substituted for a canonical. The template canonical residue includes leaving groups, causing it to always fail for residues in a polymer when checking if it subsets the atoms of the residue to be substituted. This fix removes leaving groups from the comparison logic when required and adds regression tests demonstrating both the in-chain and chain-terminus cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 PR Checklist
This PR is tagged as a draft if it is still under development and not ready for review.
I have ensured that all my commits follow angular commit message conventions.
I have run
make formaton the codebase before submitting the PR (this autoformats the code and lints it).I have named the PR in angular PR message format as well (c.f. above), with a sensible tag line that summarizes all the changes in the PR.
ℹ️ PR Description
What changes were made and why?
In _map_to_closest_canonical_residue we use a template canonical residue to check if an unwanted residue might be substituted for a canonical. The template canonical residue includes leaving groups, causing it to always fail for residues in a polymer when checking if it subsets the atoms of the residue to be substituted. This fix removes leaving groups from the comparison logic when required.
How were the changes tested?
Regression tests demonstrating both the in-chain and chain-terminus cases. The in-chain tests fail on production and pass with this change. Existing test_filters.py unchanged and still passing.
Additional Notes
This commit contains code written by Claude.