mailr5478 - /1.3/data/mol_res_spin.py


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

Header


Content

Posted by edward on April 09, 2008 - 11:19:
Author: bugman
Date: Wed Apr  9 11:05:36 2008
New Revision: 5478

URL: http://svn.gna.org/viewcvs/relax?rev=5478&view=rev
Log:
Created the ResidueList.is_empty() method.


Modified:
    1.3/data/mol_res_spin.py

Modified: 1.3/data/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/mol_res_spin.py?rev=5478&r1=5477&r2=5478&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Wed Apr  9 11:05:36 2008
@@ -310,6 +310,22 @@
             self.append(ResidueContainer(res_name, res_num, select))
 
 
+    def is_empty(self):
+        """Method for testing if this ResidueList object is empty.
+
+        @return:    True if this list only has one ResidueContainer and the 
residue number and name
+                    have not been set, False otherwise.
+        @rtype:     bool
+        """
+
+        # There is only one ResidueContainer and it is empty.
+        if len(self) == 1 and self[0].is_empty():
+            return True
+
+        # Otherwise.
+        return False
+
+
 
 # The molecule data.
 ###################




Related Messages


Powered by MHonArc, Updated Wed Apr 09 11:40:12 2008