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

Fix _assign_element to deal with 4 characters atom with last number. #4645

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eunos-1128
Copy link

@eunos-1128 eunos-1128 commented Mar 3, 2024

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run pre-commit
    locally, and understand that continuous integration checks will be used to
    confirm the Biopython unit tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Closes #4644

@eunos-1128 eunos-1128 changed the title Modify _assign_element to deal with 4 characters atom with last number Modify _assign_element to deal with atoms with 4 characters name with last number Mar 3, 2024
@eunos-1128 eunos-1128 changed the title Modify _assign_element to deal with atoms with 4 characters name with last number Modify _assign_element to deal with atoms with 4 characters name having last number Mar 3, 2024
@JoaoRodrigues
Copy link
Member

Thanks for catching, reporting, and providing a fix for the issue - home run!

Could I trouble you to add a unit test that covers this type of case so that we can track it in the future and prevent regressions? You can modify one of the existing PDB files in the test suite for that, no need to add a new one (or just make a synthetic example).

@eunos-1128
Copy link
Author

Of course, I'll add a unit test.

@eunos-1128 eunos-1128 changed the title Modify _assign_element to deal with atoms with 4 characters name having last number Fix _assign_element to deal with 4 characters atom with last number. Mar 5, 2024
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.

Incorrect element assignment for 4-character atom names.
2 participants