mailr11024 - in /1.3/test_suite/system_tests: diffusion_tensor.py scripts/diff_tensor_opt.py


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

Header


Content

Posted by edward on March 18, 2010 - 19:47:
Author: bugman
Date: Thu Mar 18 19:47:02 2010
New Revision: 11024

URL: http://svn.gna.org/viewcvs/relax?rev=11024&view=rev
Log:
Added the infrastructure to start to check the diffusion tensor optimisation.


Added:
    1.3/test_suite/system_tests/scripts/diff_tensor_opt.py
      - copied, changed from r11021, 
1.3/test_suite/system_tests/scripts/opt_setup_S2_0_970_te_2048_Rex_0_149.py
Modified:
    1.3/test_suite/system_tests/diffusion_tensor.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=11024&r1=11023&r2=11024&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/diffusion_tensor.py (original)
+++ 1.3/test_suite/system_tests/diffusion_tensor.py Thu Mar 18 19:47:02 2010
@@ -258,6 +258,16 @@
         self.interpreter.diffusion_tensor.delete()
 
 
+    def test_diff_tensor_opt(self):
+        """Check that the diffusion tensor optimisation to relaxation data 
is ok."""
+
+        # Reset the relax data storage object.
+        ds.__reset__()
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'diff_tensor_opt.py')
+
+
     def test_display(self):
         """The user function diffusion_tensor.display()."""
 

Copied: 1.3/test_suite/system_tests/scripts/diff_tensor_opt.py (from r11021, 
1.3/test_suite/system_tests/scripts/opt_setup_S2_0_970_te_2048_Rex_0_149.py)
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/diff_tensor_opt.py?p2=1.3/test_suite/system_tests/scripts/diff_tensor_opt.py&p1=1.3/test_suite/system_tests/scripts/opt_setup_S2_0_970_te_2048_Rex_0_149.py&r1=11021&r2=11024&rev=11024&view=diff
==============================================================================
--- 
1.3/test_suite/system_tests/scripts/opt_setup_S2_0_970_te_2048_Rex_0_149.py 
(original)
+++ 1.3/test_suite/system_tests/scripts/diff_tensor_opt.py Thu Mar 18 
19:47:02 2010
@@ -1,37 +1,34 @@
-"""Script for setting up the data pipe for testing optimisation.
-
-The data set is:
-    S2 = 0.970.
-    te = 2048 ps.
-    Rex = 0.149 s^-1.
-"""
+"""Script for testing diffusion tensor optimisation."""
 
 # Python module imports.
 import __main__
+from numpy import array, float64
 from os import sep
 import sys
 
 
+# A data pipe.
+pipe.create('diff_opt', 'mf')
+
 # Path of the files.
-path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'S2_0.970_te_2048_Rex_0.149'
+path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'
 
 # Load the sequence.
-sequence.read('noe.500.out', dir=path, res_num_col=1, res_name_col=2)
+sequence.read('NOE.500.out', dir=path, res_num_col=1)
 
 # Load the relaxation data.
-relax_data.read('R1', '600', 600.0 * 1e6, 'r1.600.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
-relax_data.read('R2', '600', 600.0 * 1e6, 'r2.600.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
-relax_data.read('NOE', '600', 600.0 * 1e6, 'noe.600.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
-relax_data.read('R1', '500', 500.0 * 1e6, 'r1.500.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
-relax_data.read('R2', '500', 500.0 * 1e6, 'r2.500.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
-relax_data.read('NOE', '500', 500.0 * 1e6, 'noe.500.out', dir=path, 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
+frq = array([500, 600, 700, 800], float64)
+for i in range(len(frq)):
+    relax_data.read('R1', str(int(frq[i])), frq[i] * 1e6, 
'R1.%s.out'%str(int(frq[i])), dir=path, res_num_col=1, data_col=2, 
error_col=3)
+    relax_data.read('R2', str(int(frq[i])), frq[i] * 1e6, 
'R2.%s.out'%str(int(frq[i])), dir=path, res_num_col=1, data_col=2, 
error_col=3)
+    relax_data.read('NOE', str(int(frq[i])), frq[i] * 1e6, 
'NOE.%s.out'%str(int(frq[i])), dir=path, res_num_col=1, data_col=2, 
error_col=3)
 
 # Setup other values.
-diffusion_tensor.init(10e-9, fixed=True)
+diffusion_tensor.init((1e-8, 0, 0, 0, 0, 0), fixed=False)
 value.set(1.02 * 1e-10, 'bond_length')
-value.set(-160 * 1e-6, 'csa')
+value.set(-172 * 1e-6, 'csa')
 value.set('15N', 'heteronucleus')
 value.set('1H', 'proton')
 
 # Select the model-free model.
-model_free.select_model(model='m4')
+model_free.select_model(model='m0')




Related Messages


Powered by MHonArc, Updated Thu Mar 18 20:00:02 2010