mailr19771 - in /branches/relax_disp: auto_analyses/relax_disp.py specific_analyses/relax_disp/__init__.py


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

Header


Content

Posted by edward on May 29, 2013 - 15:05:
Author: bugman
Date: Wed May 29 15:05:01 2013
New Revision: 19771

URL: http://svn.gna.org/viewcvs/relax?rev=19771&view=rev
Log:
The log barrier constraint algorithm is now used for the relaxation 
dispersion optimisation.

This is to allow constraints in the absence of gradient target functions.  
The constraints have been
turned on by default in the auto-analysis.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py
    branches/relax_disp/specific_analyses/relax_disp/__init__.py

Modified: branches/relax_disp/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=19771&r1=19770&r2=19771&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Wed May 29 15:05:01 2013
@@ -157,13 +157,13 @@
         self.interpreter.grid_search(inc=self.grid_inc)
 
         # Minimise.
-        self.interpreter.minimise('simplex', constraints=False)
+        self.interpreter.minimise('simplex', constraints=True)
 
         # Monte Carlo simulations.
         self.interpreter.monte_carlo.setup(number=self.mc_sim_num)
         self.interpreter.monte_carlo.create_data()
         self.interpreter.monte_carlo.initial_values()
-        self.interpreter.minimise('simplex', constraints=False)
+        self.interpreter.minimise('simplex', constraints=True)
         self.interpreter.monte_carlo.error_analysis()
 
 

Modified: branches/relax_disp/specific_analyses/relax_disp/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/__init__.py?rev=19771&r1=19770&r2=19771&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Wed May 29 
15:05:01 2013
@@ -355,14 +355,14 @@
                     for frq, point in loop_frq_point():
                         # Loop over the parameters.
                         for i in range(len(spin.params)):
-                            # R2eff relaxation rate (from 0 to 40 s^-1).
+                            # R2eff relaxation rate (from 1 to 40 s^-1).
                             if spin.params[i] == 'r2eff':
-                                lower.append(0.0)
+                                lower.append(1.0)
                                 upper.append(40.0)
 
                             # Intensity.
                             elif spin.params[i] == 'i0':
-                                lower.append(0.0)
+                                lower.append(0.0001)
                                 upper.append(max(spin.intensities.values()))
 
             # All other models.
@@ -370,34 +370,34 @@
                 # Only use the parameters of the first spin of the cluster.
                 spin = spins[0]
                 for i in range(len(spin.params)):
-                    # R2 relaxation rate (from 0 to 40 s^-1).
+                    # R2 relaxation rate (from 1 to 40 s^-1).
                     if spin.params[i] == 'r2':
-                        lower.append(0.0)
+                        lower.append(1.0)
                         upper.append(40.0)
 
                     # The pA.pB.dw**2/wH**2 parameter.
                     elif spin.params[i] == 'phi_ex':
-                        lower.append(0.0)
+                        lower.append(1e-20)
                         upper.append(1e-17)
 
                     # Exchange rate.
                     elif spin.params[i] == 'kex':
-                        lower.append(0.0)
+                        lower.append(1.0)
                         upper.append(100000.0)
 
                     # Transversal relaxation rate for state A.
                     elif spin.params[i] == 'r2a':
-                        lower.append(0.0)
+                        lower.append(1.0)
                         upper.append(20.0)
 
                     # Exchange rate from state A to state B.
                     elif spin.params[i] == 'ka':
-                        lower.append(0.0)
+                        lower.append(1.0)
                         upper.append(100000.0)
 
                     # Chemical shift difference between states A and B.
                     elif spin.params[i] == 'dw':
-                        lower.append(0.0)
+                        lower.append(1.0)
                         upper.append(10000.0)
 
         # The full grid size.
@@ -902,6 +902,17 @@
                 spin.r2eff_err[param_key] = std(values)
 
 
+    def constraint_algorithm(self):
+        """Return the 'Log barrier' optimisation constraint algorithm.
+
+        @return:    The 'Log barrier' constraint algorithm.
+        @rtype:     str
+        """
+
+        # The log barrier algorithm, as required by minfx.
+        return 'Log barrier'
+
+
     def create_mc_data(self, data_id):
         """Create the Monte Carlo peak intensity data.
 




Related Messages


Powered by MHonArc, Updated Wed May 29 15:40:02 2013