Skip to content

Conversation

roccomoretti
Copy link
Member

@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.)

@roccomoretti roccomoretti requested review from lyskov and woodsh17 July 25, 2025 16:03
@roccomoretti roccomoretti added ready_for_review This PR is ready to be reviewed and merged. 90 standard tests labels Jul 25, 2025
Copy link
Member

@woodsh17 woodsh17 left a 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.

@roccomoretti
Copy link
Member Author

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.)

Copy link
Member

@lyskov lyskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

90 standard tests ready_for_review This PR is ready to be reviewed and merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants