[prev in list] [next in list] [prev in thread] [next in thread] 

List:       relax-commits
Subject:    r11508 - /1.3/specific_fns/api_common.py
From:       edward () domain ! hid
Date:       2010-08-13 7:43:27
Message-ID: E1OjovH-0006Zs-RN () subversion ! gna ! org
[Download RAW message or body]

Author: bugman
Date: Fri Aug 13 09:43:27 2010
New Revision: 11508

URL: http://svn.gna.org/viewcvs/relax?rev=11508&view=rev
Log:
Created a common specific code model_loop() method for a single global model.

The method is stored as _model_loop_single_global().


Modified:
    1.3/specific_fns/api_common.py

Modified: 1.3/specific_fns/api_common.py
URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/api_common.py?rev=11508&r1=11507&r2=11508&view=diff
 ==============================================================================
--- 1.3/specific_fns/api_common.py (original)
+++ 1.3/specific_fns/api_common.py Fri Aug 13 09:43:27 2010
@@ -159,6 +159,20 @@
             yield spin
 
 
+    def _model_loop_single_global(self):
+        """Default generator method for looping over a single global (non-spin \
specific) model. +
+        The loop will yield a single index, zero, once to indicate a single model.
+
+
+        @return:    The global model index of zero.
+        @rtype:     int
+        """
+
+        # Yield the index zero.
+        yield 0
+
+
     def _num_instances_spin(self):
         """Return the number of instances, equal to the number of selected spins.
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic