From b920f5aeecf7843fcc699db4a70a9a0f124fa198 Mon Sep 17 00:00:00 2001 From: Gydo van Zundert Date: Wed, 2 Mar 2022 15:45:11 -0500 Subject: [PATCH] Add unit test for protonate.py --- tests/test_protonate.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_protonate.py diff --git a/tests/test_protonate.py b/tests/test_protonate.py new file mode 100644 index 0000000..3d06a2a --- /dev/null +++ b/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