mailr9898 - /1.3/generic_fns/minimise.py


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

Header


Content

Posted by edward on November 24, 2009 - 11:07:
Author: bugman
Date: Tue Nov 24 11:07:36 2009
New Revision: 9898

URL: http://svn.gna.org/viewcvs/relax?rev=9898&view=rev
Log:
Alphabetical ordering of the functions.


Modified:
    1.3/generic_fns/minimise.py

Modified: 1.3/generic_fns/minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/minimise.py?rev=9898&r1=9897&r2=9898&view=diff
==============================================================================
--- 1.3/generic_fns/minimise.py (original)
+++ 1.3/generic_fns/minimise.py Tue Nov 24 11:07:36 2009
@@ -31,83 +31,6 @@
 from generic_fns import pipes
 from relax_errors import RelaxError
 import specific_fns
-
-
-def reset_min_stats(data_pipe=None, spin=None):
-    """Function for resetting the minimisation statistics.
-
-    @param data_pipe:   The name of the data pipe to reset the minimisation 
statisics of.  This
-                        defaults to the current data pipe.
-    @type data_pipe:    str
-    @param spin:        The spin data container if spin specific data is to 
be reset.
-    @type spin:         SpinContainer
-    """
-
-    # The data pipe.
-    if data_pipe == None:
-        data_pipe = pipes.cdp_name()
-
-    # Get the data pipe.
-    dp = pipes.get_pipe(data_pipe)
-
-
-    # Global minimisation statistics.
-    #################################
-
-    # Chi-squared.
-    if hasattr(dp, 'chi2'):
-        dp.chi2 = None
-
-    # Iteration count.
-    if hasattr(dp, 'iter'):
-        dp.iter = None
-
-    # Function count.
-    if hasattr(dp, 'f_count'):
-        dp.f_count = None
-
-    # Gradient count.
-    if hasattr(dp, 'g_count'):
-        dp.g_count = None
-
-    # Hessian count.
-    if hasattr(dp, 'h_count'):
-        dp.h_count = None
-
-    # Warning.
-    if hasattr(dp, 'warning'):
-        dp.warning = None
-
-
-    # Sequence specific minimisation statistics.
-    ############################################
-
-    # Loop over all spins.
-    for spin in spin_loop():
-        # Chi-squared.
-        if hasattr(spin, 'chi2'):
-            spin.chi2 = None
-
-        # Iteration count.
-        if hasattr(spin, 'iter'):
-            spin.iter = None
-
-        # Function count.
-        if hasattr(spin, 'f_count'):
-            spin.f_count = None
-
-        # Gradient count.
-        if hasattr(spin, 'g_count'):
-            spin.g_count = None
-
-        # Hessian count.
-        if hasattr(spin, 'h_count'):
-            spin.h_count = None
-
-        # Warning.
-        if hasattr(spin, 'warning'):
-            spin.warning = None
-
 
 
 def calc(verbosity=1):
@@ -239,6 +162,82 @@
         minimise(min_algor=min_algor, min_options=min_options, 
func_tol=func_tol, grad_tol=grad_tol, max_iterations=max_iterations, 
constraints=constraints, scaling=scaling, verbosity=verbosity)
 
 
+def reset_min_stats(data_pipe=None, spin=None):
+    """Function for resetting the minimisation statistics.
+
+    @param data_pipe:   The name of the data pipe to reset the minimisation 
statisics of.  This
+                        defaults to the current data pipe.
+    @type data_pipe:    str
+    @param spin:        The spin data container if spin specific data is to 
be reset.
+    @type spin:         SpinContainer
+    """
+
+    # The data pipe.
+    if data_pipe == None:
+        data_pipe = pipes.cdp_name()
+
+    # Get the data pipe.
+    dp = pipes.get_pipe(data_pipe)
+
+
+    # Global minimisation statistics.
+    #################################
+
+    # Chi-squared.
+    if hasattr(dp, 'chi2'):
+        dp.chi2 = None
+
+    # Iteration count.
+    if hasattr(dp, 'iter'):
+        dp.iter = None
+
+    # Function count.
+    if hasattr(dp, 'f_count'):
+        dp.f_count = None
+
+    # Gradient count.
+    if hasattr(dp, 'g_count'):
+        dp.g_count = None
+
+    # Hessian count.
+    if hasattr(dp, 'h_count'):
+        dp.h_count = None
+
+    # Warning.
+    if hasattr(dp, 'warning'):
+        dp.warning = None
+
+
+    # Sequence specific minimisation statistics.
+    ############################################
+
+    # Loop over all spins.
+    for spin in spin_loop():
+        # Chi-squared.
+        if hasattr(spin, 'chi2'):
+            spin.chi2 = None
+
+        # Iteration count.
+        if hasattr(spin, 'iter'):
+            spin.iter = None
+
+        # Function count.
+        if hasattr(spin, 'f_count'):
+            spin.f_count = None
+
+        # Gradient count.
+        if hasattr(spin, 'g_count'):
+            spin.g_count = None
+
+        # Hessian count.
+        if hasattr(spin, 'h_count'):
+            spin.h_count = None
+
+        # Warning.
+        if hasattr(spin, 'warning'):
+            spin.warning = None
+
+
 def return_conversion_factor(stat_type, spin):
     """Dummy function for returning 1.0.
 




Related Messages


Powered by MHonArc, Updated Tue Nov 24 11:20:01 2009