mailr24554 - /branches/zooming_grid_search/specific_analyses/api_common.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 17, 2014 - 16:45:
Author: bugman
Date: Thu Jul 17 16:45:06 2014
New Revision: 24554

URL: http://svn.gna.org/viewcvs/relax?rev=24554&view=rev
Log:
Modified the specific analysis API _model_loop_spin() common method.

This now additionally returns the spin ID string to allow the corresponding 
spin container to be
identified.


Modified:
    branches/zooming_grid_search/specific_analyses/api_common.py

Modified: branches/zooming_grid_search/specific_analyses/api_common.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/api_common.py?rev=24554&r1=24553&r2=24554&view=diff
==============================================================================
--- branches/zooming_grid_search/specific_analyses/api_common.py        
(original)
+++ branches/zooming_grid_search/specific_analyses/api_common.py        Thu 
Jul 17 16:45:06 2014
@@ -227,21 +227,21 @@
     def _model_loop_spin(self):
         """Default generator method for looping over the models, where each 
spin has a separate model.
 
-        In this case only a single model per spin system is assumed.  Hence 
the yielded data is the spin container object.
-
-
-        @return:    The spin container.
-        @rtype:     SpinContainer instance
+        In this case only a single model per spin system is assumed.  The 
yielded data is the spin container object.  The spin ID string is also 
yielded to allow the corresponding spin container to be identified.
+
+
+        @return:    The spin container and the spin ID string.
+        @rtype:     SpinContainer instance, str
         """
 
         # Loop over the sequence.
-        for spin in spin_loop():
+        for spin, spin_id in spin_loop(return_id=True):
             # Skip deselected spins.
             if not spin.select:
                 continue
 
-            # Yield the spin container.
-            yield spin
+            # Yield the spin container and ID.
+            yield spin, spin_id
 
 
     def _model_loop_single_global(self):




Related Messages


Powered by MHonArc, Updated Thu Jul 17 17:00:02 2014