mailr22625 - in /branches/double_rotor/specific_analyses/frame_order: api.py optimisation.py


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

Header


Content

Posted by edward on April 03, 2014 - 19:13:
Author: bugman
Date: Thu Apr  3 19:13:43 2014
New Revision: 22625

URL: http://svn.gna.org/viewcvs/relax?rev=22625&view=rev
Log:
The centre of mass printout in the frame order target function setup now uses 
the verbosity argument.

This means that the printout is not shown for the Monte Carlo simulation 
optimisation.


Modified:
    branches/double_rotor/specific_analyses/frame_order/api.py
    branches/double_rotor/specific_analyses/frame_order/optimisation.py

Modified: branches/double_rotor/specific_analyses/frame_order/api.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/specific_analyses/frame_order/api.py?rev=22625&r1=22624&r2=22625&view=diff
==============================================================================
--- branches/double_rotor/specific_analyses/frame_order/api.py  (original)
+++ branches/double_rotor/specific_analyses/frame_order/api.py  Thu Apr  3 
19:13:43 2014
@@ -141,7 +141,7 @@
         """
 
         # Set up the target function for direct calculation.
-        model, param_vector, data_types, scaling_matrix = 
target_fn_setup(sim_index=sim_index)
+        model, param_vector, data_types, scaling_matrix = 
target_fn_setup(sim_index=sim_index, verbosity=verbosity)
 
         # Make a single function call.  This will cause back calculation and 
the data will be stored in the class instance.
         chi2 = model.func(param_vector)
@@ -589,7 +589,7 @@
         """
 
         # Set up the target function for direct calculation.
-        model, param_vector, data_types, scaling_matrix = 
target_fn_setup(sim_index=sim_index, scaling=scaling)
+        model, param_vector, data_types, scaling_matrix = 
target_fn_setup(sim_index=sim_index, verbosity=verbosity, scaling=scaling)
 
         # Constraints not implemented yet.
         if constraints:

Modified: branches/double_rotor/specific_analyses/frame_order/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/specific_analyses/frame_order/optimisation.py?rev=22625&r1=22624&r2=22625&view=diff
==============================================================================
--- branches/double_rotor/specific_analyses/frame_order/optimisation.py 
(original)
+++ branches/double_rotor/specific_analyses/frame_order/optimisation.py Thu 
Apr  3 19:13:43 2014
@@ -610,11 +610,13 @@
             rdc_index += 1
 
 
-def target_fn_setup(sim_index=None, scaling=True):
+def target_fn_setup(sim_index=None, verbosity=1, scaling=True):
     """Initialise the target function for optimisation or direct calculation.
 
     @param sim_index:       The index of the simulation to optimise.  This 
should be None if normal optimisation is desired.
     @type sim_index:        None or int
+    @keyword verbosity:     The amount of information to print.  The higher 
the value, the greater the verbosity.
+    @type verbosity:        int
     @param scaling:         If True, diagonal scaling is enabled during 
optimisation to allow the problem to be better conditioned.
     @type scaling:          bool
     """
@@ -690,7 +692,8 @@
         com = array(com, float64)
 
         # Printout.
-        print("The centre of mass reference coordinate for the rotor models 
is at:\n    %s" % list(com))
+        if verbosity:
+            print("The centre of mass reference coordinate for the rotor 
models is at:\n    %s" % list(com))
 
     # The centre of mass of the moving domain - to use as the centroid for 
the average domain position rotation.
     if cdp.ave_pos_pivot == 'com':




Related Messages


Powered by MHonArc, Updated Thu Apr 03 19:20:02 2014