Skip to content

Commit

Permalink
Now cursor.rotate rotates velocities too.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Nov 13, 2023
1 parent c011e22 commit 84660b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,10 @@ def rotateBoxVectors(
try:
prop_name = property_map.get("velocity", "velocity")
cursor = cursor.rotate(
center=center, matrix=rotation_matrix, map={"coordinates": prop_name}
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
pass
Expand All @@ -1241,12 +1244,14 @@ def rotateBoxVectors(
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
prop_name = property_map.get("coordinates", "coordinates") + "1"
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
Expand All @@ -1258,12 +1263,14 @@ def rotateBoxVectors(
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
prop_name = property_map.get("velocity", "velocity") + "1"
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
Expand Down
14 changes: 12 additions & 2 deletions python/BioSimSpace/_SireWrappers/_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,10 @@ def rotateBoxVectors(
try:
prop_name = property_map.get("coordinates", "coordinates")
cursor = cursor.rotate(
center=center, matrix=rotation_matrix, map={"coordinates": prop_name}
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
pass
Expand All @@ -1176,7 +1179,10 @@ def rotateBoxVectors(
try:
prop_name = property_map.get("velocity", "velocity")
cursor = cursor.rotate(
center=center, matrix=rotation_matrix, map={"coordinates": prop_name}
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
pass
Expand All @@ -1189,12 +1195,14 @@ def rotateBoxVectors(
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
prop_name = property_map.get("coordinates", "coordinates") + "1"
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
Expand All @@ -1206,12 +1214,14 @@ def rotateBoxVectors(
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
prop_name = property_map.get("velocity", "velocity") + "1"
cursor = cursor.rotate(
center=center,
matrix=rotation_matrix,
rotate_velocities=False,
map={"coordinates": prop_name},
)
except:
Expand Down

0 comments on commit 84660b2

Please sign in to comment.