mailr5089 - in /1.3: ./ data/ generic_fns/ maths_fns/ prompt/ sample_scripts/ specific_fns/ test_suite/system_tests/ test_suite/...


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

Header


Content

Posted by edward on February 21, 2008 - 10:54:
Author: bugman
Date: Thu Feb 21 10:54:10 2008
New Revision: 5089

URL: http://svn.gna.org/viewcvs/relax?rev=5089&view=rev
Log:
Merged the N-state model branch back into the 1.3 line.

The command used was:
svn merge -r3692:HEAD 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/N_state_model/ .

Although the branch was not complete, the future changes to the N-state model 
code will not affect
the rest of relax.  However, the merger was done because this branch was 
requiring significant
changes to the structural/PDB code (further abstractions and other API 
improvements).  This caused
a lot of individual changes to the generic_fns.stucture module being ported 
to the branch using
svnmerge, just for debugging.  The merger is best for both the branch and the 
stability of the 1.3
line.


Added:
    1.3/data/align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/data/align_tensor.py
    1.3/generic_fns/align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/generic_fns/align_tensor.py
    1.3/maths_fns/n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/maths_fns/n_state_model.py
    1.3/prompt/align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/prompt/align_tensor.py
    1.3/prompt/n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/prompt/n_state_model.py
    1.3/sample_scripts/N_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/sample_scripts/N_state_model.py
    1.3/specific_fns/n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/specific_fns/n_state_model.py
    1.3/test_suite/system_tests/n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/system_tests/n_state_model.py
    1.3/test_suite/system_tests/scripts/5_state_xz.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/system_tests/scripts/5_state_xz.py
    1.3/test_suite/unit_tests/_data/test_align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py
    1.3/test_suite/unit_tests/_generic_fns/test_align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_generic_fns/test_align_tensor.py
    1.3/test_suite/unit_tests/_maths_fns/test_n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_maths_fns/test_n_state_model.py
    1.3/test_suite/unit_tests/_prompt/test_align_tensor.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py
    1.3/test_suite/unit_tests/_prompt/test_n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py
    1.3/test_suite/unit_tests/_specific_fns/test_n_state_model.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/_specific_fns/test_n_state_model.py
    1.3/test_suite/unit_tests/align_tensor_testing_base.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/align_tensor_testing_base.py
    1.3/test_suite/unit_tests/n_state_model_testing_base.py
      - copied unchanged from r5088, 
branches/N_state_model/test_suite/unit_tests/n_state_model_testing_base.py
Modified:
    1.3/generic_fns/pipes.py
    1.3/maths_fns/chi2.py
    1.3/prompt/interpreter.py
    1.3/prompt/pipe.py
    1.3/prompt/value.py
    1.3/relax_errors.py
    1.3/specific_fns/__init__.py
    1.3/specific_fns/setup.py
    1.3/test_suite/system_tests/__init__.py

Modified: 1.3/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pipes.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/generic_fns/pipes.py (original)
+++ 1.3/generic_fns/pipes.py Thu Feb 21 10:54:10 2008
@@ -73,6 +73,7 @@
     @param pipe_type:   The new data pipe type which can be one of the 
following:
         'jw':  Reduced spectral density mapping,
         'mf':  Model-free analysis,
+        'N-state':  N-state model of domain dynamics,
         'noe':  Steady state NOE calculation,
         'relax_fit':  Relaxation curve fitting,
         'srls':  SRLS analysis.
@@ -80,7 +81,7 @@
     """
 
     # List of valid data pipe types.
-    valid = ['jw', 'mf', 'noe', 'relax_fit', 'srls']
+    valid = ['jw', 'mf', 'N-state', 'noe', 'relax_fit', 'srls']
 
     # Test if pipe_type is valid.
     if not pipe_type in valid:

Modified: 1.3/maths_fns/chi2.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/chi2.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/maths_fns/chi2.py (original)
+++ 1.3/maths_fns/chi2.py Thu Feb 21 10:54:10 2008
@@ -60,7 +60,7 @@
     """
 
     # Calculate the chi-squared statistic.
-    return sum((1.0 / errors * (data - back_calc_vals))**2)
+    return sum((1.0 / errors * (data - back_calc_vals))**2, axis=0)
 
 
 # Chi-squared gradient.
@@ -99,7 +99,7 @@
     """
 
     # Calculate the chi-squared gradient.
-    return -2.0 * sum(1.0 / (errors**2) * (data - back_calc_vals) * 
back_calc_grad)
+    return -2.0 * sum(1.0 / (errors**2) * (data - back_calc_vals) * 
back_calc_grad, axis=0)
 
 
 # Chi-squared Hessian.
@@ -144,8 +144,8 @@
     """
 
     # Calculate the chi-squared Hessian.
-    #return 2.0 * sum(1.0 / (errors**2) * (back_calc_grad_j * 
back_calc_grad_k - (data - back_calc_vals) * back_calc_hess))
-    #return 2.0 * sum((back_calc_grad_j * back_calc_grad_k - (data - 
back_calc_vals) * back_calc_hess) / errors**2)
+    #return 2.0 * sum(1.0 / (errors**2) * (back_calc_grad_j * 
back_calc_grad_k - (data - back_calc_vals) * back_calc_hess), axis=0)
+    #return 2.0 * sum((back_calc_grad_j * back_calc_grad_k - (data - 
back_calc_vals) * back_calc_hess) / errors**2, axis=0)
 
     # Calculate the chi-squared Hessian.
     # This is faster than the above sums, and having the errors term first 
appears to minimise roundoff errors.

Modified: 1.3/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/interpreter.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/prompt/interpreter.py (original)
+++ 1.3/prompt/interpreter.py Thu Feb 21 10:54:10 2008
@@ -49,6 +49,7 @@
 from model_selection import Modsel
 
 # User classes.
+from align_tensor import Align_tensor
 from dasha import Dasha
 from diffusion_tensor import Diffusion_tensor
 from grace import Grace
@@ -57,6 +58,7 @@
 from molmol import Molmol
 from molecule import Molecule
 from monte_carlo import Monte_carlo
+from n_state_model import N_state_model
 from noe import Noe
 from palmer import Palmer
 from residue import Residue
@@ -125,6 +127,7 @@
         self._system = system
 
         # Place the user classes into the interpreter class namespace.
+        self._Align_tensor = Align_tensor(relax)
         self._Dasha = Dasha(relax)
         self._Diffusion_tensor = Diffusion_tensor(relax)
         self._OpenDX = OpenDX(relax)
@@ -134,6 +137,7 @@
         self._Molmol = Molmol(relax)
         self._Molecule = Molecule(relax)
         self._Monte_carlo = Monte_carlo(relax)
+        self._N_state_model = N_state_model(relax)
         self._Noe = Noe(relax)
         self._Palmer = Palmer(relax)
         self._Residue = Residue(relax)
@@ -187,6 +191,7 @@
         model_selection = self._Modsel.model_selection
 
         # Place the user classes in the local namespace.
+        align_tensor = self._Align_tensor
         dasha = self._Dasha
         diffusion_tensor = self._Diffusion_tensor
         dx = self._OpenDX
@@ -196,6 +201,7 @@
         molmol = self._Molmol
         molecule = self._Molecule
         monte_carlo = self._Monte_carlo
+        n_state_model = self._N_state_model
         noe = self._Noe
         palmer = self._Palmer
         structure = self._Structure

Modified: 1.3/prompt/pipe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/pipe.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/prompt/pipe.py (original)
+++ 1.3/prompt/pipe.py Thu Feb 21 10:54:10 2008
@@ -112,6 +112,7 @@
 
             'jw':  Reduced spectral density mapping,
             'mf':  Model-free analysis,
+            'N-state':  N-state model of domain motions,
             'noe':  Steady state NOE calculation,
             'relax_fit':  Relaxation curve fitting,
             'srls':  SRLS analysis.

Modified: 1.3/prompt/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/value.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/prompt/value.py (original)
+++ 1.3/prompt/value.py Thu Feb 21 10:54:10 2008
@@ -32,6 +32,7 @@
 from specific_fns.model_free import Model_free
 from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.relax_fit import Relax_fit
+from specific_fns.n_state_model import N_state_model
 from specific_fns.noe import Noe
 
 
@@ -509,12 +510,15 @@
     copy.__doc__ = copy.__doc__ + Jw_mapping.return_data_name.__doc__ + "\n"
     copy.__doc__ = copy.__doc__ + Relax_fit.set_doc.__doc__ + "\n"
     copy.__doc__ = copy.__doc__ + Relax_fit.return_data_name.__doc__ + "\n"
+    copy.__doc__ = copy.__doc__ + N_state_model.set_doc.__doc__ + "\n"
+    copy.__doc__ = copy.__doc__ + N_state_model.return_data_name.__doc__ + 
"\n"
 
     # Display function.
     display.__doc__ = display.__doc__ + "\n\n" + regexp_doc() + "\n"
     display.__doc__ = display.__doc__ + Model_free.return_data_name.__doc__ 
+ "\n\n"
     display.__doc__ = display.__doc__ + Jw_mapping.return_data_name.__doc__ 
+ "\n"
     display.__doc__ = display.__doc__ + Relax_fit.return_data_name.__doc__ + 
"\n"
+    display.__doc__ = display.__doc__ + 
N_state_model.return_data_name.__doc__ + "\n"
 
     # Read function.
     read.__doc__ = read.__doc__ + "\n\n" + regexp_doc() + "\n"
@@ -524,6 +528,8 @@
     read.__doc__ = read.__doc__ + Jw_mapping.return_data_name.__doc__ + "\n"
     read.__doc__ = read.__doc__ + Relax_fit.set_doc.__doc__ + "\n"
     read.__doc__ = read.__doc__ + Relax_fit.return_data_name.__doc__ + "\n"
+    read.__doc__ = read.__doc__ + N_state_model.set_doc.__doc__ + "\n"
+    read.__doc__ = read.__doc__ + N_state_model.return_data_name.__doc__ + 
"\n"
 
     # Set function.
     set.__doc__ = set.__doc__ + "\n\n" + regexp_doc() + "\n"
@@ -539,6 +545,9 @@
     set.__doc__ = set.__doc__ + Relax_fit.set_doc.__doc__ + "\n"
     set.__doc__ = set.__doc__ + Relax_fit.return_data_name.__doc__ + "\n"
     set.__doc__ = set.__doc__ + Relax_fit.default_value.__doc__ + "\n\n"
+    set.__doc__ = set.__doc__ + N_state_model.set_doc.__doc__ + "\n"
+    set.__doc__ = set.__doc__ + N_state_model.return_data_name.__doc__ + "\n"
+    set.__doc__ = set.__doc__ + N_state_model.default_value.__doc__ + "\n\n"
 
     # Write function.
     write.__doc__ = write.__doc__ + "\n\n" + regexp_doc() + "\n"
@@ -546,3 +555,4 @@
     write.__doc__ = write.__doc__ + Jw_mapping.return_data_name.__doc__ + 
"\n\n"
     write.__doc__ = write.__doc__ + Noe.return_data_name.__doc__ + "\n"
     write.__doc__ = write.__doc__ + Relax_fit.return_data_name.__doc__ + "\n"
+    write.__doc__ = write.__doc__ + N_state_model.return_data_name.__doc__ + 
"\n"

Modified: 1.3/relax_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax_errors.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/relax_errors.py (original)
+++ 1.3/relax_errors.py Thu Feb 21 10:54:10 2008
@@ -375,6 +375,13 @@
         if Debug:
             self.save_state()
 
+# None or list of strings.
+class RelaxNoneListstrError(BaseError):
+    def __init__(self, name, value):
+        self.text = "The " + name + " argument " + `value` + " must either 
be an array of strings or None."
+        if Debug:
+            self.save_state()
+
 # None or number.
 class RelaxNoneNumError(BaseError):
     def __init__(self, name, value):
@@ -621,8 +628,11 @@
 
 # The model has not been setup.
 class RelaxNoModelError(BaseError):
-    def __init__(self, pipe):
-        self.text = "The models corresponding to the data pipe " + `pipe` + 
" have not been setup."
+    def __init__(self, name=None):
+        if name != None:
+            self.text = "The " + name + " model has not been setup."
+        else:
+            self.text = "The model has not been setup."
         if Debug:
             self.save_state()
 

Modified: 1.3/specific_fns/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/__init__.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/specific_fns/__init__.py (original)
+++ 1.3/specific_fns/__init__.py Thu Feb 21 10:54:10 2008
@@ -29,6 +29,7 @@
             'hybrid',
             'jw_mapping',
             'model_free',
+            'n_state_model',
             'noe',
             'relax_data',
             'relax_fit']

Modified: 1.3/specific_fns/setup.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/setup.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/specific_fns/setup.py (original)
+++ 1.3/specific_fns/setup.py Thu Feb 21 10:54:10 2008
@@ -24,6 +24,7 @@
 from specific_fns.hybrid import Hybrid
 from specific_fns.jw_mapping import Jw_mapping
 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_fit import Relax_fit
 from relax_errors import RelaxError, RelaxFuncSetupError
@@ -33,6 +34,7 @@
 hybrid_obj = Hybrid()
 jw_mapping_obj = Jw_mapping()
 model_free_obj = Model_free()
+n_state_model_obj = N_state_model()
 noe_obj = Noe()
 relax_fit_obj = Relax_fit()
 
@@ -229,6 +231,10 @@
     if function_type == 'noe':
         return noe_obj
 
+    # The N-state model.
+    if function_type == 'N-state':
+        return n_state_model_obj
+
     # Relaxation curve fitting.
     if function_type == 'relax_fit':
         return relax_fit_obj
@@ -256,6 +262,10 @@
     if function_type == 'noe':
         return "NOE calculations"
 
+    # The N-state model.
+    if function_type == 'N-state':
+        return "the N-state model"
+
     # Relaxation curve fitting.
     if function_type == 'relax_fit':
         return "relaxation curve fitting"

Modified: 1.3/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/__init__.py?rev=5089&r1=5088&r2=5089&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/__init__.py (original)
+++ 1.3/test_suite/system_tests/__init__.py Thu Feb 21 10:54:10 2008
@@ -33,6 +33,7 @@
 from jw_mapping import Jw
 from model_free import Mf
 from model_selection import Modsel
+from n_state_model import N_state_model
 from pipe_create import Pipe_create
 from relax_fit import Relax_fit
 from sequence import Sequence
@@ -78,6 +79,7 @@
         suite_array.append(TestLoader().loadTestsFromTestCase(Relax_fit))
         suite_array.append(TestLoader().loadTestsFromTestCase(Sequence))
         suite_array.append(TestLoader().loadTestsFromTestCase(Pipe_create))
+        suite_array.append(TestLoader().loadTestsFromTestCase(N_state_model))
 
         # Add the relax namespace to each TestCase object.
         for i in xrange(len(suite_array)):




Related Messages


Powered by MHonArc, Updated Thu Feb 21 11:00:44 2008