Author: bugman Date: Wed Aug 4 09:56:49 2010 New Revision: 11399 URL: http://svn.gna.org/viewcvs/relax?rev=11399&view=rev Log: Simplified and sped up the torsionless pseudo ellipse. 6 functions, and hence 6 numerical integrations, have been deleted as they are repetitive of other frame order matrix elements. Modified: 1.3/maths_fns/frame_order_matrix_ops.py 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=11399&r1=11398&r2=11399&view=diff ============================================================================== --- 1.3/maths_fns/frame_order_matrix_ops.py (original) +++ 1.3/maths_fns/frame_order_matrix_ops.py Wed Aug 4 09:56:49 2010 @@ -218,11 +218,11 @@ matrix[0, 0] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_00, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] matrix[1, 1] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_11, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] matrix[2, 2] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_22, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] - matrix[3, 3] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_33, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] + matrix[3, 3] = matrix[1, 1] matrix[4, 4] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_44, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] matrix[5, 5] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_55, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] - matrix[6, 6] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_66, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] - matrix[7, 7] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_77, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] + matrix[6, 6] = matrix[2, 2] + matrix[7, 7] = matrix[5, 5] matrix[8, 8] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_88, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] # Off diagonal set 1. @@ -231,9 +231,9 @@ matrix[4, 8] = matrix[8, 4] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_48, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] # Off diagonal set 2. - matrix[1, 3] = matrix[3, 1] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_13, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] - matrix[2, 6] = matrix[6, 2] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_26, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] - matrix[5, 7] = matrix[7, 5] = fact * quad(part_int_daeg2_pseudo_ellipse_torsionless_57, -pi, pi, args=(theta_x, theta_y), full_output=1)[0] + matrix[1, 3] = matrix[3, 1] = matrix[0, 4] + matrix[2, 6] = matrix[6, 2] = -matrix[0, 8] + matrix[5, 7] = matrix[7, 5] = -matrix[4, 8] # Average position rotation. euler_to_R_zyz(eigen_alpha, eigen_beta, eigen_gamma, R) @@ -928,26 +928,6 @@ return (cos(phi)**2*sin(phi)**2*sin(2.0*tmax) + (4.0*sin(phi)**4 + 4.0*cos(phi)**4)*sin(tmax) + 6*cos(phi)**2*sin(phi)**2*tmax) -def part_int_daeg2_pseudo_ellipse_torsionless_13(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 24 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return (cos(phi)**2*sin(phi)**2*sin(2.0*tmax) - 8.0*cos(phi)**2*sin(phi)**2*sin(tmax) + 6*cos(phi)**2*sin(phi)**2*tmax) - - def part_int_daeg2_pseudo_ellipse_torsionless_22(phi, x, y): """The theta partial integral of the 2nd degree Frame Order matrix element 33 for the torsionless pseudo-ellipse. @@ -968,46 +948,6 @@ return (cos(phi)**2*sin(2.0*tmax) + 4.0*sin(phi)**2*sin(tmax) + 2.0*cos(phi)**2*tmax) -def part_int_daeg2_pseudo_ellipse_torsionless_26(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 37 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return (cos(phi)**2*sin(2.0*tmax) - 2.0*cos(phi)**2*tmax) - - -def part_int_daeg2_pseudo_ellipse_torsionless_33(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 44 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return (cos(phi)**2*sin(phi)**2*sin(2.0*tmax) + (4.0*sin(phi)**4 + 4.0*cos(phi)**4)*sin(tmax) + 6*cos(phi)**2*sin(phi)**2*tmax) - - def part_int_daeg2_pseudo_ellipse_torsionless_44(phi, x, y): """The theta partial integral of the 2nd degree Frame Order matrix element 55 for the torsionless pseudo-ellipse. @@ -1050,66 +990,6 @@ def part_int_daeg2_pseudo_ellipse_torsionless_55(phi, x, y): """The theta partial integral of the 2nd degree Frame Order matrix element 66 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return sin(phi)**2*sin(2.0*tmax) + 4.0*cos(phi)**2*sin(tmax) + 2.0*sin(phi)**2*tmax - - -def part_int_daeg2_pseudo_ellipse_torsionless_57(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 68 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return sin(phi)**2*sin(2.0*tmax) - 2.0*sin(phi)**2*tmax - - -def part_int_daeg2_pseudo_ellipse_torsionless_66(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 77 for the torsionless pseudo-ellipse. - - @param phi: The azimuthal tilt-torsion angle. - @type phi: float - @param x: The cone opening angle along x. - @type x: float - @param y: The cone opening angle along y. - @type y: float - @return: The theta partial integral. - @rtype: float - """ - - # Theta max. - tmax = tmax_pseudo_ellipse(phi, x, y) - - # The theta integral. - return cos(phi)**2*sin(2.0*tmax) + 4.0*sin(phi)**2*sin(tmax) + 2.0*cos(phi)**2*tmax - - -def part_int_daeg2_pseudo_ellipse_torsionless_77(phi, x, y): - """The theta partial integral of the 2nd degree Frame Order matrix element 88 for the torsionless pseudo-ellipse. @param phi: The azimuthal tilt-torsion angle. @type phi: float