Author: bugman Date: Thu Jul 2 02:58:54 2009 New Revision: 9173 URL: http://svn.gna.org/viewcvs/relax?rev=9173&view=rev Log: Partly reverted r9167 - the previous revision. The command used was: svn merge -r9167:9166 maths_fns/frame_order_matrix_ops.py This returns the cone axis. 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=9173&r1=9172&r2=9173&view=diff ============================================================================== --- branches/frame_order/maths_fns/frame_order_matrix_ops.py (original) +++ branches/frame_order/maths_fns/frame_order_matrix_ops.py Thu Jul 2 02:58:54 2009 @@ -25,38 +25,45 @@ # Python module imports. from math import cos, sin -from numpy import dot, transpose +from numpy import cross, dot, transpose +from numpy.linalg import norm # relax module imports. +from float import isNaN from maths_fns.kronecker_product import kron_prod, transpose_14 -from maths_fns.rotation_matrix import R_euler_zyz - - -def compile_2nd_matrix_iso_cone(matrix, R, alpha, beta, gamma, theta): +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): """Generate the rotated 2nd degree Frame Order matrix. - @param matrix: The Frame Order matrix, 2nd degree to be populated. - @type matrix: numpy 9D, rank-2 array - @param R: The rotation matrix to be populated. - @type R: numpy 3D, rank-2 array - @param alpha: The alpha Euler angle in radians. - @type alpha: float - @param beta: The beta Euler angle in radians. - @type beta: float - @param gamma: The gamma Euler angle in radians. - @type gamma: float - @param theta: The cone angle in radians. - @type theta: float - """ + @param matrix: The Frame Order matrix, 2nd degree to be populated. + @type matrix: numpy 9D, rank-2 array + @param R: The rotation matrix to be populated. + @type R: numpy 3D, rank-2 array + @param z_axis: The molecular frame z-axis from which the cone axis is rotated from. + @type z_axis: numpy 3D, rank-1 array + @param cone_axis: The storage structure for the cone axis. + @type cone_axis: numpy 3D, rank-1 array + @param theta_axis: The cone axis polar angle. + @type theta_axis: float + @param phi_axis: The cone axis azimuthal angle. + @type phi_axis: float + @param theta_cone: The cone angle in radians. + @type theta_cone: float + """ + + # Generate the cone axis from the spherical angles. + generate_vector(cone_axis, theta_axis, phi_axis) # Generate the rotation matrix. - R_euler_zyz(R, alpha, beta, gamma) + R_2vect(R, z_axis, cone_axis) # The outer product of R. R_kron = kron_prod(R, R) # Populate the Frame Order matrix in the eigenframe. - populate_2nd_eigenframe_iso_cone(matrix, theta) + populate_2nd_eigenframe_iso_cone(matrix, theta_cone) # Perform the T14 transpose to obtain the Kronecker product matrix! matrix = transpose_14(matrix)