douweschulte / pdbtbx

A library to open/edit/save (crystallographic) Protein Data Bank (PDB) and mmCIF files in Rust.
https://crates.io/crates/pdbtbx
MIT License
49 stars 12 forks source link

Fixed chain auto-capitalisation issue #110

Closed OWissett closed 1 year ago

OWissett commented 1 year ago

109

Problem: Some PDB files contain two occurrences of the same chain ID, e.g., B and b. The library automatically capitalizes change IDs, this leads to a chain ID conflict which is not possible to resolve simply.

Solution: Remove the functionality which automatically capitalizes the values.

Notes:

douweschulte commented 1 year ago

Looks good to me (also see reaction on the issue itself). One small refactor though, maybe it would be better to rename prepare_identifier -> prepare_identifier_uppercase, and prepare_identifier_case_sensitive -> prepare_identifier. I think that captures the gist of it a bit better. But feel free to disagree.

OWissett commented 1 year ago

Sounds fine to me. I will fix those in a bit

OWissett commented 1 year ago

This functionality could be linked with the builder solution I suggest in #113

OWissett commented 1 year ago

Addressed naming suggestoins