Author: bugman Date: Thu Jun 25 13:45:54 2009 New Revision: 9146 URL: http://svn.gna.org/viewcvs/relax?rev=9146&view=rev Log: Simplified compile_2nd_matrix_iso_cone() by using R_2vect(). Modified: branches/frame_order/maths_fns/frame_order_matrix_ops.py Modified: branches/frame_order/maths_fns/frame_order_matrix_ops.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/maths_fns/frame_order_matrix_ops.py?rev=9146&r1=9145&r2=9146&view=diff ============================================================================== --- branches/frame_order/maths_fns/frame_order_matrix_ops.py (original) +++ branches/frame_order/maths_fns/frame_order_matrix_ops.py Thu Jun 25 13:45:54 2009 @@ -31,7 +31,7 @@ # relax module imports. from float import isNaN from maths_fns.kronecker_product import kron_prod, transpose_14 -from maths_fns.rotation_matrix import R_axis_angle +from maths_fns.rotation_matrix import R_2vect def compile_2nd_matrix_iso_cone(matrix, R, z_axis, cone_axis, theta_axis, phi_axis, theta_cone): @@ -56,14 +56,8 @@ # Generate the cone axis from the spherical angles. generate_vector(cone_axis, theta_axis, phi_axis) - # The axis of rotation (cross product of the z-axis and cone axis). - mu_rot = cross(z_axis, cone_axis) - mu_len = norm(mu_rot) - if mu_len != 0.0: - mu_rot = mu_rot / mu_len - # Generate the rotation matrix. - R_axis_angle(R, mu_rot, theta_axis) + R_2vect(R, z_axis, cone_axis) # The outer product of R. R_kron = kron_prod(R, R)