-
Notifications
You must be signed in to change notification settings - Fork 120
Fix loading of ligands when three letter code matches NCAA #480
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
base: main
Are you sure you want to change the base?
Fix loading of ligands when three letter code matches NCAA #480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the error messages popping up in integration tests rna_denovo_dna_bridge, swm_dna_bridge, posttranslationalmod_io expected from this change? The tests look like they still end the same though.
That's not expected - it's from patch definitions which weren't consulted before but are now (but which don't actually contribute to the results). I've submitted fixes for the patches which were causing issues. I've also adjusted the simple_metrics_b_factor test to accommodate for poor handling of the BMA glycan residue. That's probably something which should be fixed more generally, though. (Though people using glycans are likely to be using an approach which avoids the issue -- the same one I've adjusted the test to use.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM!
@LAnAlchemist noticed that when a ligand params file provided with
-extra_res_fa
has a three letter code which matches an NCAA three letter code from the database, that ligand ResidueType is never selected on PDB read-in, even if it's a much better match for the names in the PDB.The reason for this is that the PDB reader residue typer prioritizes patched polymeric terminus types (those with TERMINUS properties) for residues at the ends of chains, discarding the ligand types as a possibility before even encountering the name-based selection.
This PR adjusts how the typer selects residues. Instead of having chain-terminal residues preferring terminus properties, actually look at the connection points, and look for residues which have/don't have the UPPER & LOWER connection points. (This is really what "is_lower_terminus" and "is_upper_terminus" in PoseFromSFRBuilder signifies: is this residue polymerically connected to the adjacent residue.)