mailr18605 - /trunk/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 March 04, 2013 - 14:02:
Author: bugman
Date: Mon Mar  4 14:02:21 2013
New Revision: 18605

URL: http://svn.gna.org/viewcvs/relax?rev=18605&view=rev
Log:
The n_state_model.number_of_states user function no longer requires the 
N-state model to be defined.

This was only needed to update the model information, and is skipped if not 
set.


Modified:
    trunk/specific_fns/n_state_model.py

Modified: trunk/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_fns/n_state_model.py?rev=18605&r1=18604&r2=18605&view=diff
==============================================================================
--- trunk/specific_fns/n_state_model.py (original)
+++ trunk/specific_fns/n_state_model.py Mon Mar  4 14:02:21 2013
@@ -1335,15 +1335,12 @@
         # Test if the current data pipe exists.
         pipes.test()
 
-        # Test if the model is setup.
-        if not hasattr(cdp, 'model'):
-            raise RelaxNoModelError('N-state')
-
         # Set the value of N.
         cdp.N = N
 
-        # Update the model.
-        self._update_model()
+        # Update the model, if set.
+        if hasattr(cdp, 'model'):
+            self._update_model()
 
 
     def _opt_tensor(self, tensor):




Related Messages


Powered by MHonArc, Updated Mon Mar 04 14:20:02 2013