mailr22051 - /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 January 27, 2014 - 19:23:
Author: bugman
Date: Mon Jan 27 19:23:47 2014
New Revision: 22051

URL: http://svn.gna.org/viewcvs/relax?rev=22051&view=rev
Log:
More speed ups for the internal structural object when huge numbers of models 
are present.

Another loop over the structural_data object has been eliminated from the PDB 
reading load_pdb()
method.


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=22051&r1=22050&r2=22051&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py (original)
+++ trunk/lib/structure/internal/object.py Mon Jan 27 19:23:47 2014
@@ -1856,9 +1856,8 @@
                 else:
                     # Number of structures already present for the model.
                     num_struct = 0
-                    for model in self.structural_data:
-                        if not set_model_num or (model_index <= 
len(set_model_num) and set_model_num[model_index] == model.num):
-                            num_struct = len(model.mol)
+                    if self.structural_data != None and 
len(self.structural_data) and (not set_model_num or (model_index <= 
len(set_model_num) and set_model_num[model_index] == 
self.structural_data[0].num)):
+                        num_struct = len(self.structural_data[0].mol)
 
                     # Set the name to the file name plus the structure 
number.
                     new_mol_name.append(file_root(file) + '_mol' + 
repr(mol_num+num_struct))




Related Messages


Powered by MHonArc, Updated Mon Jan 27 21:00:01 2014