mailr5493 - /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 09, 2008 - 13:52:
Author: bugman
Date: Wed Apr  9 13:52:08 2008
New Revision: 5493

URL: http://svn.gna.org/viewcvs/relax?rev=5493&view=rev
Log:
Bug fix for the return_spin() function.

Empty MoleculeContainers, ResidueContainers, and SpinContainers are skipped 
to avoid returning them.


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=5493&r1=5492&r2=5493&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Wed Apr  9 13:52:08 2008
@@ -827,18 +827,30 @@
     spin_num = 0
     spin_container = None
     for mol in relax_data_store[pipe].mol:
+        # Skip empty MoleculeContainers.
+        if mol.is_empty():
+            continue
+
         # Skip the molecule if there is no match to the selection.
         if mol not in select_obj:
             continue
 
         # Loop over the residues.
         for res in mol.res:
+            # Skip empty ResidueContainers.
+            if res.is_empty():
+                continue
+
             # Skip the residue if there is no match to the selection.
             if res not in select_obj:
                 continue
 
             # Loop over the spins.
             for spin in res.spin:
+                # Skip empty SpinContainers.
+                if spin.is_empty():
+                    continue
+
                 # Skip the spin if there is no match to the selection.
                 if spin not in select_obj:
                     continue




Related Messages


Powered by MHonArc, Updated Wed Apr 09 14:00:17 2008