mailr27079 - /trunk/lib/structure/internal/coordinates.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 - 10:55:
Author: bugman
Date: Thu Dec 11 10:55:24 2014
New Revision: 27079

URL: http://svn.gna.org/viewcvs/relax?rev=27079&view=rev
Log:
Another refinement for the structure ID strings returned by the 
assemble_coord_array() function.


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

Modified: trunk/lib/structure/internal/coordinates.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/coordinates.py?rev=27079&r1=27078&r2=27079&view=diff
==============================================================================
--- trunk/lib/structure/internal/coordinates.py (original)
+++ trunk/lib/structure/internal/coordinates.py Thu Dec 11 10:55:24 2014
@@ -56,6 +56,9 @@
         # Validate the models.
         objects[struct_index].validate_models(verbosity=0)
 
+        # The number of models.
+        num_models = objects[struct_index].num_models()
+
         # The selection object.
         selection = objects[struct_index].selection(atom_id=atom_id)
 
@@ -96,11 +99,11 @@
                         atom_elem.append({})
 
                     # Create a new structure ID.
-                    if len(object_names) > 1 and model.num != None:
+                    if len(object_names) > 1 and num_models > 1:
                         ids.append('%s, model %i, %s' % 
(object_names[struct_index], model.num, mol_name))
                     elif len(object_names) > 1:
                         ids.append('%s, %s' % (object_names[struct_index], 
mol_name))
-                    elif model.num != None:
+                    elif num_models > 1:
                         ids.append('model %i, %s' % (model.num, mol_name))
                     else:
                         ids.append('%s' % mol_name)




Related Messages


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