Author: bugman Date: Thu Aug 12 13:35:48 2010 New Revision: 11490 URL: http://svn.gna.org/viewcvs/relax?rev=11490&view=rev Log: The rotor frame order model is now functional. Modified: 1.3/maths_fns/frame_order.py 1.3/maths_fns/frame_order_matrix_ops.py Modified: 1.3/maths_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order.py?rev=11490&r1=11489&r2=11490&view=diff ============================================================================== --- 1.3/maths_fns/frame_order.py (original) +++ 1.3/maths_fns/frame_order.py Thu Aug 12 13:35:48 2010 @@ -31,7 +31,7 @@ from generic_fns.frame_order import print_frame_order_2nd_degree from maths_fns.alignment_tensor import to_5D, to_tensor from maths_fns.chi2 import chi2 -from maths_fns.frame_order_matrix_ops import compile_2nd_matrix_free_rotor, compile_2nd_matrix_iso_cone, compile_2nd_matrix_iso_cone_free_rotor,compile_2nd_matrix_iso_cone_torsionless, compile_2nd_matrix_pseudo_ellipse, compile_2nd_matrix_pseudo_ellipse_free_rotor, compile_2nd_matrix_pseudo_ellipse_torsionless, reduce_alignment_tensor +from maths_fns.frame_order_matrix_ops import compile_2nd_matrix_free_rotor, compile_2nd_matrix_iso_cone, compile_2nd_matrix_iso_cone_free_rotor,compile_2nd_matrix_iso_cone_torsionless, compile_2nd_matrix_pseudo_ellipse, compile_2nd_matrix_pseudo_ellipse_free_rotor, compile_2nd_matrix_pseudo_ellipse_torsionless, compile_2nd_matrix_rotor, reduce_alignment_tensor from maths_fns.rotation_matrix import euler_to_R_zyz as euler_to_R from relax_errors import RelaxError @@ -403,10 +403,10 @@ """ # Unpack the parameters. - ave_pos_alpha, ave_pos_beta, ave_pos_gamma, axis_theta, axis_phi, sigma_max = params - - # Generate the 2nd degree Frame Order super matrix. - frame_order_2nd = compile_2nd_matrix_rotor(self.frame_order_2nd, self.rot, self.z_axis, self.cone_axis, axis_theta, axis_phi, sigma_max) + ave_pos_alpha, ave_pos_beta, ave_pos_gamma, eigen_alpha, eigen_beta, eigen_gamma, sigma_max = params + + # Generate the 2nd degree Frame Order super matrix. + frame_order_2nd = compile_2nd_matrix_rotor(self.frame_order_2nd, self.rot, eigen_alpha, eigen_beta, eigen_gamma, sigma_max) # Reduce and rotate the tensors. self.reduce_and_rot(ave_pos_alpha, ave_pos_beta, ave_pos_gamma, frame_order_2nd) Modified: 1.3/maths_fns/frame_order_matrix_ops.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order_matrix_ops.py?rev=11490&r1=11489&r2=11490&view=diff ============================================================================== --- 1.3/maths_fns/frame_order_matrix_ops.py (original) +++ 1.3/maths_fns/frame_order_matrix_ops.py Thu Aug 12 13:35:48 2010 @@ -402,7 +402,7 @@ return rotate_daeg(matrix, R) -def compile_2nd_matrix_rotor(matrix, R, z_axis, cone_axis, theta_axis, phi_axis, smax): +def compile_2nd_matrix_rotor(matrix, R, eigen_alpha, eigen_beta, eigen_gamma, smax): """Generate the rotated 2nd degree Frame Order matrix for the rotor model. The cone axis is assumed to be parallel to the z-axis in the eigenframe. @@ -412,14 +412,12 @@ @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 eigen_alpha: The eigenframe rotation alpha Euler angle. + @type eigen_alpha: float + @param eigen_beta: The eigenframe rotation beta Euler angle. + @type eigen_beta: float + @param eigen_gamma: The eigenframe rotation gamma Euler angle. + @type eigen_gamma: float @param smax: The maximum torsion angle. @type smax: float """ @@ -450,11 +448,8 @@ # Off diagonal set 2. matrix[1, 3] = matrix[3, 1] = -matrix[0, 4] - # Generate the cone axis from the spherical angles. - spherical_to_cartesian([1.0, theta_axis, phi_axis], cone_axis) - # Average position rotation. - two_vect_to_R(z_axis, cone_axis, R) + euler_to_R_zyz(eigen_alpha, eigen_beta, eigen_gamma, R) # Rotate and return the frame order matrix. return rotate_daeg(matrix, R)