Author: bugman Date: Mon Jun 16 18:10:07 2014 New Revision: 23982 URL: http://svn.gna.org/viewcvs/relax?rev=23982&view=rev Log: The rigid frame order matrix for the pseudo-ellipse models is now correctly handled. This allows the rigid case RDCs to be correctly calculated for both the pseudo-ellipse and torsionless pseudo-ellipse models. The previous catch of the theta_x cone angle of zero was incorrectly recreating the frame order matrix, which really should be the identity matrix. However truncation artifacts due to the quadratic SciPy integration still cause the model to be ill-conditioned near the rigid case. The rigid case is correctly handled, but a tiny shift of the parameters off zero cause a discontinuity. Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py?rev=23982&r1=23981&r2=23982&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py (original) +++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py Mon Jun 16 18:10:07 2014 @@ -71,6 +71,16 @@ @param sigma_max: The maximum torsion angle. @type sigma_max: float """ + + # The rigid case. + if theta_x == 0.0 and sigma_max == 0.0: + # Set up the matrix as the identity. + matrix[:] = 0.0 + for i in range(len(matrix)): + matrix[i, i] = 1.0 + + # Rotate and return the frame order matrix. + return rotate_daeg(matrix, Rx2_eigen) # The surface area normalisation factor. fact = 12.0 * pec(theta_x, theta_y) Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py?rev=23982&r1=23981&r2=23982&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py (original) +++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py Mon Jun 16 18:10:07 2014 @@ -49,11 +49,18 @@ @type theta_y: float """ + # The rigid case. + if theta_x == 0.0: + # Set up the matrix as the identity. + matrix[:] = 0.0 + for i in range(len(matrix)): + matrix[i, i] = 1.0 + + # Rotate and return the frame order matrix. + return rotate_daeg(matrix, Rx2_eigen) + # The surface area normalisation factor. - if theta_x == 0.0: - fact = 0.0 - else: - fact = 1.0 / (6.0 * pec(theta_x, theta_y)) + fact = 1.0 / (6.0 * pec(theta_x, theta_y)) # Diagonal. matrix[0, 0] = fact * (6.0*pi + quad(part_int_daeg2_pseudo_ellipse_torsionless_00, -pi, pi, args=(theta_x, theta_y), full_output=1)[0])