mailr8338 - in /branches/relax_disp: generic_fns/ prompt/ specific_fns/


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

Header


Content

Posted by sebastien . morin . 1 on January 08, 2009 - 17:17:
Author: semor
Date: Thu Jan  8 17:17:32 2009
New Revision: 8338

URL: http://svn.gna.org/viewcvs/relax?rev=8338&view=rev
Log:
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/generic_fns/pipes.py
    branches/relax_disp/prompt/__init__.py
    branches/relax_disp/prompt/interpreter.py
    branches/relax_disp/prompt/pipe.py
    branches/relax_disp/specific_fns/__init__.py
    branches/relax_disp/specific_fns/relax_disp.py
    branches/relax_disp/specific_fns/setup.py

Modified: branches/relax_disp/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/generic_fns/pipes.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/generic_fns/pipes.py (original)
+++ branches/relax_disp/generic_fns/pipes.py Thu Jan  8 17:17:32 2009
@@ -74,8 +74,8 @@
         'mf':  Model-free analysis,
         'N-state':  N-state model of domain dynamics,
         'noe':  Steady state NOE calculation,
+        'relax_disp':  Relaxation dispersion,
         'relax_fit':  Relaxation curve fitting,
-        'relax_disp':  Relaxation dispersion,
         'srls':  SRLS analysis.
     @type pipe_type:    str
     @keyword switch:    If True, this new pipe will be switched to, 
otherwise the current data pipe

Modified: branches/relax_disp/prompt/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/prompt/__init__.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/prompt/__init__.py (original)
+++ branches/relax_disp/prompt/__init__.py Thu Jan  8 17:17:32 2009
@@ -46,6 +46,7 @@
            'palmer',
            'pymol',
            'relax_data',
+           'relax_disp',
            'relax_fit',
            'reset',
            'pipe',

Modified: branches/relax_disp/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/prompt/interpreter.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/prompt/interpreter.py (original)
+++ branches/relax_disp/prompt/interpreter.py Thu Jan  8 17:17:32 2009
@@ -77,6 +77,7 @@
 from pymol import Pymol
 from rdc import RDC
 from relax_data import Relax_data
+from relax_disp import Relax_disp
 from relax_fit import Relax_fit
 from results import Results
 from pipe import Pipe
@@ -162,6 +163,7 @@
         self._Pymol = Pymol(relax)
         self._RDC = RDC(relax)
         self._Relax_data = Relax_data(relax)
+        self._Relax_disp = Relax_disp(relax)
         self._Relax_fit = Relax_fit(relax)
         self._Results = Results(relax)
         self._Pipe = Pipe(relax)
@@ -231,6 +233,7 @@
         pymol = self._Pymol
         rdc = self._RDC
         relax_data = self._Relax_data
+        relax_disp = self._Relax_disp
         relax_fit = self._Relax_fit
         residue = self._Residue
         results = self._Results

Modified: branches/relax_disp/prompt/pipe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/prompt/pipe.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/prompt/pipe.py (original)
+++ branches/relax_disp/prompt/pipe.py Thu Jan  8 17:17:32 2009
@@ -118,6 +118,7 @@
             'mf':  Model-free analysis,
             'N-state':  N-state model of domain motions,
             'noe':  Steady state NOE calculation,
+            'relax_disp':  Relaxation dispersion curve fitting,
             'relax_fit':  Relaxation curve fitting,
             'srls':  SRLS analysis.
 

Modified: branches/relax_disp/specific_fns/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/__init__.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/__init__.py (original)
+++ branches/relax_disp/specific_fns/__init__.py Thu Jan  8 17:17:32 2009
@@ -32,4 +32,5 @@
             'model_free',
             'n_state_model',
             'noe',
+            'relax_disp',
             'relax_fit']

Modified: branches/relax_disp/specific_fns/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/relax_disp.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/relax_disp.py (original)
+++ branches/relax_disp/specific_fns/relax_disp.py Thu Jan  8 17:17:32 2009
@@ -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_fns/setup.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/setup.py?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/setup.py (original)
+++ branches/relax_disp/specific_fns/setup.py Thu Jan  8 17:17:32 2009
@@ -27,6 +27,7 @@
 from specific_fns.model_free import Model_free
 from specific_fns.n_state_model import N_state_model
 from specific_fns.noe import Noe
+from specific_fns.relax_disp import Relax_disp
 from specific_fns.relax_fit import Relax_fit
 from relax_errors import RelaxError, RelaxFuncSetupError
 
@@ -38,6 +39,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()
 
 
@@ -265,6 +267,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
@@ -300,6 +306,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"




Related Messages


Powered by MHonArc, Updated Thu Jan 08 18:00:03 2009