mailr13649 - /branches/gui_testing/generic_fns/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 July 15, 2011 - 14:02:
Author: bugman
Date: Fri Jul 15 14:02:11 2011
New Revision: 13649

URL: http://svn.gna.org/viewcvs/relax?rev=13649&view=rev
Log:
Created the generic_fns.mol_res_spin.are_spins_named() for determining if any 
spins are named.


Modified:
    branches/gui_testing/generic_fns/mol_res_spin.py

Modified: branches/gui_testing/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/generic_fns/mol_res_spin.py?rev=13649&r1=13648&r2=13649&view=diff
==============================================================================
--- branches/gui_testing/generic_fns/mol_res_spin.py (original)
+++ branches/gui_testing/generic_fns/mol_res_spin.py Fri Jul 15 14:02:11 2011
@@ -484,6 +484,25 @@
         # Create the union.
         self._union = (select_obj0, select_obj1)
 
+
+
+def are_spins_named(spin_id=None):
+    """Determine if any spins have been named.
+
+    @keyword spin_id:   The spin ID string.
+    @type spin_id:      None or str
+    @return:            True if a spin has been named or False if no spins 
have been named.
+    @rtype:             bool
+    """
+
+    # Loop over the spins.
+    for spin in spin_loop(spin_id):
+        # The spin is named.
+        if spin.name != None:
+            return True
+
+    # No spins have been named.
+    return False
 
 
 def bmrb_read(star):




Related Messages


Powered by MHonArc, Updated Fri Jul 15 14:20:02 2011