Skip to content

Commit

Permalink
Merge pull request #141 from latrocinia/master
Browse files Browse the repository at this point in the history
protonate.py: Rename Vanadium element from Va to V
  • Loading branch information
sobolevnrm committed Mar 3, 2022
2 parents beddb0a + b920f5a commit ab80128
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion propka/protonate.py
Expand Up @@ -31,7 +31,7 @@ def __init__(self, verbose=False):
'H': 1, 'He': 2, 'Li': 1, 'Be': 2, 'B': 3, 'C': 4, 'N': 5,
'O': 6, 'F': 7, 'Ne': 8, 'Na': 1, 'Mg': 2, 'Al': 3, 'Si': 4,
'P': 5, 'S': 6, 'Cl': 7, 'Ar': 8, 'K': 1, 'Ca': 2, 'Sc': 2,
'Ti': 2, 'Va': 2, 'Cr': 1, 'Mn': 2, 'Fe': 2, 'Co': 2, 'Ni': 2,
'Ti': 2, 'V': 2, 'Cr': 1, 'Mn': 2, 'Fe': 2, 'Co': 2, 'Ni': 2,
'Cu': 1, 'Zn': 2, 'Ga': 3, 'Ge': 4, 'As': 5, 'Se': 6, 'Br': 7,
'Kr': 8, 'I': 7}
# TODO - consider putting charges in a configuration file
Expand Down
13 changes: 13 additions & 0 deletions tests/test_protonate.py
@@ -0,0 +1,13 @@
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

0 comments on commit ab80128

Please sign in to comment.