mailr11286 - /1.3/specific_fns/n_state_model.py


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

Header


Content

Posted by edward on July 03, 2010 - 11:38:
Author: bugman
Date: Sat Jul  3 11:38:32 2010
New Revision: 11286

URL: http://svn.gna.org/viewcvs/relax?rev=11286&view=rev
Log:
N-state models with no parameters are now caught prior to optimisation.

The minimise() method now simply throws a warning and returns without doing 
anything.


Modified:
    1.3/specific_fns/n_state_model.py

Modified: 1.3/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=11286&r1=11285&r2=11286&view=diff
==============================================================================
--- 1.3/specific_fns/n_state_model.py (original)
+++ 1.3/specific_fns/n_state_model.py Sat Jul  3 11:38:32 2010
@@ -1724,6 +1724,11 @@
         # Set up the target function for direct calculation.
         model, param_vector, data_types, scaling_matrix = 
self._target_fn_setup(sim_index=sim_index, scaling=scaling)
 
+        # Nothing to do!
+        if not len(param_vector):
+            warn(RelaxWarning("The model has no parameters, minimisation 
cannot be performed."))
+            return
+
         # Right, constraints cannot be used for the 'fixed' model.
         if constraints and cdp.model == 'fixed':
             warn(RelaxWarning("Turning constraints off.  These cannot be 
used for the 'fixed' model."))




Related Messages


Powered by MHonArc, Updated Sat Jul 03 20:20:04 2010