Skip to content

Commit

Permalink
fix bug in shifting units but not normalizing by a unit array
Browse files Browse the repository at this point in the history
  • Loading branch information
CalCraven committed Dec 11, 2023
1 parent 7c3faae commit 33a3957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gmso/formats/gro.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _validate_positions(pos_array):
)
min_xyz = np.min(pos_array, axis=0)
unit = min_xyz.units
min_xyz0 = np.where(min_xyz < 0 * unit, min_xyz, 0 * unit)
min_xyz0 = np.where(min_xyz < 0 * unit, min_xyz, 0 * unit) * unit

pos_array -= min_xyz0

Expand Down

0 comments on commit 33a3957

Please sign in to comment.