mailr27366 - /trunk/pipe_control/structure/main.py


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

Header


Content

Posted by edward on January 29, 2015 - 17:59:
Author: bugman
Date: Thu Jan 29 17:59:21 2015
New Revision: 27366

URL: http://svn.gna.org/viewcvs/relax?rev=27366&view=rev
Log:
Added final printouts to the structure.rotate and structure.translate user 
function backends.

This is to give feedback to the user as to how many atoms were translated or 
rotated, to aid in
solving problems with the structure user functions.  These backend functions 
are also used by the
structure.align and structure.superimpose user functions.


Modified:
    trunk/pipe_control/structure/main.py

Modified: trunk/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=27366&r1=27365&r2=27366&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Thu Jan 29 17:59:21 2015
@@ -1248,6 +1248,12 @@
     selection = dp.structure.selection(atom_id=atom_id)
     dp.structure.rotate(R=R, origin=origin, model=model, selection=selection)
 
+    # Final printout.
+    if model:
+        print("Rotated %i atoms of model %i." % (selection.count_atoms(), 
model))
+    else:
+        print("Rotated %i atoms." % selection.count_atoms())
+
 
 def set_vector(spin=None, xh_vect=None):
     """Place the XH unit vector into the spin container object.
@@ -1384,6 +1390,12 @@
     # Call the specific code.
     selection = dp.structure.selection(atom_id=atom_id)
     dp.structure.translate(T=T, model=model, selection=selection)
+
+    # Final printout.
+    if model:
+        print("Translated %i atoms of model %i." % (selection.count_atoms(), 
model))
+    else:
+        print("Translated %i atoms." % selection.count_atoms())
 
 
 def vectors(spin_id1=None, spin_id2=None, model=None, verbosity=1, ave=True, 
unit=True):




Related Messages


Powered by MHonArc, Updated Thu Jan 29 18:20:01 2015