From 5e2b9f05db7988976f35a920e0d3b104dbb329ae Mon Sep 17 00:00:00 2001 From: Chris Maffeo <cmaffeo2@illinois.edu> Date: Tue, 25 Feb 2020 17:21:49 -0600 Subject: [PATCH] Minor bug fix: Segment.rotate() provides numpy array of quaternions instead of list --- mrdna/readers/segmentmodel_from_pdb.py | 2 +- mrdna/segmentmodel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mrdna/readers/segmentmodel_from_pdb.py b/mrdna/readers/segmentmodel_from_pdb.py index ca17030..8dec750 100644 --- a/mrdna/readers/segmentmodel_from_pdb.py +++ b/mrdna/readers/segmentmodel_from_pdb.py @@ -327,7 +327,7 @@ def SegmentModelFromPdb(*args,**kwargs): stacks, three_prime, seq, - orientations + np.array(orientations) ) if __name__ == "__main__": diff --git a/mrdna/segmentmodel.py b/mrdna/segmentmodel.py index 33db573..10a5fe9 100644 --- a/mrdna/segmentmodel.py +++ b/mrdna/segmentmodel.py @@ -573,7 +573,7 @@ class Segment(ConnectableElement, Group): orientations = np.array([self.contour_to_orientation(v) for v in u]) for i in ids: orientations[i,:] = rotation_matrix.dot(orientations[i]) - quats = [quaternion_from_matrix(o) for o in orientations] + quats = np.array([quaternion_from_matrix(o) for o in orientations]) self.set_orientation_splines(u, quats) def _set_splines_from_ends(self, resolution=4): -- GitLab