jensengroup / propka

PROPKA predicts the pKa values of ionizable groups in proteins and protein-ligand complexes based in the 3D structure.
http://propka.org
GNU Lesser General Public License v2.1
256 stars 58 forks source link

protonate.py: Rename Vanadium element from Va to V #141

Closed latrocinia closed 2 years ago

latrocinia commented 2 years ago

This made PROPKA fail on PDB 1IDQ which has a Vanadium atom. The chemical symbol for Vanadium is V.

speleo3 commented 2 years ago

Can you add a test? I think this could be a unit test like this:

tests/test_protonate.py

import propka.atom
import propka.protonate

def test_protonate_atom():
    atom = propka.atom.Atom(
        "HETATM 4479  V   VO4 A1578     -19.097  16.967   0.500  1.00 17.21           V  "
    )
    assert not atom.is_protonated
    p = propka.protonate.Protonate()
    p.protonate_atom(atom)
    assert atom.is_protonated
    assert atom.number_of_protons_to_add == 6
codecov[bot] commented 2 years ago

Codecov Report

Merging #141 (3400964) into master (beddb0a) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 3400964 differs from pull request most recent head b920f5a. Consider uploading reports for the commit b920f5a to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #141   +/-   ##
=======================================
  Coverage   73.09%   73.09%           
=======================================
  Files          25       25           
  Lines        3970     3970           
=======================================
  Hits         2902     2902           
  Misses       1068     1068           
Impacted Files Coverage Δ
propka/protonate.py 88.65% <ø> (ø)

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 beddb0a...b920f5a. Read the comment docs.

latrocinia commented 2 years ago

Added unit test as specified and ran tests.