Author: semor Date: Thu Jan 29 20:18:10 2009 New Revision: 8702 URL: http://svn.gna.org/viewcvs/relax?rev=8702&view=rev Log: Started to implement the reading of 'r2eff' by relax_data.read() by first writing a system test. Added: branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/ branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/r2eff.out Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py Added: branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/r2eff.out URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/r2eff.out?rev=8702&view=auto ============================================================================== --- branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/r2eff.out (added) +++ branches/relax_disp/test_suite/shared_data/curve_fitting_disp/r2eff/r2eff.out Thu Jan 29 20:18:10 2009 @@ -1,0 +1,3 @@ +1 Gly 15.000 1.0001 +2 Gly 4.2003 0.0259 +3 Gly 7.2385 2.4432 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=8702&r1=8701&r2=8702&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/relax_disp.py (original) +++ branches/relax_disp/test_suite/system_tests/relax_disp.py Thu Jan 29 20:18:10 2009 @@ -73,3 +73,23 @@ # Execute the script. self.relax.interpreter.run(script_file=sys.path[-1] + '/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py') + + + def test_read_r2eff(self): + """Test the reading of a file containing r2eff values.""" + + # Get the current data pipe. + cdp = pipes.get_pipe() + + # Create the sequence data, and name the spins. + self.relax.interpreter._Residue.create(1, 'Gly') + self.relax.interpreter._Residue.create(2, 'Gly') + self.relax.interpreter._Residue.create(3, 'Gly') + + # Read the file. + self.relax.interpreter._Relax_data.read('R2eff', '600', 600 * 1e6, 'r2eff.out', dir=sys.path[-1] + "/test_suite/shared_data/curve_fitting_disp/r2eff") + + # Test the data. + self.assertEqual(cdp.mol[0].res[0].spin[0].r2eff[0], 15.000) + self.assertEqual(cdp.mol[0].res[1].spin[0].r2eff[0], 4.2003) + self.assertEqual(cdp.mol[0].res[2].spin[0].r2eff[0], 7.2385)