mailr25815 - /branches/frame_order_cleanup/test_suite/system_tests/frame_order.py


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

Header


Content

Posted by edward on September 14, 2014 - 11:33:
Author: bugman
Date: Sun Sep 14 11:33:37 2014
New Revision: 25815

URL: http://svn.gna.org/viewcvs/relax?rev=25815&view=rev
Log:
Alphabetical ordering of most of the Frame_order system tests.


Modified:
    branches/frame_order_cleanup/test_suite/system_tests/frame_order.py

Modified: branches/frame_order_cleanup/test_suite/system_tests/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/frame_order.py?rev=25815&r1=25814&r2=25815&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/system_tests/frame_order.py 
(original)
+++ branches/frame_order_cleanup/test_suite/system_tests/frame_order.py Sun 
Sep 14 11:33:37 2014
@@ -333,8 +333,8 @@
         self.assertAlmostEqual(cdp.eigen_gamma, gamma)
 
 
-    def test_axis_perm_x_le_z_le_y_permB(self):
-        """Test the operation of the frame_order.permute_axes user function 
for permutation 'B' when x <= z <= y."""
+    def test_axis_perm_x_le_z_le_y_permA(self):
+        """Test the operation of the frame_order.permute_axes user function 
for permutation 'A' when x <= z <= y."""
 
         # Reset.
         self.interpreter.reset()
@@ -354,6 +354,49 @@
         orig_eigen_gamma = cdp.eigen_gamma
 
         # Permute the axes.
+        self.interpreter.frame_order.permute_axes('A')
+
+        # Checks of the cone opening angle permutations.
+        self.assertEqual(cdp.cone_theta_x, 1.0)
+        self.assertEqual(cdp.cone_theta_y, 2.0)
+        self.assertEqual(cdp.cone_sigma_max, 3.0)
+
+        # The optimised Eigenframe.
+        frame = array([[ 0.519591643135168, -0.302150522797118, 
-0.799205596800676],
+                       [ 0.62357991685585 , -0.505348769456744,  
0.596465177946379],
+                       [-0.584099830232939, -0.808286881485765, 
-0.074159999594586]], float64)
+
+        # Manually permute the frame, and then obtain the Euler angles.
+        frame_new = transpose(array([-frame[:, 2], frame[:, 1], frame[:, 
0]], float64))
+        alpha, beta, gamma = R_to_euler_zyz(frame_new)
+
+        # Check the Eigenframe Euler angles.
+        self.assertAlmostEqual(cdp.eigen_alpha, alpha)
+        self.assertAlmostEqual(cdp.eigen_beta, beta)
+        self.assertAlmostEqual(cdp.eigen_gamma, gamma)
+
+
+    def test_axis_perm_x_le_z_le_y_permB(self):
+        """Test the operation of the frame_order.permute_axes user function 
for permutation 'B' when x <= z <= y."""
+
+        # Reset.
+        self.interpreter.reset()
+
+        # Load the state file.
+        data_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'frame_order'+sep+'axis_permutations'
+        self.interpreter.state.load(data_path+sep+'cam_pseudo_ellipse')
+
+        # Change the original parameters.
+        cdp.cone_theta_x = orig_cone_theta_x = 1.0
+        cdp.cone_theta_y = orig_cone_theta_y = 3.0
+        cdp.cone_sigma_max = orig_cone_sigma_max = 2.0
+
+        # Store the original parameters.
+        orig_eigen_alpha = cdp.eigen_alpha
+        orig_eigen_beta = cdp.eigen_beta
+        orig_eigen_gamma = cdp.eigen_gamma
+
+        # Permute the axes.
         self.interpreter.frame_order.permute_axes('B')
 
         # Checks of the cone opening angle permutations.
@@ -368,49 +411,6 @@
 
         # Manually permute the frame, and then obtain the Euler angles.
         frame_new = transpose(array([frame[:, 0], -frame[:, 2], frame[:, 
1]], float64))
-        alpha, beta, gamma = R_to_euler_zyz(frame_new)
-
-        # Check the Eigenframe Euler angles.
-        self.assertAlmostEqual(cdp.eigen_alpha, alpha)
-        self.assertAlmostEqual(cdp.eigen_beta, beta)
-        self.assertAlmostEqual(cdp.eigen_gamma, gamma)
-
-
-    def test_axis_perm_x_le_z_le_y_permA(self):
-        """Test the operation of the frame_order.permute_axes user function 
for permutation 'A' when x <= z <= y."""
-
-        # Reset.
-        self.interpreter.reset()
-
-        # Load the state file.
-        data_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'frame_order'+sep+'axis_permutations'
-        self.interpreter.state.load(data_path+sep+'cam_pseudo_ellipse')
-
-        # Change the original parameters.
-        cdp.cone_theta_x = orig_cone_theta_x = 1.0
-        cdp.cone_theta_y = orig_cone_theta_y = 3.0
-        cdp.cone_sigma_max = orig_cone_sigma_max = 2.0
-
-        # Store the original parameters.
-        orig_eigen_alpha = cdp.eigen_alpha
-        orig_eigen_beta = cdp.eigen_beta
-        orig_eigen_gamma = cdp.eigen_gamma
-
-        # Permute the axes.
-        self.interpreter.frame_order.permute_axes('A')
-
-        # Checks of the cone opening angle permutations.
-        self.assertEqual(cdp.cone_theta_x, 1.0)
-        self.assertEqual(cdp.cone_theta_y, 2.0)
-        self.assertEqual(cdp.cone_sigma_max, 3.0)
-
-        # The optimised Eigenframe.
-        frame = array([[ 0.519591643135168, -0.302150522797118, 
-0.799205596800676],
-                       [ 0.62357991685585 , -0.505348769456744,  
0.596465177946379],
-                       [-0.584099830232939, -0.808286881485765, 
-0.074159999594586]], float64)
-
-        # Manually permute the frame, and then obtain the Euler angles.
-        frame_new = transpose(array([-frame[:, 2], frame[:, 1], frame[:, 
0]], float64))
         alpha, beta, gamma = R_to_euler_zyz(frame_new)
 
         # Check the Eigenframe Euler angles.
@@ -940,13 +940,6 @@
         self.flags(pcs=False)
         self.interpreter.run(script_file=self.cam_path+'rotor2.py')
         self.check_chi2(0.075038911707627859)
-
-
-    def test_generate_rotor2_distribution(self):
-        """Generate the rotor2 distribution of CaM."""
-
-        # Execute the script.
-        
self.interpreter.run(script_file=self.cam_path+'generate_rotor2_distribution.py')
 
 
     def test_frame_order_pdb_model_failed_pivot(self):
@@ -1023,6 +1016,13 @@
 
         # Create the PDB model.
         self.interpreter.frame_order.pdb_model(dir=ds.tmpdir)
+
+
+    def test_generate_rotor2_distribution(self):
+        """Generate the rotor2 distribution of CaM."""
+
+        # Execute the script.
+        
self.interpreter.run(script_file=self.cam_path+'generate_rotor2_distribution.py')
 
 
     def fixme_test_model_free_rotor(self):
@@ -1591,6 +1591,19 @@
         self.assertAlmostEqual(cdp.chi2, 204026.70481594582)
 
 
+    def test_rigid_data_to_iso_cone_free_rotor_model(self):
+        """Test the iso cone, free rotor target function for the data from a 
rigid test molecule."""
+
+        # Set the model.
+        ds.model = MODEL_ISO_CONE_FREE_ROTOR
+
+        # Execute the script.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py')
+
+        # Check the chi2 value.
+        self.assertAlmostEqual(cdp.chi2, 22295.503345237757)
+
+
     def test_rigid_data_to_iso_cone_model(self):
         """Test the iso cone target function for the data from a rigid test 
molecule."""
 
@@ -1604,19 +1617,6 @@
         self.assertAlmostEqual(cdp.chi2, 0.01137748706675365, 5)
 
 
-    def test_rigid_data_to_iso_cone_free_rotor_model(self):
-        """Test the iso cone, free rotor target function for the data from a 
rigid test molecule."""
-
-        # Set the model.
-        ds.model = MODEL_ISO_CONE_FREE_ROTOR
-
-        # Execute the script.
-        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py')
-
-        # Check the chi2 value.
-        self.assertAlmostEqual(cdp.chi2, 22295.503345237757)
-
-
     def test_rigid_data_to_iso_cone_torsionless_model(self):
         """Test the iso cone, torsionless target function for the data from 
a rigid test molecule."""
 




Related Messages


Powered by MHonArc, Updated Sun Sep 14 11:40:02 2014