mailr17114 - in /trunk/test_suite: shared_data/peak_lists/bug_19887/ system_tests/ system_tests/scripts/curve_fitting/


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

Header


Content

Posted by edward on July 02, 2012 - 11:14:
Author: bugman
Date: Mon Jul  2 11:14:28 2012
New Revision: 17114

URL: http://svn.gna.org/viewcvs/relax?rev=17114&view=rev
Log:
Created a system test to replicate Romel Bobby's bug #19887.

This is the bug report at https://gna.org/bugs/?19887.


Added:
    trunk/test_suite/shared_data/peak_lists/bug_19887/
    trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1204.04.list
    trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1804.04.list
    trunk/test_suite/shared_data/peak_lists/bug_19887/T1_2754.04.list
    trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.04.list
    trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.040.list
    
trunk/test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py
Modified:
    trunk/test_suite/system_tests/relax_fit.py

Added: trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1204.04.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1204.04.list?rev=17114&view=auto
==============================================================================
--- trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1204.04.list (added)
+++ trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1204.04.list Mon Jul 
 2 11:14:28 2012
@@ -1,0 +1,5 @@
+Assignment     w1      w2      Data Height
+
+GLU24N-HN      123.075 7.816   503738
+LYS28N-HN      116.681 7.961   702492
+GLN29N-HN      119.512 7.992   666582

Added: trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1804.04.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1804.04.list?rev=17114&view=auto
==============================================================================
--- trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1804.04.list (added)
+++ trunk/test_suite/shared_data/peak_lists/bug_19887/T1_1804.04.list Mon Jul 
 2 11:14:28 2012
@@ -1,0 +1,5 @@
+Assignment     w1      w2      Data Height
+
+GLU24N-HN      123.097 7.813   324691
+LYS28N-HN      116.667 7.961   465383
+GLN29N-HN      119.502 7.997   398580

Added: trunk/test_suite/shared_data/peak_lists/bug_19887/T1_2754.04.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/bug_19887/T1_2754.04.list?rev=17114&view=auto
==============================================================================
--- trunk/test_suite/shared_data/peak_lists/bug_19887/T1_2754.04.list (added)
+++ trunk/test_suite/shared_data/peak_lists/bug_19887/T1_2754.04.list Mon Jul 
 2 11:14:28 2012
@@ -1,0 +1,4 @@
+Assignment     w1      w2      Data Height
+
+LYS28N-HN      116.699 7.957   308481
+GLN29N-HN      119.475 7.998   268944

Added: trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.04.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.04.list?rev=17114&view=auto
==============================================================================
--- trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.04.list (added)
+++ trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.04.list Mon Jul  
2 11:14:28 2012
@@ -1,0 +1,5 @@
+Assignment     w1      w2      Data Height
+
+GLU24N-HN      123.071 7.811   1070840
+LYS28N-HN      116.688 7.960   1483090
+GLN29N-HN      119.501 7.991   1429320

Added: trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.040.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.040.list?rev=17114&view=auto
==============================================================================
--- trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.040.list (added)
+++ trunk/test_suite/shared_data/peak_lists/bug_19887/T1_304.040.list Mon Jul 
 2 11:14:28 2012
@@ -1,0 +1,5 @@
+Assignment     w1      w2      Data Height
+
+GLU24N-HN      123.067 7.811   1095970
+LYS28N-HN      116.691 7.960   1466770
+GLN29N-HN      119.487 7.990   1411100

Modified: trunk/test_suite/system_tests/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_fit.py?rev=17114&r1=17113&r2=17114&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_fit.py (original)
+++ trunk/test_suite/system_tests/relax_fit.py Mon Jul  2 11:14:28 2012
@@ -140,6 +140,13 @@
         self.assertNotEqual(float(lines[index+1][2]), 0.0)
 
 
+    def test_bug_19887_curvefit_fail(self):
+        """Test for the failure of relaxation curve-fitting, replicating bug 
#19887."""
+
+        # Execute the script.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'curve_fitting'+sep+'bug_19887_curvefit_fail.py')
+
+
     def test_curve_fitting_height(self):
         """Test the relaxation curve fitting C modules."""
 

Added: 
trunk/test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py?rev=17114&view=auto
==============================================================================
--- 
trunk/test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py
 (added)
+++ 
trunk/test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py
 Mon Jul  2 11:14:28 2012
@@ -1,0 +1,75 @@
+"""This system test script catches the relaxation curve-fitting optimisation 
bug submitted by Romel Bobby.
+
+The bug is:
+    - Bug #19887 (https://gna.org/bugs/?19887).
+"""
+
+# Python module imports.
+from os import sep
+
+# relax module imports.
+from data import Relax_data_store; ds = Relax_data_store()
+from status import Status; status = Status()
+
+
+# The data path.
+DATA_PATH = status.install_path + sep + 'test_suite' + sep + 'shared_data' + 
sep + 'peak_lists' + sep + 'bug_19887' + sep
+
+# Create the 'rx' data pipe.
+pipe.create('rx', 'relax_fit')
+
+# Load the backbone amide 15N spins from a PDB file.
+spin.create(mol_name='IL6_mf_mol1', res_name='GLU', res_num=24, 
spin_name='N')
+spin.create(mol_name='IL6_mf_mol1', res_name='LYS', res_num=28, 
spin_name='N')
+spin.create(mol_name='IL6_mf_mol1', res_name='GLN', res_num=29, 
spin_name='N')
+
+# Spectrum names.
+names = [
+    'T1_1204.04',
+    'T1_1804.04',
+    'T1_2754.04',
+    'T1_304.04',
+    'T1_304.040'
+]
+
+# Relaxation times (in seconds).
+times = [
+    1.204,
+    1.804,
+    2.754,
+    0.304,
+    0.304
+]
+
+# Loop over the spectra.
+for i in xrange(len(names)):
+    # Load the peak intensities.
+    spectrum.read_intensities(file=names[i]+'.list', dir=DATA_PATH, 
spectrum_id=names[i], int_method='height')
+
+    # Set the relaxation times.
+    relax_fit.relax_time(time=times[i], spectrum_id=names[i])
+
+# Specify the duplicated spectra.
+spectrum.replicated(spectrum_ids=['T1_304.04', 'T1_304.040'])
+
+# Peak intensity error analysis.
+spectrum.error_analysis()
+
+# Deselect unresolved spins.
+# deselect.read(file='unresolved', mol_name_col=1, res_num_col=2, 
res_name_col=3, spin_num_col=4, spin_name_col=5)
+
+# Set the relaxation curve type.
+relax_fit.select_model('exp')
+
+# Grid search.
+grid_search(inc=11)
+
+# Minimise.
+minimise('simplex', scaling=False, constraints=False)
+
+# Monte Carlo simulations.
+monte_carlo.setup(number=500)
+monte_carlo.create_data()
+monte_carlo.initial_values()
+minimise('simplex', scaling=False, constraints=False)
+monte_carlo.error_analysis()




Related Messages


Powered by MHonArc, Updated Mon Jul 02 12:20:02 2012