Author: bugman Date: Wed Feb 20 10:13:37 2013 New Revision: 18518 URL: http://svn.gna.org/viewcvs/relax?rev=18518&view=rev Log: Merged revisions 18515,18517 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18515 | bugman | 2013-02-20 10:04:57 +0100 (Wed, 20 Feb 2013) | 5 lines The spin name, element and isotope is now set in Mf.test_bug_20531_molmol_macro_write_relaxfault. This is required in this system test so that the marco creation is not skipped. ........ r18517 | bugman | 2013-02-20 10:13:01 +0100 (Wed, 20 Feb 2013) | 7 lines Added some work-arounds for the model-free specific code for when no relaxation data is present. This is needed for the Rex scaling, as the ID of the first relaxation data set was being used to select the first frequency. As caught by the Mf.test_bug_20531_molmol_macro_write_relaxfault system test, this fails if no relaxation data is present. ........ Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/specific_fns/model_free/macro_base.py branches/frame_order_testing/specific_fns/model_free/main.py branches/frame_order_testing/test_suite/system_tests/model_free.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Feb 20 10:13:37 2013 @@ -1,1 +1,1 @@ -/trunk:1-18514 +/trunk:1-18517 Modified: branches/frame_order_testing/specific_fns/model_free/macro_base.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/model_free/macro_base.py?rev=18518&r1=18517&r2=18518&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/model_free/macro_base.py (original) +++ branches/frame_order_testing/specific_fns/model_free/macro_base.py Wed Feb 20 10:13:37 2013 @@ -442,8 +442,18 @@ def classic_rex(self, res_num, rex, colour_start, colour_end, colour_list): """Function for generating the bond width and colours for correlation times.""" - # The Rex value at the first field strength. - rex = rex * (2.0 * pi * cdp.frq[cdp.ri_ids[0]])**2 + # The 1st spectrometer frequency. + if not hasattr(cdp, 'frq'): + raise RelaxError("No spectrometer frequency information is present in the current data pipe.") + if hasattr(cdp, 'ri_ids'): + frq = cdp.frq[cdp.ri_ids[0]] + else: # Take the highest frequency, if all else fails. + frqs = cdp.frq.values() + frqs.sort() + frq = frqs[-1] + + # The Rex value. + rex = rex * (2.0 * pi * frq)**2 # The bond width (aiming for a width range of 2 to 0 for Rex values of 0 to 25 s^-1). width = 2.0 - 2.0 / (rex/5.0 + 1.0) Modified: branches/frame_order_testing/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/model_free/main.py?rev=18518&r1=18517&r2=18518&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/model_free/main.py (original) +++ branches/frame_order_testing/specific_fns/model_free/main.py Wed Feb 20 10:13:37 2013 @@ -521,8 +521,22 @@ @rtype: float """ + # No frequency info. + if not hasattr(cdp, 'frq'): + raise RelaxError("No spectrometer frequency information is present in the current data pipe.") + + # The 1st spectrometer frequency. + if hasattr(cdp, 'ri_ids'): + frq = cdp.frq[cdp.ri_ids[0]] + + # Take the highest frequency, if all else fails. + else: + frqs = cdp.frq.values() + frqs.sort() + frq = frqs[-1] + # The factor. - return 1.0 / (2.0 * pi * cdp.frq[cdp.ri_ids[0]])**2 + return 1.0 / (2.0 * pi * frq)**2 def _create_model(self, model=None, equation=None, params=None, spin_id=None): Modified: branches/frame_order_testing/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/model_free.py?rev=18518&r1=18517&r2=18518&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/system_tests/model_free.py (original) +++ branches/frame_order_testing/test_suite/system_tests/model_free.py Wed Feb 20 10:13:37 2013 @@ -298,6 +298,11 @@ # Load some sequence data. self.interpreter.sequence.read(file='Ap4Aase.seq', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep, res_num_col=1, res_name_col=2) + + # Set some spin info. + self.interpreter.spin.name('N') + self.interpreter.spin.element('N') + self.interpreter.spin.isotope('15N') # The models to create. models = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9'] + ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9']