Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pdb2pqr/dat/PATCHES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
</patch>
<patch>
<name>DT5</name>
<applyto>T</applyto>
<applyto>DT</applyto>
<remove>O1P</remove>
<remove>P</remove>
<remove>O2P</remove>
Expand Down
20 changes: 20 additions & 0 deletions tests/patches_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from pathlib import Path

from pdb2pqr.definitions import Definition


def test_dt5_patch_applies_to_dt_reference() -> None:
dat_dir = Path(__file__).resolve().parents[1] / "pdb2pqr" / "dat"

with (
(dat_dir / "AA.xml").open() as aa_file,
(dat_dir / "NA.xml").open() as na_file,
(dat_dir / "PATCHES.xml").open() as patch_file,
):
definition = Definition(aa_file, na_file, patch_file)

assert "DT" in definition.map
assert "DT5" in definition.map
assert "P" not in definition.map["DT5"].map
assert "O1P" not in definition.map["DT5"].map
assert "H5T" in definition.map["DT5"].map
Loading