Skip to content

fix: correct DT5 patch applyto from 'T' to 'DT' in PATCHES.xml#457

Merged
sobolevnrm merged 3 commits into
Electrostatics:mainfrom
nightcityblade:fix/issue-456
Apr 26, 2026
Merged

fix: correct DT5 patch applyto from 'T' to 'DT' in PATCHES.xml#457
sobolevnrm merged 3 commits into
Electrostatics:mainfrom
nightcityblade:fix/issue-456

Conversation

@nightcityblade
Copy link
Copy Markdown

Fixes #456

The DT5 patch in pdb2pqr/dat/PATCHES.xml had <applyto>T</applyto> instead of <applyto>DT</applyto>. This is inconsistent with all other deoxynucleotide patches (DA3/DA5 → DA, DC3/DC5 → DC, DG3/DG5 → DG, DT3 → DT) and causes a fatal error when processing PDB files containing DT5 residues.

@sobolevnrm
Copy link
Copy Markdown
Member

This was probably implemented because T is not found in RNA. However, I agree that it would be good to fix. Can you please add a test that demonstrates the problem and then shows that your patch fixes the problem?

@nightcityblade
Copy link
Copy Markdown
Author

Good catch. I added a focused regression test that loads the packaged definitions, verifies DT5 is built from the DT reference residue, and checks the expected terminal phosphate atoms are removed while H5T is present. I also ran pytest -q tests/patches_test.py locally and it passes.

@sobolevnrm
Copy link
Copy Markdown
Member

@nightcityblade the tests are failing for Python 3.10. I've lost track of the various PRs but merged #453 which might help. Can you please try merging that into your branch and see if it addresses the failures?

@nightcityblade
Copy link
Copy Markdown
Author

I merged the latest upstream main changes from #453 into this branch and pushed the result in 44ca79d so the Python 3.10 failures can be re-evaluated against the updated base. I was only able to do a lightweight local check here because the environment is missing project test dependencies (for example propka), but the branch is now rebased onto the newer upstream state you pointed me to.

@sobolevnrm sobolevnrm merged commit 76505a8 into Electrostatics:main Apr 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A lethal typo in PATCHES.xml

2 participants