From 66d991cc6173ad0d49017bbb4c4e796b5471b2a9 Mon Sep 17 00:00:00 2001 From: "Jimmy C. Kromann" Date: Sun, 24 Nov 2024 22:44:05 +0100 Subject: [PATCH] Bugfix: Fix view bug when filtering and reordering (#116) --- rmsd/calculate_rmsd.py | 2 +- tests/test_main.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rmsd/calculate_rmsd.py b/rmsd/calculate_rmsd.py index 77ece9d..86f1de0 100644 --- a/rmsd/calculate_rmsd.py +++ b/rmsd/calculate_rmsd.py @@ -2197,7 +2197,7 @@ def main(args: Optional[List[str]] = None) -> str: elif settings.reorder: assert reorder_method is not None, "Cannot reorder without selecting --reorder method" - q_review = reorder_method(p_atoms, q_atoms, p_coord, q_coord) + q_review = reorder_method(p_atoms_sub, q_atoms_sub, p_coord_sub, q_coord_sub) # If there is a reorder, then apply before print if q_review is not None: diff --git a/tests/test_main.py b/tests/test_main.py index 50158ad..78321de 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -119,6 +119,10 @@ def test_reorder_methods() -> None: for method in methods: rmsdlib.main(f"--reorder --reorder-method {method} {filename_a} {filename_b}".split()) + rmsdlib.main( + f"--no-hydrogen --reorder --reorder-method hungarian {filename_a} {filename_b}".split() + ) + def test_reflections() -> None: