mailRe: r6835 - in /1.3/test_suite/system_tests: jw_mapping.py scripts/jw_mapping.py


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

Header


Content

Posted by Edward d'Auvergne on July 08, 2008 - 15:13:
Seb,

That should be a useful test to get this code working again!  I wonder
if we can get some synthetic numbers to use in the test.  I had,
during my PhD, calculated some relaxation data from some synthetic
spectral density values (constructed using model-free equations I
think).  Unfortunately I don't have these with me in Germany.  If we
started with the spectral density values, then calculate the
relaxation data (not using relax), and then make this test fail if it
doesn't return the original values - that would be ideal.  It's been a
while since I looked at those papers, but would know if there are any
high precision numbers (spectral densities and corresponding
relaxation data) that we could take for this test?

Regards,

Edward



On Tue, Jul 8, 2008 at 7:06 AM,  <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor
Date: Tue Jul  8 07:06:37 2008
New Revision: 6835

URL: http://svn.gna.org/viewcvs/relax?rev=6835&view=rev
Log:
Added a script to test jw_mapping.

This one is based on the same code for testing the consistency testing code.


Added:
   1.3/test_suite/system_tests/scripts/jw_mapping.py
Modified:
   1.3/test_suite/system_tests/jw_mapping.py

Modified: 1.3/test_suite/system_tests/jw_mapping.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/jw_mapping.py?rev=6835&r1=6834&r2=6835&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/jw_mapping.py (original)
+++ 1.3/test_suite/system_tests/jw_mapping.py Tue Jul  8 07:06:37 2008
@@ -119,3 +119,10 @@
        for res in residue_loop():
            self.assertEqual(res.spin[0].r, NH_BOND_LENGTH)
            self.assertEqual(res.spin[0].csa, N15_CSA)
+
+
+    def test_mapping(self):
+        """Test a complete jw mapping run using a script."""
+
+        # Execute the script.
+        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/jw_mapping.py')

Added: 1.3/test_suite/system_tests/scripts/jw_mapping.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/jw_mapping.py?rev=6835&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/jw_mapping.py (added)
+++ 1.3/test_suite/system_tests/scripts/jw_mapping.py Tue Jul  8 07:06:37 
2008
@@ -1,0 +1,46 @@
+"""Script for jw_mapping testing."""
+
+# Python module imports.
+from os import devnull
+import sys
+
+# Create the run.
+name = 'jw_mapping'
+pipe.create(name, 'jw')
+
+# Load the sequence.
+sequence.read(sys.path[-1] + 
'/test_suite/system_tests/data/jw_mapping/noe.dat')
+
+# Load the relaxation data.
+relax_data.read('R1', '600', 600.0 * 1e6, sys.path[-1] + 
'/test_suite/system_tests/data/jw_mapping/R1.dat')
+relax_data.read('R2', '600', 600.0 * 1e6, sys.path[-1] + 
'/test_suite/system_tests/data/jw_mapping/R2.dat')
+relax_data.read('NOE', '600', 600.0 * 1e6, sys.path[-1] + 
'/test_suite/system_tests/data/jw_mapping/noe.dat')
+
+# Set the nuclei types
+value.set('15N', 'heteronucleus')
+value.set('1H', 'proton')
+
+# Set the bond length and CSA values.
+value.set(1.02 * 1e-10, 'bond_length')
+value.set(-172 * 1e-6, 'csa')
+
+# Set the frequency.
+jw_mapping.set_frq(frq=600.0 * 1e6)
+
+# Jw mapping.
+calc()
+
+# Monte Carlo simulations.
+monte_carlo.setup(number=500)
+monte_carlo.create_data()
+calc()
+monte_carlo.error_analysis()
+
+# Create grace files.
+grace.write(y_data_type='j0', file=devnull, force=True)
+grace.write(y_data_type='jwx', file=devnull, force=True)
+grace.write(y_data_type='jwh', file=devnull, force=True)
+
+# Finish.
+results.write(file=devnull, force=True)
+state.save(devnull, force=True)


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits




Related Messages


Powered by MHonArc, Updated Tue Jul 15 17:03:16 2008