Author: bugman Date: Sun Jun 16 10:15:48 2013 New Revision: 20140 URL: http://svn.gna.org/viewcvs/relax?rev=20140&view=rev Log: Merged revisions 20135-20136,20139 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20135 | bugman | 2013-06-14 19:07:31 +0200 (Fri, 14 Jun 2013) | 3 lines The RDC back-calculation function now supports T = J+D values. ........ r20136 | bugman | 2013-06-14 19:13:56 +0200 (Fri, 14 Jun 2013) | 5 lines Created the N_state_model.test_absolute_T system test. This is for checking the optimisation of absolute T=J+D values to find alignment tensors. ........ r20139 | bugman | 2013-06-16 10:14:01 +0200 (Sun, 16 Jun 2013) | 3 lines Epydoc docstring fix for the RelaxTestResult.write_time() method. ........ Added: branches/relax_disp/test_suite/shared_data/align_data/one_bond_RDC_data_strychnine.txt - copied unchanged from r20139, trunk/test_suite/shared_data/align_data/one_bond_RDC_data_strychnine.txt branches/relax_disp/test_suite/system_tests/scripts/n_state_model/absolute_T.py - copied unchanged from r20139, trunk/test_suite/system_tests/scripts/n_state_model/absolute_T.py Modified: branches/relax_disp/ (props changed) branches/relax_disp/pipe_control/rdc.py branches/relax_disp/test_suite/relax_test_runner.py branches/relax_disp/test_suite/system_tests/n_state_model.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Sun Jun 16 10:15:48 2013 @@ -1,1 +1,1 @@ -/trunk:1-20133 +/trunk:1-20139 Modified: branches/relax_disp/pipe_control/rdc.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/rdc.py?rev=20140&r1=20139&r2=20140&view=diff ============================================================================== --- branches/relax_disp/pipe_control/rdc.py (original) +++ branches/relax_disp/pipe_control/rdc.py Sun Jun 16 10:15:48 2013 @@ -118,6 +118,13 @@ for id in align_ids: # The signed value. interatom.rdc_bc[id] = ave_rdc_tensor(dj, unit_vect, cdp.N, cdp.align_tensors[get_tensor_index(align_id=id)].A, weights=weights) + + # T values. + if align_id in cdp.rdc_data_types and cdp.rdc_data_types[align_id] == 'T': + if not hasattr(interatom, 'j_coupling'): + raise RelaxNoJError + + interatom.rdc_bc[id] += interatom.j_coupling # The absolute value. if hasattr(interatom, 'absolute_rdc') and id in interatom.absolute_rdc.keys() and interatom.absolute_rdc[id]: Modified: branches/relax_disp/test_suite/relax_test_runner.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/relax_test_runner.py?rev=20140&r1=20139&r2=20140&view=diff ============================================================================== --- branches/relax_disp/test_suite/relax_test_runner.py (original) +++ branches/relax_disp/test_suite/relax_test_runner.py Sun Jun 16 10:15:48 2013 @@ -156,8 +156,8 @@ def write_time(self, test_name): """Write the timing of the test to the stream. - @param test: The TestCase name. - @type test: str + @param test_name: The TestCase name. + @type test_name: str """ # Subtract the end time from the start time. Modified: branches/relax_disp/test_suite/system_tests/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/n_state_model.py?rev=20140&r1=20139&r2=20140&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/n_state_model.py (original) +++ branches/relax_disp/test_suite/system_tests/n_state_model.py Sun Jun 16 10:15:48 2013 @@ -213,6 +213,65 @@ self.assertAlmostEqual(cdp.q_rdc_norm2, 0.81262759306400001) + def test_absolute_T(self): + """Test the fitting of signless T values (J+D).""" + + # Execute the script. + self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'absolute_T.py') + + # Test the optimised values. + self.assertAlmostEqual(cdp.align_tensors[0].Axx, -1.436586299657e-04) + self.assertAlmostEqual(cdp.align_tensors[0].Ayy, -5.004443735044e-04) + self.assertAlmostEqual(cdp.align_tensors[0].Axy, -5.017832275009e-05) + self.assertAlmostEqual(cdp.align_tensors[0].Axz, 1.366097786433e-04) + self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -1.614772175671e-04) + self.assertAlmostEqual(cdp.chi2, 311.70348701353225) + self.assertAlmostEqual(cdp.q_rdc, 0.0) + self.assertAlmostEqual(cdp.q_rdc_norm2, 0.086891848854541404) + + # The signless T data. + T = [195.2, 205.9, 109.4, 113.8, 127.4, 156.0, 92.1, 173.2, 183.0, 174.3, 152.2, 97.3, 136.0, 129.2, 145.5, 156.0, 121.6, 128.0, 154.5, 94.2] + T_bc = [ + 195.009353539915281, + 205.456622836526037, + 112.285085032859712, + 113.628896345578610, + 127.440986667041187, + 155.505017063790831, + 94.332271833299316, + 172.408496922639102, + 181.972859458051403, + 173.655640981746103, + 153.402585241137388, + 92.115389822570464, + 139.743303992644570, + 131.399101601878243, + 146.219317894376132, + 153.945261372587538, + 119.541444938794172, + 126.620471670822312, + 155.940753902549545, + 90.813638474619523 + ] + + # Back calc. + self.interpreter.rdc.back_calc('Gel') + + # Check the spin data. + i = 0 + for interatom in interatomic_loop(): + # No PCS. + if not hasattr(interatom, 'rdc'): + continue + + # Check the loaded and back-calculated absolute values. + self.assertAlmostEqual(interatom.rdc['Gel'], T[i]) + self.assertAlmostEqual(interatom.rdc_bc['Gel'], T_bc[i]) + + # Increment the spin index. + i += 1 + + def test_align_fit(self): """Test the use of RDCs and PCSs to find the alignment tensor."""