mailr11499 - /1.3/specific_fns/frame_order.py


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

Header


Content

Posted by edward on August 12, 2010 - 17:00:
Author: bugman
Date: Thu Aug 12 17:00:01 2010
New Revision: 11499

URL: http://svn.gna.org/viewcvs/relax?rev=11499&view=rev
Log:
Parameters can be fixed to the original values during the frame order grid 
search.


Modified:
    1.3/specific_fns/frame_order.py

Modified: 1.3/specific_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/frame_order.py?rev=11499&r1=11498&r2=11499&view=diff
==============================================================================
--- 1.3/specific_fns/frame_order.py (original)
+++ 1.3/specific_fns/frame_order.py Thu Aug 12 17:00:01 2010
@@ -874,6 +874,11 @@
 
         # Generate the grid.
         for i in range(n):
+            # Fixed parameter.
+            if incs[i] == None:
+                grid.append(None)
+                continue
+
             # Reset.
             dist_type = None
             end_point = True
@@ -924,6 +929,10 @@
         # Total number of points.
         total_pts = 1
         for i in range(n):
+            # Fixed parameter.
+            if grid[i] == None:
+                continue
+
             total_pts = total_pts * len(grid[i])
 
         # Build the points array.
@@ -932,12 +941,18 @@
         for i in range(total_pts):
             # Loop over the dimensions.
             for j in range(n):
+                # Fixed parameter.
+                if grid[j] == None:
+                    # Get the current parameter value.
+                    pts[i, j] = getattr(cdp, cdp.params[j])
+
                 # Add the point coordinate.
-                pts[i, j] = grid[j][indices[j]]
+                else:
+                    pts[i, j] = grid[j][indices[j]]
 
             # Increment the step positions.
             for j in range(n):
-                if indices[j] < incs[j]-1:
+                if incs[j] != None and indices[j] < incs[j]-1:
                     indices[j] += 1
                     break    # Exit so that the other step numbers are not 
incremented.
                 else:




Related Messages


Powered by MHonArc, Updated Thu Aug 12 17:20:02 2010