Author: bugman Date: Tue Jan 12 13:32:12 2010 New Revision: 10180 URL: http://svn.gna.org/viewcvs/relax?rev=10180&view=rev Log: Renamed all euler_ijk_to_R() functions to euler_to_R_ijk(). Modified: 1.3/maths_fns/frame_order.py 1.3/maths_fns/n_state_model.py 1.3/maths_fns/rotation_matrix.py 1.3/specific_fns/n_state_model.py Modified: 1.3/maths_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order.py?rev=10180&r1=10179&r2=10180&view=diff ============================================================================== --- 1.3/maths_fns/frame_order.py (original) +++ 1.3/maths_fns/frame_order.py Tue Jan 12 13:32:12 2010 @@ -32,7 +32,7 @@ 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_iso_cone, reduce_alignment_tensor -from maths_fns.rotation_matrix import euler_zyz_to_R as euler_to_R +from maths_fns.rotation_matrix import euler_to_R_zyz as euler_to_R from relax_errors import RelaxError Modified: 1.3/maths_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/n_state_model.py?rev=10180&r1=10179&r2=10180&view=diff ============================================================================== --- 1.3/maths_fns/n_state_model.py (original) +++ 1.3/maths_fns/n_state_model.py Tue Jan 12 13:32:12 2010 @@ -29,7 +29,7 @@ from float import isNaN from pcs import ave_pcs_tensor, ave_pcs_tensor_ddeltaij_dAmn, pcs_tensor from rdc import ave_rdc_tensor, ave_rdc_tensor_dDij_dAmn, rdc_tensor -from rotation_matrix import euler_zyz_to_R +from rotation_matrix import euler_to_R_zyz class N_state_opt: @@ -351,7 +351,7 @@ # Loop over the N states. for c in xrange(self.N): # The rotation matrix. - euler_zyz_to_R(params[self.N-1+3*c], params[self.N-1+3*c+1], params[self.N-1+3*c+2], self.R[c]) + euler_to_R_zyz(params[self.N-1+3*c], params[self.N-1+3*c+1], params[self.N-1+3*c+2], self.R[c]) # Its transpose. self.RT[c] = transpose(self.R[c]) Modified: 1.3/maths_fns/rotation_matrix.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/rotation_matrix.py?rev=10180&r1=10179&r2=10180&view=diff ============================================================================== --- 1.3/maths_fns/rotation_matrix.py (original) +++ 1.3/maths_fns/rotation_matrix.py Tue Jan 12 13:32:12 2010 @@ -420,7 +420,7 @@ quat[1:] = axis * sin(angle/2) -def euler_xyx_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_xyx(alpha, beta, gamma): """Convert the xyx Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -439,13 +439,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_xyx_to_R(alpha, beta, gamma, R) + euler_to_R_xyx(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_xyx_to_R(alpha, beta, gamma, R): +def euler_to_R_xyx(alpha, beta, gamma, R): """Generate the x-y-x Euler angle convention rotation matrix. Rotation matrix @@ -505,7 +505,7 @@ R[2, 2] = -sin_a * sin_g + cos_a * cos_b * cos_g -def euler_xyz_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_xyz(alpha, beta, gamma): """Convert the xyz Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -524,13 +524,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_xyz_to_R(alpha, beta, gamma, R) + euler_to_R_xyz(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_xyz_to_R(alpha, beta, gamma, R): +def euler_to_R_xyz(alpha, beta, gamma, R): """Generate the x-y-z Euler angle convention rotation matrix. Rotation matrix @@ -590,7 +590,7 @@ R[2, 2] = cos_a * cos_b -def euler_xzx_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_xzx(alpha, beta, gamma): """Convert the xzx Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -615,7 +615,7 @@ return R_to_axis_angle(R) -def euler_xzx_to_R(alpha, beta, gamma, R): +def euler_to_R_xzx(alpha, beta, gamma, R): """Generate the x-z-x Euler angle convention rotation matrix. Rotation matrix @@ -675,7 +675,7 @@ R[2, 2] = cos_a * cos_g - sin_a * cos_b * sin_g -def euler_xzy_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_xzy(alpha, beta, gamma): """Convert the xzy Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -694,13 +694,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_xzy_to_R(alpha, beta, gamma, R) + euler_to_R_xzy(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_xzy_to_R(alpha, beta, gamma, R): +def euler_to_R_xzy(alpha, beta, gamma, R): """Generate the x-z-y Euler angle convention rotation matrix. Rotation matrix @@ -760,7 +760,7 @@ R[2, 2] = cos_a * cos_g - sin_a * sin_b * sin_g -def euler_yxy_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_yxy(alpha, beta, gamma): """Convert the yxy Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -779,13 +779,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_yxy_to_R(alpha, beta, gamma, R) + euler_to_R_yxy(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_yxy_to_R(alpha, beta, gamma, R): +def euler_to_R_yxy(alpha, beta, gamma, R): """Generate the y-x-y Euler angle convention rotation matrix. Rotation matrix @@ -845,7 +845,7 @@ R[2, 2] = -sin_a * sin_g + cos_a * cos_b * cos_g -def euler_yxz_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_yxz(alpha, beta, gamma): """Convert the yxz Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -864,13 +864,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_yxz_to_R(alpha, beta, gamma, R) + euler_to_R_yxz(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_yxz_to_R(alpha, beta, gamma, R): +def euler_to_R_yxz(alpha, beta, gamma, R): """Generate the y-x-z Euler angle convention rotation matrix. Rotation matrix @@ -930,7 +930,7 @@ R[2, 2] = cos_a * cos_b -def euler_yzx_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_yzx(alpha, beta, gamma): """Convert the yzx Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -949,13 +949,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_yzx_to_R(alpha, beta, gamma, R) + euler_to_R_yzx(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_yzx_to_R(alpha, beta, gamma, R): +def euler_to_R_yzx(alpha, beta, gamma, R): """Generate the y-z-x Euler angle convention rotation matrix. Rotation matrix @@ -1015,7 +1015,7 @@ R[2, 2] = cos_a * cos_g + sin_a * sin_b * sin_g -def euler_yzy_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_yzy(alpha, beta, gamma): """Convert the yzy Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -1034,13 +1034,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_yzy_to_R(alpha, beta, gamma, R) + euler_to_R_yzy(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_yzy_to_R(alpha, beta, gamma, R): +def euler_to_R_yzy(alpha, beta, gamma, R): """Generate the y-z-y Euler angle convention rotation matrix. Rotation matrix @@ -1100,7 +1100,7 @@ R[2, 2] = cos_a * cos_g - sin_a * cos_b * sin_g -def euler_zxy_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_zxy(alpha, beta, gamma): """Convert the zxy Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -1119,13 +1119,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_zxy_to_R(alpha, beta, gamma, R) + euler_to_R_zxy(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_zxy_to_R(alpha, beta, gamma, R): +def euler_to_R_zxy(alpha, beta, gamma, R): """Generate the z-x-y Euler angle convention rotation matrix. Rotation matrix @@ -1185,7 +1185,7 @@ R[2, 2] = cos_b * cos_g -def euler_zxz_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_zxz(alpha, beta, gamma): """Convert the zxz Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -1204,13 +1204,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_zxz_to_R(alpha, beta, gamma, R) + euler_to_R_zxz(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_zxz_to_R(alpha, beta, gamma, R): +def euler_to_R_zxz(alpha, beta, gamma, R): """Generate the z-x-z Euler angle convention rotation matrix. Rotation matrix @@ -1270,7 +1270,7 @@ R[2, 2] = cos_b -def euler_zyx_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_zyx(alpha, beta, gamma): """Convert the zyx Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -1289,13 +1289,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_zyx_to_R(alpha, beta, gamma, R) + euler_to_R_zyx(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_zyx_to_R(alpha, beta, gamma, R): +def euler_to_R_zyx(alpha, beta, gamma, R): """Generate the z-y-x Euler angle convention rotation matrix. Rotation matrix @@ -1355,7 +1355,7 @@ R[2, 2] = cos_b * cos_g -def euler_zyz_to_axis_angle(alpha, beta, gamma): +def euler_to_axis_angle_zyz(alpha, beta, gamma): """Convert the zyz Euler angles to axis-angle notation. This function first generates a rotation matrix via euler_*_to_R() and then uses R_to_axis_angle() to convert to the axis and angle notation. @@ -1374,13 +1374,13 @@ R = zeros((3, 3), float64) # Get the rotation. - euler_zyz_to_R(alpha, beta, gamma, R) + euler_to_R_zyz(alpha, beta, gamma, R) # Return the axis and angle. return R_to_axis_angle(R) -def euler_zyz_to_R(alpha, beta, gamma, R): +def euler_to_R_zyz(alpha, beta, gamma, R): """Generate the z-y-z Euler angle convention rotation matrix. Rotation matrix Modified: 1.3/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=10180&r1=10179&r2=10180&view=diff ============================================================================== --- 1.3/specific_fns/n_state_model.py (original) +++ 1.3/specific_fns/n_state_model.py Tue Jan 12 13:32:12 2010 @@ -45,7 +45,7 @@ import generic_fns.structure.mass from maths_fns.n_state_model import N_state_opt from maths_fns.potential import quad_pot -from maths_fns.rotation_matrix import two_vect_to_R, euler_zyz_to_R +from maths_fns.rotation_matrix import two_vect_to_R, euler_to_R_zyz from physical_constants import dipolar_constant, g1H, pcs_constant, return_gyromagnetic_ratio from relax_errors import RelaxError, RelaxInfError, RelaxModelError, RelaxNaNError, RelaxNoModelError, RelaxNoTensorError from relax_io import open_write_file @@ -301,7 +301,7 @@ # Loop over the N states. for c in xrange(cdp.N): # Generate the rotation matrix. - euler_zyz_to_R(cdp.alpha[c], cdp.beta[c], cdp.gamma[c], R) + euler_to_R_zyz(cdp.alpha[c], cdp.beta[c], cdp.gamma[c], R) # Rotate the unit vector. vectors[c] = dot(R, unit_vect)