mailr23234 - in /trunk: lib/structure/internal/object.py 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 May 19, 2014 - 12:21:
Author: bugman
Date: Mon May 19 12:21:31 2014
New Revision: 23234

URL: http://svn.gna.org/viewcvs/relax?rev=23234&view=rev
Log:
The new structure.delete 'verbosity' argument is now propagated into the 
structural object.

This allows the printouts to now be completely suppressed.


Modified:
    trunk/lib/structure/internal/object.py
    trunk/pipe_control/structure/main.py

Modified: trunk/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=23234&r1=23233&r2=23234&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Mon May 19 12:21:31 2014
@@ -1499,18 +1499,21 @@
             mol.atom_connect(index1=index1, index2=index2)
 
 
-    def delete(self, atom_id=None):
+    def delete(self, atom_id=None, verbosity=1):
         """Deletion of structural information.
 
         @keyword atom_id:   The molecule, residue, and atom identifier 
string.  This matches the spin ID string format.  If not given, then all 
structural data will be deleted.
         @type atom_id:      str or None
+        @keyword verbosity: The amount of information to print to screen.  
Zero corresponds to minimal output while higher values increase the amount of 
output.  The default value is 1.
+        @type verbosity:    int
         """
 
         # All data.
         if atom_id == None:
-            # Print out.
-            print("Deleting the following structural data:\n")
-            print(self.structural_data)
+            # Printout.
+            if verbosity:
+                print("Deleting the following structural data:\n")
+                print(self.structural_data)
 
             # Delete the structural data.
             del self.structural_data

Modified: trunk/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=23234&r1=23233&r2=23234&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Mon May 19 12:21:31 2014
@@ -311,7 +311,7 @@
     if hasattr(cdp, 'structure'):
         if verbosity:
             print("Deleting structural data from the current pipe.")
-        cdp.structure.delete(atom_id=atom_id)
+        cdp.structure.delete(atom_id=atom_id, verbosity=verbosity)
     elif verbosity:
         print("No structures are present.")
 




Related Messages


Powered by MHonArc, Updated Mon May 19 12:40:02 2014