mailr26345 - in /trunk/specific_analyses/n_state_model: 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 October 22, 2014 - 14:26:
Author: bugman
Date: Wed Oct 22 14:26:17 2014
New Revision: 26345

URL: http://svn.gna.org/viewcvs/relax?rev=26345&view=rev
Log:
The verbosity argument for the N-state model optimisation is now propagated 
for more printouts.

The argument for the calculate() and minimise() API methods is now sent into
specific_analyses.n_state_model.optimisation.target_fn_setup(), and from 
there into the
pipe_control.pcs.return_pcs_data() and pipe_control.rdc.return_rdc_data() 
functions.  That way the
number of RDCs and PCSs used in the N-state model is reported back to the 
user for better feedback.


Modified:
    trunk/specific_analyses/n_state_model/api.py
    trunk/specific_analyses/n_state_model/optimisation.py

Modified: trunk/specific_analyses/n_state_model/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/n_state_model/api.py?rev=26345&r1=26344&r2=26345&view=diff
==============================================================================
--- trunk/specific_analyses/n_state_model/api.py        (original)
+++ trunk/specific_analyses/n_state_model/api.py        Wed Oct 22 14:26:17 
2014
@@ -151,7 +151,7 @@
         # Set up the target function for direct calculation.
         if scaling_matrix != None:
             scaling_matrix = scaling_matrix[0]
-        model, param_vector, data_types = 
target_fn_setup(scaling_matrix=scaling_matrix)
+        model, param_vector, data_types = 
target_fn_setup(scaling_matrix=scaling_matrix, verbosity=verbosity)
 
         # Calculate the chi-squared value.
         if model:
@@ -463,7 +463,7 @@
         """
 
         # Set up the target function for direct calculation.
-        model, param_vector, data_types = 
target_fn_setup(sim_index=sim_index, scaling_matrix=scaling_matrix[0])
+        model, param_vector, data_types = 
target_fn_setup(sim_index=sim_index, scaling_matrix=scaling_matrix[0], 
verbosity=verbosity)
 
         # Nothing to do!
         if not len(param_vector):

Modified: trunk/specific_analyses/n_state_model/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/n_state_model/optimisation.py?rev=26345&r1=26344&r2=26345&view=diff
==============================================================================
--- trunk/specific_analyses/n_state_model/optimisation.py       (original)
+++ trunk/specific_analyses/n_state_model/optimisation.py       Wed Oct 22 
14:26:17 2014
@@ -269,13 +269,15 @@
     return tensors
 
 
-def target_fn_setup(sim_index=None, scaling_matrix=None):
+def target_fn_setup(sim_index=None, scaling_matrix=None, verbosity=0):
     """Initialise the target function for optimisation or direct calculation.
 
     @keyword 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 scaling_matrix:    The diagonal and square scaling matrix.
     @type scaling_matrix:       numpy rank-2, float64 array or None
+    @keyword verbosity:         A flag specifying the amount of information 
to print.  The higher the value, the greater the verbosity.
+    @type verbosity:            int
     """
 
     # Test if the N-state model has been set up.
@@ -321,12 +323,13 @@
     # Get the data structures for optimisation using PCSs as base data sets.
     pcs, pcs_err, pcs_weight, temp, frq, pcs_pseudo_flags = None, None, 
None, None, None, None
     if 'pcs' in data_types:
-        pcs, pcs_err, pcs_weight, temp, frq, pcs_pseudo_flags = 
return_pcs_data(sim_index=sim_index)
+        pcs, pcs_err, pcs_weight, temp, frq, pcs_pseudo_flags = 
return_pcs_data(sim_index=sim_index, verbosity=verbosity)
 
     # Get the data structures for optimisation using RDCs as base data sets.
     rdcs, rdc_err, rdc_weight, rdc_vector, rdc_dj, absolute_rdc, T_flags, 
j_couplings, rdc_pseudo_flags = None, None, None, None, None, None, None, 
None, None
     if 'rdc' in data_types:
-        rdcs, rdc_err, rdc_weight, rdc_vector, rdc_dj, absolute_rdc, 
T_flags, j_couplings, rdc_pseudo_flags = return_rdc_data(sim_index=sim_index)
+        # The data.
+        rdcs, rdc_err, rdc_weight, rdc_vector, rdc_dj, absolute_rdc, 
T_flags, j_couplings, rdc_pseudo_flags = return_rdc_data(sim_index=sim_index, 
verbosity=verbosity)
 
     # Get the fixed tensors.
     fixed_tensors = None




Related Messages


Powered by MHonArc, Updated Wed Oct 22 14:40:02 2014