mailr27691 - /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 February 20, 2015 - 10:23:
Author: bugman
Date: Fri Feb 20 10:23:44 2015
New Revision: 27691

URL: http://svn.gna.org/viewcvs/relax?rev=27691&view=rev
Log:
Improved the quality of the printouts from the structure.read_pdb user 
function.

This also affects the structure.read_gaussian and structure.read_xyz user 
functions.  The messages
about adding new molecules or merging with existing molecules has been 
significantly improved.  The
text with the model information is now only printed if the model number is 
present in the PDB file
or has been supplied by the user.


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=27691&r1=27690&r2=27691&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Fri Feb 20 10:23:44 2015
@@ -2480,10 +2480,23 @@
 
                 # Printout.
                 if verbosity:
+                    # Model text formatting.
+                    orig_model_text = ''
+                    if orig_model_num[i] != None:
+                        orig_model_text = " of model %s" % orig_model_num[i]
+                    new_model_text = ''
+                    if set_model_num[i] != None:
+                        if merge_new:
+                            new_model_text += ' of'
+                        else:
+                            new_model_text += ' to'
+                        new_model_text += ' model %s' % set_model_num[i]
+
+                    # The full text.
                     if merge_new:
-                        print("Merging with model %s of molecule '%s' (from 
the original molecule number %s of model %s)" % (set_model_num[i], 
set_mol_name[j], orig_mol_num[j], orig_model_num[i]))
+                        print("Merging with molecule '%s'%s (from the 
original molecule number %s%s)." % (set_mol_name[j], new_model_text, 
orig_mol_num[j], orig_model_text))
                     else:
-                        print("Adding molecule '%s' to model %s (from the 
original molecule number %s of model %s)" % (set_mol_name[j], 
set_model_num[i], orig_mol_num[j], orig_model_num[i]))
+                        print("Adding molecule '%s'%s (from the original 
molecule number %s%s)." % (set_mol_name[j], new_model_text, orig_mol_num[j], 
orig_model_text))
 
                 # The index of the new molecule to add or merge.
                 index = len(model.mol)




Related Messages


Powered by MHonArc, Updated Fri Feb 20 11:40:06 2015