Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
125 stars 34 forks source link

Fix bug and add support for integer resnames which exist in PDB #291

Closed stefdoerr closed 2 years ago

stefdoerr commented 2 years ago

Currently if you add a residue with an integer name to the XML definitions it will crash because it will convert the resname to a float number which will not match any class definitions.

https://www.rcsb.org/structure/5VBL Here for example you have residue 200 (4-CHLORO-L-PHENYLALANINE) https://www.rcsb.org/ligand/200

This PR fixes that issue by insisting on string type for residue names even if they can be converted to float.

codecov[bot] commented 2 years ago

Codecov Report

Merging #291 (af9686f) into master (470045c) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #291   +/-   ##
=======================================
  Coverage   65.26%   65.27%           
=======================================
  Files          30       30           
  Lines        7774     7776    +2     
=======================================
+ Hits         5074     5076    +2     
  Misses       2700     2700           
Impacted Files Coverage Δ
pdb2pqr/definitions.py 84.61% <100.00%> (+0.14%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 470045c...af9686f. Read the comment docs.

stefdoerr commented 2 years ago

If you approve this, would be awesome if you can make quickly a bug-fix release as well so that I can get rid of my really ugly workaround :smiley:

sobolevnrm commented 2 years ago

https://pypi.org/project/pdb2pqr/3.5.1/

stefdoerr commented 2 years ago

Ah, the conda-forge recipe is not maintained by you I see. Might make sense though to make a release since 3.5.0 was also not released there yet. Should I ask the maintainer over there? Thanks!

Edit: I think I just found a new bug with custom libraries. Maybe wait a bit still.