mailr14971 - /1.3/generic_fns/structure/internal.py


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

Header


Content

Posted by edward on November 03, 2011 - 17:51:
Author: bugman
Date: Thu Nov  3 17:51:46 2011
New Revision: 14971

URL: http://svn.gna.org/viewcvs/relax?rev=14971&view=rev
Log:
Fix for the internal structural object add_molecule() method for when no 
models exist.

Now a model is created if none currently exist.


Modified:
    1.3/generic_fns/structure/internal.py

Modified: 1.3/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/internal.py?rev=14971&r1=14970&r2=14971&view=diff
==============================================================================
--- 1.3/generic_fns/structure/internal.py (original)
+++ 1.3/generic_fns/structure/internal.py Thu Nov  3 17:51:46 2011
@@ -655,6 +655,10 @@
         @keyword model:         The number of the model to add the molecule 
to.
         @type model:            int or None
         """
+
+        # Add a model if necessary.
+        if len(self.structural_data) == 0:
+            self.add_model()
 
         # Loop over the models.
         for i in range(len(self.structural_data)):




Related Messages


Powered by MHonArc, Updated Thu Nov 03 18:00:02 2011