mailr5477 - /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:02:33 2008
New Revision: 5477

URL: http://svn.gna.org/viewcvs/relax?rev=5477&view=rev
Log:
Created the SpinList.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=5477&r1=5476&r2=5477&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Wed Apr  9 11:02:33 2008
@@ -157,6 +157,22 @@
             self.append(SpinContainer(spin_name, spin_num, select))
 
 
+    def is_empty(self):
+        """Method for testing if this SpinList object is empty.
+
+        @return:    True if this list only has one SpinContainer and the 
spin number and name have
+                    not been set, False otherwise.
+        @rtype:     bool
+        """
+
+        # There is only one SpinContainer and it is empty.
+        if len(self) == 1 and self[0].is_empty():
+            return True
+
+        # Otherwise.
+        return False
+
+
 
 # The residue data.
 ###################




Related Messages


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