mailr17954 - in /branches/frame_order_testing/maths_fns/frame_order: __init__.py matrix_ops.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 02, 2012 - 18:22:
Author: bugman
Date: Fri Nov  2 18:22:37 2012
New Revision: 17954

URL: http://svn.gna.org/viewcvs/relax?rev=17954&view=rev
Log:
The Ri_prime matrices are now pre-calculated prior to the function calls.

After profiling, this change has a minimal, barely noticeable impact.


Modified:
    branches/frame_order_testing/maths_fns/frame_order/__init__.py
    branches/frame_order_testing/maths_fns/frame_order/matrix_ops.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=17954&r1=17953&r2=17954&view=diff
==============================================================================
--- branches/frame_order_testing/maths_fns/frame_order/__init__.py (original)
+++ branches/frame_order_testing/maths_fns/frame_order/__init__.py Fri Nov  2 
18:22:37 2012
@@ -51,8 +51,7 @@
 from maths_fns.kronecker_product import kron_prod
 from maths_fns import order_parameters
 from maths_fns.pcs import pcs_tensor
-from maths_fns.rotation_matrix import euler_to_R_zyz
-from maths_fns.rotation_matrix import two_vect_to_R
+from maths_fns.rotation_matrix import euler_to_R_zyz, tilt_torsion_to_R, 
two_vect_to_R
 from maths_fns.rdc import rdc_tensor
 from multi import fetch_data, Processor_box
 from physical_constants import pcs_constant
@@ -334,6 +333,14 @@
                 self.create_sobol_data(n=self.num_int_pts, dims=['sigma'])
                 self.func = self.func_free_rotor_qrint
 
+            # Pre-calculate the rotation matrices Ri_prime from the Sobol' 
angles.
+            for i in range(self.num_int_pts):
+                # Unpack the angles.
+                theta, phi, sigma = self.sobol_angles[i]
+
+                # The rotation matrix.
+                tilt_torsion_to_R(phi, theta, sigma, self.Ri_prime[i])
+
             # Subdivide the Sobol' data points for the slave processors.
             blocks_sobol = []
             for block in self.subdivide(self.sobol_angles, 
self.processor.processor_size()):

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=17954&r1=17953&r2=17954&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 Fri Nov  
2 18:22:37 2012
@@ -29,7 +29,6 @@
 
 # relax module imports.
 from maths_fns.kronecker_product import transpose_23
-from maths_fns.rotation_matrix import tilt_torsion_to_R
 
 
 def daeg_to_rotational_superoperator(daeg, Rsuper):
@@ -188,9 +187,6 @@
     @type error_flag:           bool
     """
 
-    # The rotation matrix.
-    tilt_torsion_to_R(phi_i, theta_i, sigma_i, Ri_prime)
-
     # The rotation.
     R_i = dot(R_eigen, dot(Ri_prime, RT_eigen))
 




Related Messages


Powered by MHonArc, Updated Tue Nov 13 14:40:03 2012