mailr27083 - /trunk/lib/structure/internal/object.py


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

Header


Content

Posted by edward on December 11, 2014 - 11:34:
Author: bugman
Date: Thu Dec 11 11:34:24 2014
New Revision: 27083

URL: http://svn.gna.org/viewcvs/relax?rev=27083&view=rev
Log:
Created the internal structural object model_list() method.

This is to simplify the assembly of a list of all current models in the 
structural object.


Modified:
    trunk/lib/structure/internal/object.py

Modified: trunk/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=27083&r1=27082&r2=27083&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Thu Dec 11 11:34:24 2014
@@ -2157,6 +2157,22 @@
             self.delete(model=self.structural_data[model_index].num)
 
 
+    def model_list(self):
+        """Create a list of all models.
+
+        @return:    The list of all models.
+        @rtype:     list of int
+        """
+
+        # Assemble the list.
+        models = []
+        for model in self.model_loop():
+            models.append(model.num)
+
+        # Return the list.
+        return models
+
+
     def model_loop(self, model=None):
         """Generator method for looping over the models in numerical order.
 




Related Messages


Powered by MHonArc, Updated Thu Dec 11 11:40:02 2014