Author: bugman Date: Wed Mar 27 13:41:12 2013 New Revision: 19185 URL: http://svn.gna.org/viewcvs/relax?rev=19185&view=rev Log: Ported r8338 from the old relax_disp branch into the new branch (partly manually). The changes not made by hand come from the command: svn merge -r8337:8338 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp/specific_fns/@r18123 specific_analyses All changes not in the specific_analyses package were hand edited. ..... r8338 | semor | 2009-01-08 17:17:32 +0100 (Thu, 08 Jan 2009) | 7 lines Changed paths: M /branches/relax_disp/generic_fns/pipes.py M /branches/relax_disp/prompt/__init__.py M /branches/relax_disp/prompt/interpreter.py M /branches/relax_disp/prompt/pipe.py M /branches/relax_disp/specific_fns/__init__.py M /branches/relax_disp/specific_fns/relax_disp.py M /branches/relax_disp/specific_fns/setup.py Fixed many formatting errors and made the 'relax_disp' code accessible (pipes, interpreter, etc). These changes also include a coming back to using the C code 'math_fns/relax_fit.py' since there is still no such code associated to relaxation dispersion. This will allow workingin the code without relax crashing and complaining about the lack of a C module name 'relax_disp.py'. ..... Modified: branches/relax_disp/pipe_control/pipes.py branches/relax_disp/specific_analyses/__init__.py branches/relax_disp/specific_analyses/relax_disp.py branches/relax_disp/specific_analyses/setup.py branches/relax_disp/user_functions/pipe.py Modified: branches/relax_disp/pipe_control/pipes.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/pipes.py?rev=19185&r1=19184&r2=19185&view=diff ============================================================================== --- branches/relax_disp/pipe_control/pipes.py (original) +++ branches/relax_disp/pipe_control/pipes.py Wed Mar 27 13:41:12 2013 @@ -35,7 +35,7 @@ # List of valid data pipe types and descriptions. -VALID_TYPES = ['ct', 'frame order', 'jw', 'hybrid', 'mf', 'N-state', 'noe', 'relax_fit'] +VALID_TYPES = ['ct', 'frame order', 'jw', 'hybrid', 'mf', 'N-state', 'noe', 'relax_disp', 'relax_fit'] PIPE_DESC = { 'ct': 'Consistency testing', 'frame order': 'Frame Order theories', @@ -44,6 +44,7 @@ 'mf': 'Model-free analysis', 'N-state': 'N-state model or ensemble analysis', 'noe': 'Steady state NOE calculation', + 'relax_disp': 'Relaxation dispersion', 'relax_fit': 'Relaxation curve fitting' } PIPE_DESC_LIST = [] Modified: branches/relax_disp/specific_analyses/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/__init__.py?rev=19185&r1=19184&r2=19185&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/__init__.py (original) +++ branches/relax_disp/specific_analyses/__init__.py Wed Mar 27 13:41:12 2013 @@ -33,6 +33,7 @@ 'model_free', 'n_state_model', 'noe', + 'relax_disp', 'relax_fit', 'setup' ] Modified: branches/relax_disp/specific_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19185&r1=19184&r2=19185&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp.py (original) +++ branches/relax_disp/specific_analyses/relax_disp.py Wed Mar 27 13:41:12 2013 @@ -39,7 +39,7 @@ # C modules. if C_module_exp_fn: - from maths_fns.relax_disp import setup, func, dfunc, d2func, back_calc_I + from maths_fns.relax_fit import setup, func, dfunc, d2func, back_calc_I class Relax_disp(Common_functions): @@ -196,12 +196,12 @@ if not hasattr(cdp, 'cpmg_frqs'): cdp.cpmg_frqs = [None] * len(cdp.spectrum_ids) - # Index not present in the global CPMG frequency data structure. - while 1: - if index > len(cdp.cpmg_frqs) - 1: - cdp.cpmg_frqs.append(None) - else: - break + # Index not present in the global CPMG frequency data structure. + while 1: + if index > len(cdp.cpmg_frqs) - 1: + cdp.cpmg_frqs.append(None) + else: + break # Add the frequency at the correct position. cdp.cpmg_frqs[index] = frq @@ -445,17 +445,17 @@ if not exists_mol_res_spin_data(): raise RelaxNoSequenceError - # CPMG relaxation dispersion experiments. - if exp = 'cpmg': - print "CPMG relaxation dispersion experiments." - - # R1rho relaxation dispersion experiments. - elif exp = 'r1rho': - print "R1rho relaxation dispersion experiments." - - # Invalid relaxation dispersion experiment. - else: - raise RelaxError, "The relaxation dispersion experiment '" + exp + "' is invalid." + # CPMG relaxation dispersion experiments. + if exp == 'cpmg': + print "CPMG relaxation dispersion experiments." + + # R1rho relaxation dispersion experiments. + elif exp == 'r1rho': + print "R1rho relaxation dispersion experiments." + + # Invalid relaxation dispersion experiment. + else: + raise RelaxError, "The relaxation dispersion experiment '" + exp + "' is invalid." def grid_search(self, lower=None, upper=None, inc=None, constraints=True, verbosity=1, sim_index=None): Modified: branches/relax_disp/specific_analyses/setup.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/setup.py?rev=19185&r1=19184&r2=19185&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/setup.py (original) +++ branches/relax_disp/specific_analyses/setup.py Wed Mar 27 13:41:12 2013 @@ -31,6 +31,7 @@ from specific_analyses.model_free import Model_free from specific_analyses.n_state_model import N_state_model from specific_analyses.noe import Noe +from specific_analyses.relax_disp import Relax_disp from specific_analyses.relax_fit import Relax_fit from lib.errors import RelaxError, RelaxFuncSetupError @@ -43,6 +44,7 @@ model_free_obj = Model_free() n_state_model_obj = N_state_model() noe_obj = Noe() +relax_disp_obj = Relax_disp() relax_fit_obj = Relax_fit() @@ -280,6 +282,10 @@ if function_type == 'N-state': return n_state_model_obj + # Relaxation dispersion curve fitting. + if function_type == 'relax_disp': + return relax_disp_obj + # Relaxation curve fitting. if function_type == 'relax_fit': return relax_fit_obj @@ -319,6 +325,10 @@ if function_type == 'N-state': return "the N-state model" + # Relaxation dispersion curve fitting. + if function_type == 'relax_disp': + return "relaxation dispersion curve fitting" + # Relaxation curve fitting. if function_type == 'relax_fit': return "relaxation curve fitting" Modified: branches/relax_disp/user_functions/pipe.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/user_functions/pipe.py?rev=19185&r1=19184&r2=19185&view=diff ============================================================================== --- branches/relax_disp/user_functions/pipe.py (original) +++ branches/relax_disp/user_functions/pipe.py Wed Mar 27 13:41:12 2013 @@ -193,6 +193,7 @@ uf.desc[-1].add_item_list_element("'mf'", "Model-free analysis,") uf.desc[-1].add_item_list_element("'N-state'", "N-state model of domain motions,") uf.desc[-1].add_item_list_element("'noe'", "Steady state NOE calculation,") +uf.desc[-1].add_item_list_element("'relax_disp'", "Relaxation dispersion curve fitting,") uf.desc[-1].add_item_list_element("'relax_fit'", "Relaxation curve fitting,") uf.desc[-1].add_paragraph("The pipe bundling concept is simply a way of grouping data pipes together. This is useful for a number of purposes:") uf.desc[-1].add_list_element("The grouping or categorisation of data pipes, for example when multiple related analyses are performed.")