Skip to content

Rework chirality detection in restype determination for PDB loading#698

Open
roccomoretti wants to merge 10 commits into
RosettaCommons:mainfrom
roccomoretti:change_chirality_loading
Open

Rework chirality detection in restype determination for PDB loading#698
roccomoretti wants to merge 10 commits into
RosettaCommons:mainfrom
roccomoretti:change_chirality_loading

Conversation

@roccomoretti
Copy link
Copy Markdown
Member

A side quest from PR #687

Currently, we have a rather brittle atom-name-based approach to chirality detection on PDB read-in, which isn't as robust as it could be, in large part due to trying to decide chirality early on. Instead of imposing L/D identity early, we can defer it until later with the atom name matching heuristics. This way, the D & L version of amino acids can co-exist with non-aa residues with the same three letter code (e.g. when we're loading a CCD type with the same three letter code as an unrelated Rosetta residue type), and the ResidueTypeFinder should pick the best match.

I've also reworked the atom name matching heuristics, implementing the previously proposed idea to separate out virtual atom counts from non-virtual counts.

It bases its decisions on the type returned by get_representative type, which may be a misnomer. Also, as it stands now, it's superflous to the decide_is_l_aa/decide_is_d_aa/decide_is_known_achiral
(None of the types which would trigger d_l_threeletter_codes_are_same_for_aa() are listed in those sets.
@roccomoretti roccomoretti added ready_for_review This PR is ready to be reviewed and merged. 90 standard tests labels May 11, 2026
@roccomoretti
Copy link
Copy Markdown
Member Author

Aside from cosmetic changes in debug-level tracers, the swm_dna_bridge and rna_denovo_dna_bridge integration tests change as the input PDBs type the first nucleotide in the chain as CYT:LowerDNA:VirtualDNAPhosphate:Virtual_Phosphate versus CYT:LowerDNA:VirtualDNAPhosphate due to the missing coordinates for O5'. This is arguably a more correct typing, as CYT:LowerDNA:VirtualDNAPhosphate:Virtual_Phosphate doesn't have that oxygen present as a real atom.

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.

1 participant