mailr8798 - /1.3/test_suite/system_tests/n_state_model.py


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

Header


Content

Posted by edward on February 13, 2009 - 18:06:
Author: bugman
Date: Fri Feb 13 18:06:25 2009
New Revision: 8798

URL: http://svn.gna.org/viewcvs/relax?rev=8798&view=rev
Log:
Expansion of the alignment tensor fitting system tests to create 3 different 
tests.

The optimised values are now checked as well.


Modified:
    1.3/test_suite/system_tests/n_state_model.py

Modified: 1.3/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/n_state_model.py?rev=8798&r1=8797&r2=8798&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/n_state_model.py (original)
+++ 1.3/test_suite/system_tests/n_state_model.py Fri Feb 13 18:06:25 2009
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+# Copyright (C) 2008-2009 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -88,8 +88,68 @@
     def test_align_fit(self):
         """Test the use of RDCs and PCSs to find the alignment tensor."""
 
+        # Set the mode to use both RDCs and PCSs.
+        ds.mode = 'all'
+
         # Execute the script.
         self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/align_fit.py')
+
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
+        # Test the optimised values.
+        self.assertAlmostEqual(cdp.align_tensors[0].Axx, -0.351261/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayy, 0.556994/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axy, -0.506392/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axz, 0.560544/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -0.286367/2000)
+        self.assertAlmostEqual(cdp.chi2, 0.0)
+        self.assertAlmostEqual(cdp.q_rdc, 0.0)
+        self.assertAlmostEqual(cdp.q_pcs, 0.0)
+
+
+    def test_align_fit_rdc(self):
+        """Test the use of RDCs to find the alignment tensor."""
+
+        # Set the mode to use RDCs.
+        ds.mode = 'rdc'
+
+        # Execute the script.
+        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/align_fit.py')
+
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
+        # Test the optimised values.
+        self.assertAlmostEqual(cdp.align_tensors[0].Axx, -0.351261/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayy, 0.556994/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axy, -0.506392/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axz, 0.560544/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -0.286367/2000)
+        self.assertAlmostEqual(cdp.chi2, 0.0)
+        self.assertAlmostEqual(cdp.q_rdc, 0.0)
+
+
+    def test_align_fit_pcs(self):
+        """Test the use of PCSs to find the alignment tensor."""
+
+        # Set the mode to use PCSs.
+        ds.mode = 'pcs'
+
+        # Execute the script.
+        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/align_fit.py')
+
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
+        # Test the optimised values.
+        self.assertAlmostEqual(cdp.align_tensors[0].Axx, -0.351261/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayy, 0.556994/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axy, -0.506392/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Axz, 0.560544/2000)
+        self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -0.286367/2000)
+        self.assertAlmostEqual(cdp.chi2, 0.0)
+        self.assertAlmostEqual(cdp.q_pcs, 0.0)
 
 
     def test_lactose_n_state(self):




Related Messages


Powered by MHonArc, Updated Fri Feb 13 21:20:03 2009