Skip to content

fix dna nucleobase atom selection default for capri - #1661

Open
VGPReys wants to merge 13 commits into
mainfrom
cg-caprieval-dna-fix
Open

fix dna nucleobase atom selection default for capri#1661
VGPReys wants to merge 13 commits into
mainfrom
cg-caprieval-dna-fix

Conversation

@VGPReys

@VGPReys VGPReys commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Before submitting, read the contributing guidelines and the AI policy.

What does this PR do and why?

This PR modifies the default CG atom selection during caprieval to select the nucelo-bases for DNA (l.316), matching the all-atom selection.

AI assistance

Nope

Checklist

  • Tests cover the new and/or changed code
  • Documentation updated if needed (also in the haddock3 user-manual
  • CHANGELOG.md updated for user-facing changes

Related issues

Closes #1658

Notes for reviewers

Sorry, the automatic linting program did not allow me to touch only the appropriate part, and I had to change the linting all along the script...

@VGPReys VGPReys self-assigned this Aug 10, 2026
@VGPReys VGPReys added bug Something isn't working m|caprieval Improvements in caprieval module labels Aug 10, 2026
@rversin
rversin self-requested a review August 10, 2026 09:35
amjjbonvin
amjjbonvin previously approved these changes Aug 10, 2026
@AnnaKravchenko

AnnaKravchenko commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Something is not right with definition of U nucleotide (in all-atom):
[2026-08-10 12:01:15,701 libparallel WARNING] Exception in task execution: sequence contains letters not in the alphabet

And then caprieval crushed the entire run

@amjjbonvin

Copy link
Copy Markdown
Member

Do we have any RNA-related tests/examples? If not probably good to add

@AnnaKravchenko

Copy link
Copy Markdown
Contributor

Technically that is separate issue that is not related to CG atom selection for DNA in capri, but while reading code in this PR, I spotted that in libalign, line 516 (definition of C in RNA_FULL_DICT):

  • O2 is missing;
  • N9, O6, N2 should not be there

@AnnaKravchenko

Copy link
Copy Markdown
Contributor

Another potential issue is that DNA_FULL_DICT lists “O1P” and “O2P”, while haddock writes pdbs using “OP1” and “OP2”. I don’t think there’s any way to match those atoms within libalign or caprieval?
So they are probably just discarted when calculating all capri metrics with allatoms=true in caprieval

@VGPReys
VGPReys enabled auto-merge August 10, 2026 13:30
"P",
"O1P",
"O2P",
"OP1",

@AnnaKravchenko AnnaKravchenko Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is nice, but I initially did not think about the reference file. If that one is not being produced by haddock - then it can, in principle, contain O1P/O2P.

So maybe it’s better to keep all 4 options, same as scan.py in main is doing?

"N9",
"C5",
"C6",
"O6",

@AnnaKravchenko AnnaKravchenko Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RNA_FULL_DICT[“C”] has “O6” - should be “C6”:

Suggested change
"O6",
"C6",

@AnnaKravchenko AnnaKravchenko Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I now copied quotes from the code directly - seems they are now not affected by this suggestion, but indeed beware!

@amjjbonvin

amjjbonvin commented Aug 10, 2026 via email

Copy link
Copy Markdown
Member

@AnnaKravchenko

Copy link
Copy Markdown
Contributor

One more thing - can you please update caprieval/defaults.yaml of ‘allatoms’ to say that backbone is the case for proteins and RNAs, but it’s nucleobases for DNAs?

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

Labels

bug Something isn't working m|caprieval Improvements in caprieval module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CAPRI eval uses different atom sets for DNA in AA and CG mode

3 participants