mailr21323 - in /branches/relax_disp/test_suite/system_tests: relax_disp.py scripts/relax_disp/hansen_r2eff_data.py


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

Header


Content

Posted by edward on October 29, 2013 - 16:17:
Author: bugman
Date: Tue Oct 29 16:17:56 2013
New Revision: 21323

URL: http://svn.gna.org/viewcvs/relax?rev=21323&view=rev
Log:
Fixes for the Relax_disp.test_hansen_cpmg_data_auto_analysis* system tests.

The Relax_disp.test_hansen_cpmg_data_auto_analysis system test needed 
updating due to the more
accurate R2eff errors.  The 
Relax_disp.test_hansen_cpmg_data_auto_analysis_r2eff system test also
needed this change.  It also no longer has a spin system for residue 4.


Modified:
    branches/relax_disp/test_suite/system_tests/relax_disp.py
    
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_r2eff_data.py

Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/relax_disp.py?rev=21323&r1=21322&r2=21323&view=diff
==============================================================================
--- branches/relax_disp/test_suite/system_tests/relax_disp.py (original)
+++ branches/relax_disp/test_suite/system_tests/relax_disp.py Tue Oct 29 
16:17:56 2013
@@ -406,6 +406,85 @@
 
         # Execute the script.
         self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'hansen_data.py')
+        self.interpreter.state.save('analysis_heights', 
dir=status.install_path, force=True)
+
+        # The 'No Rex' model checks.
+        self.interpreter.pipe.switch(pipe_name='No Rex')
+        spin70 = return_spin(":70")
+        spin71 = return_spin(":71")
+        print("\n\nOptimised parameters:\n")
+        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
+        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
+        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
+        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
+        self.assertAlmostEqual(spin70.r2[0], 10.5342302498099, 4)
+        self.assertAlmostEqual(spin70.r2[1], 16.1112364696603, 4)
+        self.assertAlmostEqual(spin70.chi2, 8973.84809809869, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.83139245047696, 4)
+        self.assertAlmostEqual(spin71.chi2, 3908.00127775015, 4)
+
+        # The 'LM63' model checks.
+        self.interpreter.pipe.switch(pipe_name='LM63')
+        spin70 = return_spin(":70")
+        spin71 = return_spin(":71")
+        print("\n\nOptimised parameters:\n")
+        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
+        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
+        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
+        print("%-20s %20.15g %20.15g" % ("phi_ex", spin70.phi_ex, 
spin71.phi_ex))
+        print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
+        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
+        self.assertAlmostEqual(spin70.r2[0], 6.74376061092056, 4)
+        self.assertAlmostEqual(spin70.r2[1], 6.57436567015874, 4)
+        self.assertAlmostEqual(spin70.phi_ex, 0.312720290823582, 4)
+        self.assertAlmostEqual(spin70.kex/10000, 4723.01373279974/10000, 4)
+        self.assertAlmostEqual(spin70.chi2, 363.534047015771, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.0078087499832, 4)
+        self.assertAlmostEqual(spin71.phi_ex, 0.0553771790108888, 4)
+        self.assertAlmostEqual(spin71.kex/10000, 2781.64391401371/10000, 4)
+        self.assertAlmostEqual(spin71.chi2, 17.0776426846929, 4)
+
+        # The 'CR72' model checks.  These models have not reached the minima 
due to the low quality optimisation!
+        self.interpreter.pipe.switch(pipe_name='CR72')
+        spin70 = return_spin(":70")
+        spin71 = return_spin(":71")
+        print("\n\nOptimised parameters:\n")
+        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
+        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
+        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
+        print("%-20s %20.15g %20.15g" % ("pA", spin70.pA, spin71.pA))
+        print("%-20s %20.15g %20.15g" % ("dw", spin70.dw, spin71.dw))
+        print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
+        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
+        self.assertAlmostEqual(spin70.r2[0], 6.97231098558438, 4)
+        self.assertAlmostEqual(spin70.r2[1], 9.40949167240224, 4)
+        self.assertAlmostEqual(spin70.pA, 0.989856881109833, 4)
+        self.assertAlmostEqual(spin70.dw, 5.60903520132766, 4)
+        self.assertAlmostEqual(spin70.kex/10000, 1752.96048901822/10000, 4)
+        self.assertAlmostEqual(spin70.chi2, 53.8382161775238, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.83137944442748, 2)
+        self.assertAlmostEqual(spin71.pA, 0.525362677141359, 2)
+        self.assertAlmostEqual(spin71.dw, 5.62607344890692e-05, 2)
+        self.assertAlmostEqual(spin71.kex, 5.04771424685256e-06, 2)
+        self.assertAlmostEqual(spin71.chi2, 3907.96355683848, 2)
+
+
+    def test_hansen_cpmg_data_auto_analysis_numeric(self):
+        """Test of the numeric model only dispersion auto-analysis using Dr. 
Flemming Hansen's CPMG data.
+
+        This uses the data from Dr. Flemming Hansen's paper at 
http://dx.doi.org/10.1021/jp074793o.  This is CPMG data with a fixed 
relaxation time period.
+        """
+
+        # Set the model and numeric flag.
+        ds.models = [
+            MODEL_NOREX,
+            MODEL_CR72,
+            MODEL_NS_CPMG_2SITE_EXPANDED
+        ]
+        ds.numeric_only = True
+
+        # Execute the script.
+        self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'hansen_data.py')
 
         # The 'No Rex' model checks.
         self.interpreter.pipe.switch(pipe_name='No Rex')
@@ -421,27 +500,6 @@
         self.assertAlmostEqual(spin70.chi2, 2832.28562307, 4)
         self.assertAlmostEqual(spin71.r2[0], 5.83137814994754, 4)
         self.assertAlmostEqual(spin71.chi2, 73.6219146835821, 4)
-
-        # The 'LM63' model checks.
-        self.interpreter.pipe.switch(pipe_name='LM63')
-        spin70 = return_spin(":70")
-        spin71 = return_spin(":71")
-        print("\n\nOptimised parameters:\n")
-        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
-        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
-        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
-        print("%-20s %20.15g %20.15g" % ("phi_ex", spin70.phi_ex, 
spin71.phi_ex))
-        print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
-        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 6.7725779040626, 4)
-        self.assertAlmostEqual(spin70.r2[1], 6.6495102881274, 4)
-        self.assertAlmostEqual(spin70.phi_ex, 0.308228782539112, 4)
-        self.assertAlmostEqual(spin70.kex/10000, 4644.35027966526/10000, 4)
-        self.assertAlmostEqual(spin70.chi2, 137.64638621224, 4)
-        self.assertAlmostEqual(spin71.r2[0], 4.92986568906445, 4)
-        self.assertAlmostEqual(spin71.phi_ex, 0.0595701347673553, 4)
-        self.assertAlmostEqual(spin71.kex/10000, 2566.66176813506/10000, 4)
-        self.assertAlmostEqual(spin71.chi2, 2.31424715490254, 4)
 
         # The 'CR72' model checks.  These models have not reached the minima 
due to the low quality optimisation!
         self.interpreter.pipe.switch(pipe_name='CR72')
@@ -467,63 +525,6 @@
         self.assertAlmostEqual(spin71.kex, 10.7154862578618, 2)
         self.assertAlmostEqual(spin71.chi2, 57.9468501661789, 2)
 
-
-    def test_hansen_cpmg_data_auto_analysis_numeric(self):
-        """Test of the numeric model only dispersion auto-analysis using Dr. 
Flemming Hansen's CPMG data.
-
-        This uses the data from Dr. Flemming Hansen's paper at 
http://dx.doi.org/10.1021/jp074793o.  This is CPMG data with a fixed 
relaxation time period.
-        """
-
-        # Set the model and numeric flag.
-        ds.models = [
-            MODEL_NOREX,
-            MODEL_CR72,
-            MODEL_NS_CPMG_2SITE_EXPANDED
-        ]
-        ds.numeric_only = True
-
-        # Execute the script.
-        self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'hansen_data.py')
-
-        # The 'No Rex' model checks.
-        self.interpreter.pipe.switch(pipe_name='No Rex')
-        spin70 = return_spin(":70")
-        spin71 = return_spin(":71")
-        print("\n\nOptimised parameters:\n")
-        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
-        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
-        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
-        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 10.5340573632181, 4)
-        self.assertAlmostEqual(spin70.r2[1], 16.1113049920324, 4)
-        self.assertAlmostEqual(spin70.chi2, 2832.28562307, 4)
-        self.assertAlmostEqual(spin71.r2[0], 5.83137814994754, 4)
-        self.assertAlmostEqual(spin71.chi2, 73.6219146835821, 4)
-
-        # The 'CR72' model checks.  These models have not reached the minima 
due to the low quality optimisation!
-        self.interpreter.pipe.switch(pipe_name='CR72')
-        spin70 = return_spin(":70")
-        spin71 = return_spin(":71")
-        print("\n\nOptimised parameters:\n")
-        print("%-20s %-20s %-20s" % ("Parameter", "Value (:70)", "Value 
(:71)"))
-        print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
-        print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
-        print("%-20s %20.15g %20.15g" % ("pA", spin70.pA, spin71.pA))
-        print("%-20s %20.15g %20.15g" % ("dw", spin70.dw, spin71.dw))
-        print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
-        print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 6.97532271825192, 4)
-        self.assertAlmostEqual(spin70.r2[1], 9.45051817816538, 4)
-        self.assertAlmostEqual(spin70.pA, 0.989800346795472, 4)
-        self.assertAlmostEqual(spin70.dw, 5.61326926915313, 4)
-        self.assertAlmostEqual(spin70.kex/10000, 1713.02295468519/10000, 4)
-        self.assertAlmostEqual(spin70.chi2, 17.3955972313639, 4)
-        self.assertAlmostEqual(spin71.r2[0], 0.589453313816438, 2)
-        self.assertAlmostEqual(spin71.pA, 0.500005674625128, 2)
-        self.assertAlmostEqual(spin71.dw, 199.873875627265, 2)
-        self.assertAlmostEqual(spin71.kex, 10.7154862578618, 2)
-        self.assertAlmostEqual(spin71.chi2, 57.9468501661789, 2)
-
         # The 'NS CPMG 2-site expanded' model checks.  These models have not 
reached the minima due to the low quality optimisation!
         self.interpreter.pipe.switch(pipe_name='NS CPMG 2-site expanded')
         spin70 = return_spin(":70")
@@ -572,6 +573,7 @@
 
         # Execute the script.
         self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'hansen_r2eff_data.py')
+        self.interpreter.state.save('analysis_r2eff', 
dir=status.install_path, force=True)
 
         # The 'No Rex' model checks.
         self.interpreter.pipe.switch(pipe_name='No Rex')
@@ -582,11 +584,11 @@
         print("%-20s %20.15g %20.15g" % ("R2 (500 MHz)", spin70.r2[0], 
spin71.r2[0]))
         print("%-20s %20.15g %20.15g" % ("R2 (800 MHz)", spin70.r2[1], 
spin71.r2[1]))
         print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 10.5340573632181, 4)
-        self.assertAlmostEqual(spin70.r2[1], 16.1113049920324, 4)
-        self.assertAlmostEqual(spin70.chi2, 2832.28562307, 4)
-        self.assertAlmostEqual(spin71.r2[0], 5.83137814994754, 4)
-        self.assertAlmostEqual(spin71.chi2, 73.6219146835821, 4)
+        self.assertAlmostEqual(spin70.r2[0], 10.5342302498099, 4)
+        self.assertAlmostEqual(spin70.r2[1], 16.1112364696603, 4)
+        self.assertAlmostEqual(spin70.chi2, 8973.84809809869, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.83139245047696, 4)
+        self.assertAlmostEqual(spin71.chi2, 3908.00127775015, 4)
 
         # The 'LM63' model checks.
         self.interpreter.pipe.switch(pipe_name='LM63')
@@ -599,15 +601,15 @@
         print("%-20s %20.15g %20.15g" % ("phi_ex", spin70.phi_ex, 
spin71.phi_ex))
         print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
         print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 6.7725779040626, 4)
-        self.assertAlmostEqual(spin70.r2[1], 6.6495102881274, 4)
-        self.assertAlmostEqual(spin70.phi_ex, 0.308228782539112, 4)
-        self.assertAlmostEqual(spin70.kex/10000, 4644.35027966526/10000, 4)
-        self.assertAlmostEqual(spin70.chi2, 137.64638621224, 4)
-        self.assertAlmostEqual(spin71.r2[0], 4.92986568906445, 4)
-        self.assertAlmostEqual(spin71.phi_ex, 0.0595701347673553, 4)
-        self.assertAlmostEqual(spin71.kex/10000, 2566.66176813506/10000, 4)
-        self.assertAlmostEqual(spin71.chi2, 2.31424715490254, 4)
+        self.assertAlmostEqual(spin70.r2[0], 6.74376061092056, 4)
+        self.assertAlmostEqual(spin70.r2[1], 6.57436567015874, 4)
+        self.assertAlmostEqual(spin70.phi_ex, 0.312720290823582, 4)
+        self.assertAlmostEqual(spin70.kex/10000, 4723.01373279974/10000, 4)
+        self.assertAlmostEqual(spin70.chi2, 363.534047015771, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.0078087499832, 4)
+        self.assertAlmostEqual(spin71.phi_ex, 0.0553771790108888, 4)
+        self.assertAlmostEqual(spin71.kex/10000, 2781.64391401371/10000, 4)
+        self.assertAlmostEqual(spin71.chi2, 17.0776426846929, 4)
 
         # The 'CR72' model checks.  These models have not reached the minima 
due to the low quality optimisation!
         self.interpreter.pipe.switch(pipe_name='CR72')
@@ -621,17 +623,17 @@
         print("%-20s %20.15g %20.15g" % ("dw", spin70.dw, spin71.dw))
         print("%-20s %20.15g %20.15g" % ("kex", spin70.kex, spin71.kex))
         print("%-20s %20.15g %20.15g\n" % ("chi2", spin70.chi2, spin71.chi2))
-        self.assertAlmostEqual(spin70.r2[0], 6.97532271825192, 4)
-        self.assertAlmostEqual(spin70.r2[1], 9.45051817816538, 4)
-        self.assertAlmostEqual(spin70.pA, 0.989800346795472, 4)
-        self.assertAlmostEqual(spin70.dw, 5.61326926915313, 4)
-        self.assertAlmostEqual(spin70.kex/10000, 1713.02295468519/10000, 4)
-        self.assertAlmostEqual(spin70.chi2, 17.3955972313639, 4)
-        self.assertAlmostEqual(spin71.r2[0], 0.589453313816438, 2)
-        self.assertAlmostEqual(spin71.pA, 0.500005674625128, 2)
-        self.assertAlmostEqual(spin71.dw, 199.873875627265, 2)
-        self.assertAlmostEqual(spin71.kex, 10.7154862578618, 2)
-        self.assertAlmostEqual(spin71.chi2, 57.9468501661789, 2)
+        self.assertAlmostEqual(spin70.r2[0], 6.97231098558438, 4)
+        self.assertAlmostEqual(spin70.r2[1], 9.40949167240224, 4)
+        self.assertAlmostEqual(spin70.pA, 0.989856881109833, 4)
+        self.assertAlmostEqual(spin70.dw, 5.60903520132766, 4)
+        self.assertAlmostEqual(spin70.kex/10000, 1752.96048901822/10000, 4)
+        self.assertAlmostEqual(spin70.chi2, 53.8382161775238, 4)
+        self.assertAlmostEqual(spin71.r2[0], 5.83137944442748, 2)
+        self.assertAlmostEqual(spin71.pA, 0.525362677141359, 2)
+        self.assertAlmostEqual(spin71.dw, 5.62607344890692e-05, 2)
+        self.assertAlmostEqual(spin71.kex, 5.04771424685256e-06, 2)
+        self.assertAlmostEqual(spin71.chi2, 3907.96355683848, 2)
 
 
     def test_hansen_cpmg_data_to_cr72(self):

Modified: 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_r2eff_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_r2eff_data.py?rev=21323&r1=21322&r2=21323&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_r2eff_data.py
 (original)
+++ 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_r2eff_data.py
 Tue Oct 29 16:17:56 2013
@@ -44,8 +44,9 @@
 # The path to the data files.
 data_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'Hansen'
 
-# Load the sequence.
-sequence.read('fake_sequence.in', dir=data_path, res_num_col=1, 
res_name_col=2)
+# Create the sequence.
+spin.create(res_num=70, spin_name='N')
+spin.create(res_num=71, spin_name='N')
 
 # Name the spins so they can be matched to the assignments, and the isotope 
for field strength scaling.
 spin.name(name='N')




Related Messages


Powered by MHonArc, Updated Tue Oct 29 17:00:01 2013