mailr17038 - in /branches/interatomic/test_suite/system_tests: ./ scripts/


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

Header


Content

Posted by edward on June 22, 2012 - 17:01:
Author: bugman
Date: Fri Jun 22 17:01:53 2012
New Revision: 17038

URL: http://svn.gna.org/viewcvs/relax?rev=17038&view=rev
Log:
Converted all of the consistency testing system tests to the interatomic data 
design.


Modified:
    branches/interatomic/test_suite/system_tests/consistency_tests.py
    branches/interatomic/test_suite/system_tests/scripts/consistency_tests.py
    
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_calc_test.py
    
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_set_value.py

Modified: branches/interatomic/test_suite/system_tests/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/consistency_tests.py?rev=17038&r1=17037&r2=17038&view=diff
==============================================================================
--- branches/interatomic/test_suite/system_tests/consistency_tests.py 
(original)
+++ branches/interatomic/test_suite/system_tests/consistency_tests.py Fri Jun 
22 17:01:53 2012
@@ -30,7 +30,7 @@
 from base_classes import SystemTestCase
 from data import Relax_data_store; ds = Relax_data_store()
 from generic_fns.mol_res_spin import residue_loop
-from physical_constants import N15_CSA, NH_BOND_LENGTH
+from physical_constants import N15_CSA
 from status import Status; status = Status()
 
 
@@ -80,7 +80,6 @@
 
         # Loop over residues.
         for res in residue_loop():
-            self.assertAlmostEqual(res.spin[0].r, NH_BOND_LENGTH)
             self.assertAlmostEqual(res.spin[0].csa, N15_CSA)
 
 

Modified: 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/scripts/consistency_tests.py?rev=17038&r1=17037&r2=17038&view=diff
==============================================================================
--- branches/interatomic/test_suite/system_tests/scripts/consistency_tests.py 
(original)
+++ branches/interatomic/test_suite/system_tests/scripts/consistency_tests.py 
Fri Jun 22 17:01:53 2012
@@ -19,12 +19,18 @@
 self._execute_uf(uf_name='relax_data.read', ri_id='R2_600',  ri_type='R2',  
frq=600.0*1e6, 
file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'R2.dat',
 res_num_col=1, res_name_col=2, data_col=3, error_col=4)
 self._execute_uf(uf_name='relax_data.read', ri_id='NOE_600', ri_type='NOE', 
frq=600.0*1e6, 
file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'noe.dat',
 res_num_col=1, res_name_col=2, data_col=3, error_col=4)
 
-# Set the nuclei types
-self._execute_uf(uf_name='value.set', val='15N', param='heteronuc_type')
-self._execute_uf(uf_name='value.set', val='1H', param='proton_type')
+# Set the spin information.
+spin.name('N')
+spin.element('N')
+sequence.attach_protons()
+spin.isotope('15N', spin_id='@N')
+spin.isotope('1H', spin_id='@H')
 
-# Set the bond length and CSA values.
-self._execute_uf(uf_name='value.set', val=1.02 * 1e-10, param='r')
+# Define the magnetic dipole-dipole relaxation interaction.
+self._execute_uf(uf_name='dipole_pair.define', spin_id1='@N', spin_id2='@H', 
direct_bond=True)
+self._execute_uf(uf_name='dipole_pair.set_dist', spin_id1='@N', 
spin_id2='@H', ave_dist=1.02 * 1e-10)
+
+# Define the chemical shift relaxation interaction.
 self._execute_uf(uf_name='value.set', val=-172 * 1e-6, param='csa')
 
 # Set the angle between the 15N-1H vector and the principal axis of the 15N 
chemical shift tensor
@@ -50,6 +56,11 @@
 self._execute_uf(uf_name='grace.write', y_data_type='f_eta', file='devnull', 
force=True)
 self._execute_uf(uf_name='grace.write', y_data_type='f_r2', file='devnull', 
force=True)
 
+# Value writing.
+self._execute_uf(uf_name='value.write', param='j0', file='devnull', 
force=True)
+self._execute_uf(uf_name='value.write', param='f_eta', file='devnull', 
force=True)
+self._execute_uf(uf_name='value.write', param='f_r2', file='devnull', 
force=True)
+
 # Finish.
 self._execute_uf(uf_name='results.write', file='devnull', force=True)
 self._execute_uf(uf_name='state.save', state='devnull', force=True)

Modified: 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_calc_test.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/scripts/consistency_tests_calc_test.py?rev=17038&r1=17037&r2=17038&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_calc_test.py
 (original)
+++ 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_calc_test.py
 Fri Jun 22 17:01:53 2012
@@ -24,11 +24,19 @@
 for i in xrange(len(ri_ids)):
     self._execute_uf(uf_name='relax_data.read', ri_id=ri_ids[i], 
ri_type=ri_type[i], frq=frq[i], file=data_paths[i], res_num_col=1, 
res_name_col=2, data_col=3, error_col=4)
 
-# Set r, csa, heteronucleus type, and proton type.
-self._execute_uf(uf_name='value.set', val=NH_BOND_LENGTH, param='r')
+# Set the spin information.
+spin.name('N')
+spin.element('N')
+sequence.attach_protons()
+spin.isotope('15N', spin_id='@N')
+spin.isotope('1H', spin_id='@H')
+
+# Define the magnetic dipole-dipole relaxation interaction.
+self._execute_uf(uf_name='dipole_pair.define', spin_id1='@N', spin_id2='@H', 
direct_bond=True)
+self._execute_uf(uf_name='dipole_pair.set_dist', spin_id1='@N', 
spin_id2='@H', ave_dist=NH_BOND_LENGTH)
+
+# Define the chemical shift relaxation interaction.
 self._execute_uf(uf_name='value.set', val=N15_CSA, param='csa')
-self._execute_uf(uf_name='value.set', val='15N', param='heteronuc_type')
-self._execute_uf(uf_name='value.set', val='1H', param='proton_type')
 
 # Set the angle between the 15N-1H vector and the principal axis of the 15N 
chemical shift tensor
 self._execute_uf(uf_name='value.set', val=15.7, param='orientation')

Modified: 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_set_value.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/system_tests/scripts/consistency_tests_set_value.py?rev=17038&r1=17037&r2=17038&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_set_value.py
 (original)
+++ 
branches/interatomic/test_suite/system_tests/scripts/consistency_tests_set_value.py
 Fri Jun 22 17:01:53 2012
@@ -4,7 +4,7 @@
 from os import sep
 
 # relax module imports.
-from physical_constants import N15_CSA, NH_BOND_LENGTH
+from physical_constants import N15_CSA
 from status import Status; status = Status()
 
 
@@ -12,5 +12,4 @@
 self._execute_uf(uf_name='sequence.read', file='test_seq', 
dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, 
res_name_col=2)
 
 # Try to set the values.
-self._execute_uf(uf_name='value.set', val=NH_BOND_LENGTH, param='r')
 self._execute_uf(uf_name='value.set', val=N15_CSA, param='csa')




Related Messages


Powered by MHonArc, Updated Fri Jun 22 18:40:02 2012