mailr5491 - /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:49:
Author: bugman
Date: Wed Apr  9 13:49:04 2008
New Revision: 5491

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

Empty MoleculeContainers and ResidueContainers 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=5491&r1=5490&r2=5491&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Wed Apr  9 13:49:04 2008
@@ -765,12 +765,20 @@
     res_num = 0
     res_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




Related Messages


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