Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #354 #355

Merged
merged 1 commit into from
Oct 24, 2024
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
17 changes: 13 additions & 4 deletions python/BioSimSpace/Sandpit/Exscientia/_SireWrappers/_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,9 @@ def rotateBoxVectors(

from sire.system import System

# Create a cursor.
cursor = System(self._sire_object).cursor()
# Create a cursor for the non-perturbable molecules.
system = System(self._sire_object)
cursor = system["not property is_perturbable"].cursor()

# Rotate all vector properties.

Expand Down Expand Up @@ -1267,8 +1268,15 @@ def rotateBoxVectors(
except:
pass

# Update the molecules in the system.
system.update(cursor.commit())
self._sire_object = system._system

# Now deal with any perturbable molecules.
if self.nPerturbableMolecules() > 0:
# Create a cursor for the perturbable molecules.
cursor = system["property is_perturbable"].cursor()

# Coordinates.
try:
prop_name = property_map.get("coordinates", "coordinates") + "0"
Expand Down Expand Up @@ -1307,8 +1315,9 @@ def rotateBoxVectors(
except:
pass

# Commit the changes.
self._sire_object = cursor.commit()._system
# Update the perturbable molecules in the system.
system.update(cursor.commit())
self._sire_object = system._system

def reduceBoxVectors(self, bias=0, property_map={}):
"""
Expand Down
17 changes: 13 additions & 4 deletions python/BioSimSpace/_SireWrappers/_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,9 @@ def rotateBoxVectors(

from sire.system import System

# Create a cursor.
cursor = System(self._sire_object).cursor()
# Create a cursor for the non-perturbable molecules.
system = System(self._sire_object)
cursor = system["not property is_perturbable"].cursor()

# Rotate all vector properties.

Expand Down Expand Up @@ -1215,8 +1216,15 @@ def rotateBoxVectors(
except:
pass

# Update the molecules in the system.
system.update(cursor.commit())
self._sire_object = system._system

# Now deal with any perturbable molecules.
if self.nPerturbableMolecules() > 0:
# Create a cursor for the perturbable molecules.
cursor = system["property is_perturbable"].cursor()

# Coordinates.
try:
prop_name = property_map.get("coordinates", "coordinates") + "0"
Expand Down Expand Up @@ -1255,8 +1263,9 @@ def rotateBoxVectors(
except:
pass

# Commit the changes.
self._sire_object = cursor.commit()._system
# Update the perturbable molecules in the system.
system.update(cursor.commit())
self._sire_object = system._system

def reduceBoxVectors(self, bias=0, property_map={}):
"""
Expand Down
Loading