mailr5716 - /branches/spin_loop_bool/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 14, 2008 - 21:59:
Author: bugman
Date: Mon Apr 14 21:59:10 2008
New Revision: 5716

URL: http://svn.gna.org/viewcvs/relax?rev=5716&view=rev
Log:
Changed the spin_index_loop() function to use the same form as spin_loop().


Modified:
    branches/spin_loop_bool/generic_fns/selection.py

Modified: branches/spin_loop_bool/generic_fns/selection.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spin_loop_bool/generic_fns/selection.py?rev=5716&r1=5715&r2=5716&view=diff
==============================================================================
--- branches/spin_loop_bool/generic_fns/selection.py (original)
+++ branches/spin_loop_bool/generic_fns/selection.py Mon Apr 14 21:59:10 2008
@@ -1245,20 +1245,21 @@
 
     # Loop over the molecules.
     for mol_index in xrange(len(relax_data_store[pipe].mol)):
-        # Skip the molecule if there is no match to the selection.
-        if relax_data_store[pipe].mol[mol_index] not in select_obj:
-            continue
+        # Alias the molecule container.
+        mol = relax_data_store[pipe].mol[mol_index]
 
         # Loop over the residues.
         for res_index in 
xrange(len(relax_data_store[pipe].mol[mol_index].res)):
-            # Skip the residue if there is no match to the selection.
-            if relax_data_store[pipe].mol[mol_index].res[res_index] not in 
select_obj:
-                continue
+            # Alias the residue container.
+            res = relax_data_store[pipe].mol[mol_index].res[res_index]
 
             # Loop over the spins.
             for spin_index in 
xrange(len(relax_data_store[pipe].mol[mol_index].res[res_index].spin)):
+                # Alias the spin container.
+                spin = 
relax_data_store[pipe].mol[mol_index].res[res_index].spin[spin_index]
+
                 # Skip the spin if there is no match to the selection.
-                if 
relax_data_store[pipe].mol[mol_index].res[res_index].spin[spin_index] not in 
select_obj:
+                if (mol, res, spin) not in select_obj:
                     continue
 
                 # Yield the spin system specific indecies.




Related Messages


Powered by MHonArc, Updated Mon Apr 14 22:20:16 2008