Author: bugman Date: Tue Feb 4 16:03:48 2014 New Revision: 22119 URL: http://svn.gna.org/viewcvs/relax?rev=22119&view=rev Log: Merged revisions 22115 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r22115 | bugman | 2014-02-04 15:29:24 +0100 (Tue, 04 Feb 2014) | 9 lines Created the Noe.test_bug_21591_noe_calculation_fail system test. This is to catch bug #21591 (https://gna.org/bugs/?21591) submitted by Martin Ballaschk (https://gna.org/users/mab). This is the complete failure of the NOE analysis. The peak lists attached to the bug report have been included in the test suite to create the system test. ........ Added: branches/double_rotor/test_suite/shared_data/peak_lists/noe.140109.8.001.list - copied unchanged from r22115, trunk/test_suite/shared_data/peak_lists/noe.140109.8.001.list branches/double_rotor/test_suite/shared_data/peak_lists/noe.140109.8.002.list - copied unchanged from r22115, trunk/test_suite/shared_data/peak_lists/noe.140109.8.002.list Modified: branches/double_rotor/ (props changed) branches/double_rotor/test_suite/system_tests/noe.py Propchange: branches/double_rotor/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Feb 4 16:03:48 2014 @@ -1,1 +1,1 @@ -/trunk:1-22112 +/trunk:1-22112,22115 Modified: branches/double_rotor/test_suite/system_tests/noe.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/noe.py?rev=22119&r1=22118&r2=22119&view=diff ============================================================================== --- branches/double_rotor/test_suite/system_tests/noe.py (original) +++ branches/double_rotor/test_suite/system_tests/noe.py Tue Feb 4 16:03:48 2014 @@ -62,6 +62,61 @@ "2AT7_fmf_mol1 12 PHE 150 N 0.803029108487728 0.0199040298831904 \n", "2AT7_fmf_mol1 13 ASN 170 N 0.829415981681132 0.0339996453012768 \n", "2AT7_fmf_mol1 14 LYS 184 N 0.755789564728523 0.0250941717735858 \n" + ] + + # Printout of the real and generated data. + print("\n\nThe real data:") + for i in range(len(lines)): + print(repr(data[i])) + print("\nThe generated data:") + for i in range(len(lines)): + print(repr(lines[i])) + print("\n") + + # Check each line. + for i in range(len(lines)): + self.assertEqual(data[i], lines[i]) + + + def test_bug_21591_noe_calculation_fail(self): + """Catch U{bug #21591<https://gna.org/bugs/?21591>}, the failure of the NOE analysis.""" + + # Generate the sequence. + self.interpreter.spin.create(mol_name='XYZ_mol1', res_num=120, res_name='GLY', spin_num=1865, spin_name='N') + + # Load the reference spectrum and saturated spectrum peak intensities. + path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists' + self.interpreter.spectrum.read_intensities(file='noe.140109.8.001.list', dir=path, spectrum_id='ref_ave') + self.interpreter.spectrum.read_intensities(file='noe.140109.8.002.list', dir=path, spectrum_id='sat_ave') + + # Set the spectrum types. + self.interpreter.noe.spectrum_type('ref', 'ref_ave') + self.interpreter.noe.spectrum_type('sat', 'sat_ave') + + # Set the errors. + self.interpreter.spectrum.baseplane_rmsd(error=1.3e06, spectrum_id='ref_ave') + self.interpreter.spectrum.baseplane_rmsd(error=1.4e06, spectrum_id='sat_ave') + + # Peak intensity error analysis. + self.interpreter.spectrum.error_analysis() + + # Calculate the NOEs. + self.interpreter.calc() + + # Save the NOEs. + self.interpreter.value.write(param='noe', file=ds.tmpfile) + + # Open the NOE output file. + file = open(ds.tmpfile) + lines = file.readlines() + file.close() + + # How the file should look like. + data = [ + "# Parameter description: The NOE.\n", + "#\n", + "# mol_name res_num res_name spin_num spin_name value error \n", + "XYZ_mol1 120 GLY 1865 N 0.5203739657160172 0.20810473864150658 \n", ] # Printout of the real and generated data.