From eccf31033d6cfbaa411601d8d398ed1aed852c67 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Fri, 27 Sep 2024 13:26:53 +0100 Subject: [PATCH] Allow end-state connectivity property to differ. [closes #344] --- python/BioSimSpace/Align/_merge.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/BioSimSpace/Align/_merge.py b/python/BioSimSpace/Align/_merge.py index ba8b61295..62189926c 100644 --- a/python/BioSimSpace/Align/_merge.py +++ b/python/BioSimSpace/Align/_merge.py @@ -1162,8 +1162,13 @@ def merge( "perturbation will likely be unstable." ) - # Set the "connectivity" property. - edit_mol.setProperty("connectivity", conn) + # Set the "connectivity" property. If the end state connectivity is the same, + # then we can just set the "connectivity" property. + if conn0 == conn1: + edit_mol.setProperty("connectivity", conn0) + else: + edit_mol.setProperty("connectivity0", conn0) + edit_mol.setProperty("connectivity1", conn1) # Create the CLJNBPairs matrices. ff = molecule0.property(ff0)