Author: bugman Date: Mon Jun 16 17:39:25 2014 New Revision: 23979 URL: http://svn.gna.org/viewcvs/relax?rev=23979&view=rev Log: Fixes for all PCS numeric integration for all frame order models in the rigid case. The exact PCS values for the rigid state are now correctly calculated when no Sobol' points lie within the motional model. The identity matrix is used to set the rotation to zero, and the PCS values are now multiplied by the constant. Modified: branches/frame_order_cleanup/lib/frame_order/double_rotor.py branches/frame_order_cleanup/lib/frame_order/iso_cone.py branches/frame_order_cleanup/lib/frame_order/iso_cone_torsionless.py branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py branches/frame_order_cleanup/lib/frame_order/rotor.py Modified: branches/frame_order_cleanup/lib/frame_order/double_rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/double_rotor.py?rev=23979&r1=23978&r2=23979&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/double_rotor.py (original) +++ branches/frame_order_cleanup/lib/frame_order/double_rotor.py Mon Jun 16 17:39:25 2014 @@ -136,11 +136,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_double_rotor(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: Modified: branches/frame_order_cleanup/lib/frame_order/iso_cone.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/iso_cone.py?rev=23979&r1=23978&r2=23979&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/iso_cone.py (original) +++ branches/frame_order_cleanup/lib/frame_order/iso_cone.py Mon Jun 16 17:39:25 2014 @@ -24,7 +24,7 @@ # Python module imports. from math import cos, pi, sqrt -from numpy import divide, dot, multiply, sinc, swapaxes, tensordot +from numpy import divide, dot, eye, float64, multiply, sinc, swapaxes, tensordot # relax module imports. from lib.frame_order.matrix_ops import pcs_pivot_motion_full_qrint, rotate_daeg @@ -115,11 +115,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_full_qrint(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: Modified: branches/frame_order_cleanup/lib/frame_order/iso_cone_torsionless.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/iso_cone_torsionless.py?rev=23979&r1=23978&r2=23979&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/iso_cone_torsionless.py (original) +++ branches/frame_order_cleanup/lib/frame_order/iso_cone_torsionless.py Mon Jun 16 17:39:25 2014 @@ -24,7 +24,7 @@ # Python module imports. from math import cos, sqrt -from numpy import divide, dot, multiply, swapaxes, tensordot +from numpy import divide, dot, eye, float64, multiply, swapaxes, tensordot # relax module imports. from lib.frame_order.matrix_ops import pcs_pivot_motion_torsionless_qrint, rotate_daeg @@ -135,11 +135,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_torsionless_qrint(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: 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=23979&r1=23978&r2=23979&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 17:39:25 2014 @@ -24,7 +24,7 @@ # Python module imports. from math import cos, pi, sin, sqrt -from numpy import divide, dot, multiply, repeat, sinc, swapaxes, tensordot, tile +from numpy import divide, dot, eye, float64, multiply, repeat, sinc, swapaxes, tensordot, tile try: from scipy.integrate import quad except ImportError: @@ -659,11 +659,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_full_qrint(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: 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=23979&r1=23978&r2=23979&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 17:39:25 2014 @@ -24,7 +24,7 @@ # Python module imports. from math import cos, pi, sin, sqrt -from numpy import divide, dot, multiply, swapaxes, tensordot +from numpy import divide, dot, eye, float64, multiply, swapaxes, tensordot try: from scipy.integrate import quad except ImportError: @@ -328,11 +328,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_torsionless_qrint(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: Modified: branches/frame_order_cleanup/lib/frame_order/rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/rotor.py?rev=23979&r1=23978&r2=23979&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/rotor.py (original) +++ branches/frame_order_cleanup/lib/frame_order/rotor.py Mon Jun 16 17:39:25 2014 @@ -136,11 +136,16 @@ # Default to the rigid state if no points lie in the distribution. if num == 0: - # Fast frame shift. - Ri = dot(R_eigen, tensordot(R_eigen, RT_eigen, axes=1)) + # Fast identity frame shift. + Ri_prime = eye(3, dtype=float64) + Ri = dot(R_eigen, tensordot(Ri_prime, RT_eigen, axes=1)) + Ri = swapaxes(Ri, 0, 1) # Calculate the PCSs for this state. pcs_pivot_motion_rotor_qrint(full_in_ref_frame=full_in_ref_frame, r_pivot_atom=r_pivot_atom, r_pivot_atom_rev=r_pivot_atom_rev, r_ln_pivot=r_ln_pivot, A=A, Ri=Ri, pcs_theta=pcs_theta, pcs_theta_err=pcs_theta_err, missing_pcs=missing_pcs) + + # Multiply the constant. + multiply(c, pcs_theta, pcs_theta) # Average the PCS. else: