Skip to content
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

Incorrect element assignment for 4-character atom names. #4644

Open
eunos-1128 opened this issue Mar 3, 2024 · 0 comments · May be fixed by #4645
Open

Incorrect element assignment for 4-character atom names. #4644

eunos-1128 opened this issue Mar 3, 2024 · 0 comments · May be fixed by #4645

Comments

@eunos-1128
Copy link

eunos-1128 commented Mar 3, 2024

Setup

I am reporting a problem with Biopython 1.83, Python 3.11.7, and Linux-6.1.64-09049-g010fe86d9eae-x86_64-with-glibc2.36 as follows:

When running _assign_element in PDB/Atom.py, elements are not correctly assigned for atoms with 4 characters long names such as HNZ1 and HNE2 in the lysine residue.

I fixed the code and proposed it as a PR.

Expected behaviour

"H" is assigned for atoms with 4 characters long names such as HNZ1 and HNE2.

Actual behaviour

"X" is assigned for atoms with 4 characters long names such as HNZ1 and HNE2.

Steps to reproduce

To reproduce, construct Atom instance without designating elements for atoms using PDB file containing HNX(X = A-Z) group in the lysine residue.
(_assign_element is automatically run.)

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 a pull request may close this issue.

1 participant