mailr11044 - in /1.3/test_suite/system_tests: diffusion_tensor.py scripts/diff_tensor/ri_back_calc.py


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

Header


Content

Posted by edward on March 19, 2010 - 15:46:
Author: bugman
Date: Fri Mar 19 15:46:53 2010
New Revision: 11044

URL: http://svn.gna.org/viewcvs/relax?rev=11044&view=rev
Log:
Added system tests checking the back-calculated relaxation data for all 
diffusion tensor types.


Modified:
    1.3/test_suite/system_tests/diffusion_tensor.py
    1.3/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py

Modified: 1.3/test_suite/system_tests/diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/diffusion_tensor.py?rev=11044&r1=11043&r2=11044&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/diffusion_tensor.py (original)
+++ 1.3/test_suite/system_tests/diffusion_tensor.py Fri Mar 19 15:46:53 2010
@@ -31,6 +31,7 @@
 from base_classes import SystemTestCase
 from data import Relax_data_store; ds = Relax_data_store()
 from data.diff_tensor import DiffTensorSimList
+from generic_fns.mol_res_spin import spin_loop
 from generic_fns.pipes import get_pipe
 from maths_fns.rotation_matrix import euler_to_R_zyz
 from relax_io import delete
@@ -219,6 +220,75 @@
         return Dx, Dy, Dz, Diso, Da, Dr, alpha, beta, gamma, D, D_prime, R
 
 
+    def test_back_calc_ellipsoid(self):
+        """Check the back-calculation of relaxation data for the spherical 
diffusion tensor."""
+
+        # Reset the relax data storage object.
+        ds.__reset__()
+
+        # The diffusion type (used by the script).
+        ds.diff_type = 'ellipsoid'
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'diff_tensor'+sep+'ri_back_calc.py')
+
+        # Loop over all spins.
+        for i in range(len(cdp.mol[0].res)):
+            # Alias.
+            bc = ds['back_calc'].mol[0].res[i].spin[0]
+            orig = ds['orig_data'].mol[0].res[i].spin[0]
+
+            # Check the values.
+            for j in range(len(bc.relax_data)):
+                self.assertAlmostEqual(bc.relax_data[j], orig.relax_data[j])
+
+
+    def test_back_calc_sphere(self):
+        """Check the back-calculation of relaxation data for the spherical 
diffusion tensor."""
+
+        # Reset the relax data storage object.
+        ds.__reset__()
+
+        # The diffusion type (used by the script).
+        ds.diff_type = 'sphere'
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'diff_tensor'+sep+'ri_back_calc.py')
+
+        # Loop over all spins.
+        for i in range(len(cdp.mol[0].res)):
+            # Alias.
+            bc = ds['back_calc'].mol[0].res[i].spin[0]
+            orig = ds['orig_data'].mol[0].res[i].spin[0]
+
+            # Check the values.
+            for j in range(len(bc.relax_data)):
+                self.assertAlmostEqual(bc.relax_data[j], orig.relax_data[j])
+
+
+    def test_back_calc_spheroid(self):
+        """Check the back-calculation of relaxation data for the spherical 
diffusion tensor."""
+
+        # Reset the relax data storage object.
+        ds.__reset__()
+
+        # The diffusion type (used by the script).
+        ds.diff_type = 'spheroid'
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'diff_tensor'+sep+'ri_back_calc.py')
+
+        # Loop over all spins.
+        for i in range(len(cdp.mol[0].res)):
+            # Alias.
+            bc = ds['back_calc'].mol[0].res[i].spin[0]
+            orig = ds['orig_data'].mol[0].res[i].spin[0]
+
+            # Check the values.
+            for j in range(len(bc.relax_data)):
+                self.assertAlmostEqual(bc.relax_data[j], orig.relax_data[j])
+
+
     def test_copy(self):
         """The user function diffusion_tensor.copy()."""
 

Modified: 1.3/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py?rev=11044&r1=11043&r2=11044&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py (original)
+++ 1.3/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py Fri Mar 
19 15:46:53 2010
@@ -15,7 +15,7 @@
     ds.diff_type = 'ellipsoid'
 
 # A data pipe.
-pipe.create('diff_opt', 'mf')
+pipe.create('back_calc', 'mf')
 
 # Path of the files.
 path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+ds.diff_type




Related Messages


Powered by MHonArc, Updated Fri Mar 19 17:00:02 2010