mailr18606 - /trunk/generic_fns/structure/superimpose.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 04, 2013 - 14:16:
Author: bugman
Date: Mon Mar  4 14:16:39 2013
New Revision: 18606

URL: http://svn.gna.org/viewcvs/relax?rev=18606&view=rev
Log:
The generic_fns.structure.superimpose.find_centroid() function now prints out 
Euler angles as well.


Modified:
    trunk/generic_fns/structure/superimpose.py

Modified: trunk/generic_fns/structure/superimpose.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/superimpose.py?rev=18606&r1=18605&r2=18606&view=diff
==============================================================================
--- trunk/generic_fns/structure/superimpose.py (original)
+++ trunk/generic_fns/structure/superimpose.py Mon Mar  4 14:16:39 2013
@@ -30,7 +30,7 @@
 
 # relax module import.
 from generic_fns.structure.statistics import calc_mean_structure
-from maths_fns.rotation_matrix import R_to_axis_angle
+from maths_fns.rotation_matrix import R_to_axis_angle, R_to_euler_zyz
 
 
 def find_centroid(coords):
@@ -207,6 +207,7 @@
     # Calculate the rotation.
     R = kabsch_rotation(coord_from=coord_from, coord_to=coord_to, 
centroid_from=centroid_from, centroid_to=centroid_to)
     axis, angle = R_to_axis_angle(R)
+    a, b, g = R_to_euler_zyz(R)
 
     # Print out.
     if verbosity >= 1:
@@ -220,6 +221,7 @@
         print("    [%20.15f, %20.15f, %20.15f]" % (R[1, 0], R[1, 1], R[1, 
2]))
         print("    [%20.15f, %20.15f, %20.15f]]" % (R[2, 0], R[2, 1], R[2, 
2]))
         print("Rotation axis:           [%20.15f, %20.15f, %20.15f]" % 
(axis[0], axis[1], axis[2]))
+        print("Rotation euler angles:   [%20.15f, %20.15f, %20.15f]" % (a, 
b, g))
         print("Rotation angle (deg):    %.15f" % (angle / 2.0 / pi * 360.0))
 
     # Return the data.




Related Messages


Powered by MHonArc, Updated Mon Mar 04 14:40:02 2013