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.
 


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to