Author: bugman Date: Mon Mar 4 18:46:51 2013 New Revision: 18623 URL: http://svn.gna.org/viewcvs/relax?rev=18623&view=rev Log: Fixes for the PCS with translations and rotations. The reverse rotations previously used have been converted to forwards rotations. This makes more sense from the perspective of moving the original structures to the average position. Modified: branches/frame_order_testing/maths_fns/frame_order/__init__.py branches/frame_order_testing/maths_fns/frame_order/matrix_ops.py branches/frame_order_testing/maths_fns/frame_order/rotor.py Modified: branches/frame_order_testing/maths_fns/frame_order/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/maths_fns/frame_order/__init__.py?rev=18623&r1=18622&r2=18623&view=diff ============================================================================== --- branches/frame_order_testing/maths_fns/frame_order/__init__.py (original) +++ branches/frame_order_testing/maths_fns/frame_order/__init__.py Mon Mar 4 18:46:51 2013 @@ -472,9 +472,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_rotor(sigma_max=pi, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -646,9 +646,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_iso_cone(theta_max=cone_theta, sigma_max=sigma_max, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -822,9 +822,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_iso_cone(theta_max=theta_max, sigma_max=pi, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -998,9 +998,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_iso_cone_torsionless(theta_max=cone_theta, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -1168,9 +1168,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_pseudo_ellipse(theta_x=cone_theta_x, theta_y=cone_theta_y, sigma_max=cone_sigma_max, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -1335,9 +1335,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_pseudo_ellipse(theta_x=cone_theta_x, theta_y=cone_theta_y, sigma_max=pi, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -1541,9 +1541,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_pseudo_ellipse_torsionless(theta_x=cone_theta_x, theta_y=cone_theta_y, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) @@ -1691,9 +1691,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The PCS calculation. vect = self.r_ln_pivot[:, 0] + r_pivot_atom @@ -1784,9 +1784,9 @@ if not self.missing_pcs[align_index, j]: # Forwards and reverse rotations. if self.full_in_ref_frame[align_index]: + r_pivot_atom = self.r_pivot_atom[:, j] + else: r_pivot_atom = self.r_pivot_atom_rev[:, j] - else: - r_pivot_atom = self.r_pivot_atom[:, j] # The numerical integration. self.pcs_theta[align_index, j] = pcs_numeric_int_rotor(sigma_max=sigma_max, c=self.pcs_const[align_index], r_pivot_atom=r_pivot_atom, r_ln_pivot=self.r_ln_pivot[:, 0], A=self.A_3D[align_index], R_eigen=self.R_eigen, RT_eigen=RT_eigen, Ri_prime=self.Ri_prime) Modified: branches/frame_order_testing/maths_fns/frame_order/matrix_ops.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/maths_fns/frame_order/matrix_ops.py?rev=18623&r1=18622&r2=18623&view=diff ============================================================================== --- branches/frame_order_testing/maths_fns/frame_order/matrix_ops.py (original) +++ branches/frame_order_testing/maths_fns/frame_order/matrix_ops.py Mon Mar 4 18:46:51 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2009-2012 Edward d'Auvergne # +# Copyright (C) 2009-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -212,11 +212,11 @@ # The projection. if full_in_ref_frame[i]: + proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) + length_i = length + else: proj = dot(rot_vect_rev[j], dot(A[i], rot_vect_rev[j])) length_i = length_rev - else: - proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) - length_i = length # The PCS. pcs_theta[i, j] += proj * length_i @@ -356,11 +356,11 @@ # The projection. if full_in_ref_frame[i]: + proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) + length_i = length + else: proj = dot(rot_vect_rev[j], dot(A[i], rot_vect_rev[j])) length_i = length_rev - else: - proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) - length_i = length # The PCS. pcs_theta[i, j] += proj * length_i Modified: branches/frame_order_testing/maths_fns/frame_order/rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/maths_fns/frame_order/rotor.py?rev=18623&r1=18622&r2=18623&view=diff ============================================================================== --- branches/frame_order_testing/maths_fns/frame_order/rotor.py (original) +++ branches/frame_order_testing/maths_fns/frame_order/rotor.py Mon Mar 4 18:46:51 2013 @@ -303,11 +303,11 @@ # The projection. if full_in_ref_frame[i]: + proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) + length_i = length + else: proj = dot(rot_vect_rev[j], dot(A[i], rot_vect_rev[j])) length_i = length_rev - else: - proj = dot(rot_vect[j], dot(A[i], rot_vect[j])) - length_i = length # The PCS. pcs_theta[i, j] += proj * length_i