diff --git a/pdb2pqr/dat/PATCHES.xml b/pdb2pqr/dat/PATCHES.xml index 2069701c..4cd04c86 100644 --- a/pdb2pqr/dat/PATCHES.xml +++ b/pdb2pqr/dat/PATCHES.xml @@ -579,7 +579,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE. DT5 - T + DT O1P P O2P diff --git a/tests/patches_test.py b/tests/patches_test.py new file mode 100644 index 00000000..5c2341d0 --- /dev/null +++ b/tests/patches_test.py @@ -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