Skip to content

Commit

Permalink
Sire.IO.AmberRst7.box_angles now returns correct units.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Nov 13, 2023
1 parent 621149b commit c011e22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,10 @@ def _split_molecules(frame, pdb, reference, work_dir, property_map={}):

# Create a triclinic space from the information in the frame file.
if isinstance(frame, _SireIO.AmberRst7):
# Get the box dimensions and angles. Take the values, since the
# units are wrong.
# Get the box dimensions and angles.
degree = _SireUnits.degree
dimensions = [x.value() for x in frame.box_dimensions()]
angles = [x.value() * degree for x in frame.box_angles()]
angles = [x.to(degree) for x in frame.box_angles()]
box = _SireVol.TriclinicBox(*dimensions, *angles)
else:
box = _SireVol.TriclinicBox(frame.box_v1(), frame.box_v2(), frame.box_v3())
Expand Down
5 changes: 2 additions & 3 deletions python/BioSimSpace/Trajectory/_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,10 @@ def _split_molecules(frame, pdb, reference, work_dir, property_map={}):

# Create a triclinic space from the information in the frame file.
if isinstance(frame, _SireIO.AmberRst7):
# Get the box dimensions and angles. Take the values, since the
# units are wrong.
# Get the box dimensions and angles.
degree = _SireUnits.degree
dimensions = [x.value() for x in frame.box_dimensions()]
angles = [x.value() * degree for x in frame.box_angles()]
angles = [x.to(degree) for x in frame.box_angles()]
box = _SireVol.TriclinicBox(*dimensions, *angles)
else:
box = _SireVol.TriclinicBox(frame.box_v1(), frame.box_v2(), frame.box_v3())
Expand Down

0 comments on commit c011e22

Please sign in to comment.