mailr24722 - /trunk/specific_analyses/frame_order/parameter_object.py


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

Header


Content

Posted by edward on July 24, 2014 - 17:47:
Author: bugman
Date: Thu Jul 24 17:47:04 2014
New Revision: 24722

URL: http://svn.gna.org/viewcvs/relax?rev=24722&view=rev
Log:
The frame order grid search bound functions can now handle increment values 
of None or 1.

These cases are now caught and the full lower or upper bound is now returned.


Modified:
    trunk/specific_analyses/frame_order/parameter_object.py

Modified: trunk/specific_analyses/frame_order/parameter_object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/parameter_object.py?rev=24722&r1=24721&r2=24722&view=diff
==============================================================================
--- trunk/specific_analyses/frame_order/parameter_object.py     (original)
+++ trunk/specific_analyses/frame_order/parameter_object.py     Thu Jul 24 
17:47:04 2014
@@ -41,6 +41,10 @@
     @rtype:                 float
     """
 
+    # Handle inc values of None or 1.
+    if incs in [None, 1]:
+        return 2.0 * pi
+
     # Return the upper limit which is one inc before 2pi.
     return 2.0*pi * (1.0 - 1.0/incs)
 
@@ -56,6 +60,10 @@
     @rtype:                 float
     """
 
+    # Handle inc values of None or 1.
+    if incs in [None, 1]:
+        return pi
+
     # Return the upper limit which is one inc before pi.
     return pi * (1.0 - 1.0/incs)
 
@@ -71,6 +79,10 @@
     @rtype:                 float
     """
 
+    # Handle inc values of None or 1.
+    if incs in [None, 1]:
+        return 0.0
+
     # Return the lower limit, excluding the first point.
     return pi * (1.0/incs)
 
@@ -85,6 +97,10 @@
     @return:                The upper grid search bound for the cone and 
torsion angles.
     @rtype:                 float
     """
+
+    # Handle inc values of None or 1.
+    if incs in [None, 1]:
+        return pi
 
     # Return the upper limit, excluding the last point.
     return pi * (1.0 - 1.0/incs)




Related Messages


Powered by MHonArc, Updated Thu Jul 24 18:00:02 2014