mailr25922 - /branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py


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

Header


Content

Posted by edward on September 19, 2014 - 12:18:
Author: bugman
Date: Fri Sep 19 12:18:57 2014
New Revision: 25922

URL: http://svn.gna.org/viewcvs/relax?rev=25922&view=rev
Log:
Improvements for the printout from the update_model() frame order function.

A list of updated parameters is now created and everything is printed on a 
single line at the end.
The printout is therefore much more compact.


Modified:
    branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py

Modified: 
branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py?rev=25922&r1=25921&r2=25922&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py  
  (original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py  
  Fri Sep 19 12:18:57 2014
@@ -28,6 +28,7 @@
 
 # relax module imports.
 from lib.errors import RelaxError
+from lib.list import unique_elements
 from specific_analyses.frame_order.data import pivot_fixed
 from specific_analyses.frame_order.variables import MODEL_DOUBLE_ROTOR, 
MODEL_FREE_ROTOR, MODEL_ISO_CONE, MODEL_ISO_CONE_FREE_ROTOR, 
MODEL_ISO_CONE_TORSIONLESS, MODEL_LIST_FREE_ROTORS, MODEL_LIST_ISO_CONE, 
MODEL_LIST_PSEUDO_ELLIPSE, MODEL_PSEUDO_ELLIPSE, MODEL_ROTOR
 
@@ -261,28 +262,24 @@
     @type verbosity:    int
     """
 
-    # Printout.
-    if verbosity:
-        print("Reinitialising the list of model parameters:")
-
     # Re-initialise the list of model parameters.
     cdp.params = []
+    updated = []
 
     # The pivot parameters.
-    if verbosity:
-        print("    - pivot parameters.")
     if not pivot_fixed():
+        updated.append("pivot parameters")
         cdp.params.append('pivot_x')
         cdp.params.append('pivot_y')
         cdp.params.append('pivot_z')
 
     # The 2nd pivot point parameters - the minimum inter rotor axis distance.
     if cdp.model in [MODEL_DOUBLE_ROTOR]:
+        updated.append("pivot parameters")
         cdp.params.append('pivot_disp')
 
     # The average domain position translation parameters.
-    if verbosity:
-        print("    - average domain position.")
+    updated.append("average domain position")
     cdp.params.append('ave_pos_x')
     cdp.params.append('ave_pos_y')
     cdp.params.append('ave_pos_z')
@@ -294,41 +291,47 @@
     cdp.params.append('ave_pos_gamma')
 
     # Frame order eigenframe - the full frame.
-    if verbosity:
-        print("    - frame order eigenframe.")
     if cdp.model in MODEL_LIST_PSEUDO_ELLIPSE + [MODEL_DOUBLE_ROTOR]:
+        updated.append("frame order eigenframe")
         cdp.params.append('eigen_alpha')
         cdp.params.append('eigen_beta')
         cdp.params.append('eigen_gamma')
 
     # Frame order eigenframe - the isotropic cone axis.
     if cdp.model in MODEL_LIST_ISO_CONE:
+        updated.append("frame order eigenframe")
         cdp.params.append('axis_theta')
         cdp.params.append('axis_phi')
 
     # Frame order eigenframe - the rotor axis alpha angle.
     if cdp.model in [MODEL_ROTOR, MODEL_FREE_ROTOR]:
+        updated.append("frame order eigenframe")
         cdp.params.append('axis_alpha')
 
     # Cone parameters - pseudo-elliptic cone parameters.
-    if verbosity:
-        print("    - cone opening half-angles.")
     if cdp.model in MODEL_LIST_PSEUDO_ELLIPSE:
+        updated.append("cone opening half-angles")
         cdp.params.append('cone_theta_x')
         cdp.params.append('cone_theta_y')
 
     # Cone parameters - single isotropic angle or order parameter.
     if cdp.model in [MODEL_ISO_CONE, MODEL_ISO_CONE_TORSIONLESS]:
+        updated.append("cone opening half-angles")
         cdp.params.append('cone_theta')
     if cdp.model in [MODEL_ISO_CONE_FREE_ROTOR]:
+        updated.append("cone order parameter")
         cdp.params.append('cone_s1')
 
     # Cone parameters - torsion angle.
-    if verbosity:
-        print("    - cone torsion half-angles.")
     if cdp.model in [MODEL_DOUBLE_ROTOR, MODEL_ROTOR, MODEL_ISO_CONE, 
MODEL_PSEUDO_ELLIPSE]:
+        updated.append("cone torsion half-angles")
         cdp.params.append('cone_sigma_max')
 
     # Cone parameters - 2nd torsion angle.
     if cdp.model in [MODEL_DOUBLE_ROTOR]:
+        updated.append("cone torsion half-angles")
         cdp.params.append('cone_sigma_max_2')
+
+    # Printout.
+    if verbosity:
+        print("Reinitialising the list of model parameters:  %s" % 
unique_elements(updated))




Related Messages


Powered by MHonArc, Updated Fri Sep 19 13:40:02 2014