Author: bugman Date: Sun Nov 2 22:14:55 2014 New Revision: 26418 URL: http://svn.gna.org/viewcvs/relax?rev=26418&view=rev Log: Implemented the compile_1st_matrix_iso_cone_free_rotor() function. This is for the lib.frame_order.iso_cone_free_rotor module. The function will calculate the 1st degree in-frame frame order matrix for the free rotor isotropic cone model. Modified: branches/frame_order_cleanup/lib/frame_order/iso_cone_free_rotor.py Modified: branches/frame_order_cleanup/lib/frame_order/iso_cone_free_rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/iso_cone_free_rotor.py?rev=26418&r1=26417&r2=26418&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/iso_cone_free_rotor.py (original) +++ branches/frame_order_cleanup/lib/frame_order/iso_cone_free_rotor.py Sun Nov 2 22:14:55 2014 @@ -28,6 +28,27 @@ # relax module imports. from lib.order import order_parameters from lib.frame_order.matrix_ops import rotate_daeg + + +def compile_1st_matrix_iso_cone_free_rotor(matrix, R_eigen, cone_theta): + """Generate the 1st degree Frame Order matrix for the free rotor isotropic cone. + + @param matrix: The Frame Order matrix, 1st degree to be populated. + @type matrix: numpy 3D, rank-2 array + @param R_eigen: The eigenframe rotation matrix. + @type R_eigen: numpy 3D, rank-2 array + @param cone_theta: The cone opening angle. + @type cone_theta: float + """ + + # Zeros. + matrix[:] = 0.0 + + # Diagonal values. + matrix[2, 2] = cos(cone_theta) + 1.0 + + # Rotate and return the frame order matrix. + return 0.5 * rotate_daeg(matrix, R_eigen) def compile_2nd_matrix_iso_cone_free_rotor(matrix, Rx2_eigen, s1):