mailr5872 - /1.3/generic_fns/selection.py


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

Header


Content

Posted by edward on April 20, 2008 - 20:02:
Author: bugman
Date: Sun Apr 20 20:02:22 2008
New Revision: 5872

URL: http://svn.gna.org/viewcvs/relax?rev=5872&view=rev
Log:
Fix for the Selection.contains_mol() method.

If the molecule name is None and there are no molecules in the selection 
object, the function
returns True.


Modified:
    1.3/generic_fns/selection.py

Modified: 1.3/generic_fns/selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/selection.py?rev=5872&r1=5871&r2=5872&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Sun Apr 20 20:02:22 2008
@@ -286,6 +286,13 @@
         if mol in self.molecules:
             return True
 
+        # Double nothingness.
+        if mol == None and not self.molecules:
+            return True
+
+        # No match.
+        return False
+
 
     def intersection(self, select_obj0, select_obj1):
         """Make this Selection object the intersection of two other 
Selection objects.




Related Messages


Powered by MHonArc, Updated Sun Apr 20 20:20:30 2008