mailr8787 - /1.3/specific_fns/n_state_model.py


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

Header


Content

Posted by edward on February 12, 2009 - 09:52:
Author: bugman
Date: Thu Feb 12 09:52:45 2009
New Revision: 8787

URL: http://svn.gna.org/viewcvs/relax?rev=8787&view=rev
Log:
Modified the grid_search() method to handle alignment tensor parameters 
(which aren't in cdp.params).


Modified:
    1.3/specific_fns/n_state_model.py

Modified: 1.3/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=8787&r1=8786&r2=8787&view=diff
==============================================================================
--- 1.3/specific_fns/n_state_model.py (original)
+++ 1.3/specific_fns/n_state_model.py Thu Feb 12 09:52:45 2009
@@ -1156,15 +1156,21 @@
 
         # Set the grid search options.
         for i in xrange(n):
-            # Probabilities (default values).
-            if search('^p', cdp.params[i]):
-                grid_ops.append([inc[i], 0.0, 1.0])
-
-            # Angles (default values).
-            if search('^alpha', cdp.params[i]) or search('^gamma', 
cdp.params[i]):
-                grid_ops.append([inc[i], 0.0, 2*pi])
-            elif search('^beta', cdp.params[i]):
-                grid_ops.append([inc[i], 0.0, pi])
+            # i is in the parameter array.
+            if i < len(cdp.params):
+                # Probabilities (default values).
+                if search('^p', cdp.params[i]):
+                    grid_ops.append([inc[i], 0.0, 1.0])
+
+                # Angles (default values).
+                if search('^alpha', cdp.params[i]) or search('^gamma', 
cdp.params[i]):
+                    grid_ops.append([inc[i], 0.0, 2*pi])
+                elif search('^beta', cdp.params[i]):
+                    grid_ops.append([inc[i], 0.0, pi])
+
+            # Otherwise this must be an alignment tensor component.
+            else:
+                grid_ops.append([inc[i], 0.0, 1e-3])
 
             # Lower bound (if supplied).
             if lower:




Related Messages


Powered by MHonArc, Updated Thu Feb 12 10:00:02 2009