mailr6865 - /branches/rdc_analysis/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 09, 2008 - 11:29:
Author: bugman
Date: Wed Jul  9 11:29:10 2008
New Revision: 6865

URL: http://svn.gna.org/viewcvs/relax?rev=6865&view=rev
Log:
Added some error checking for the validity of the selected model type.


Modified:
    branches/rdc_analysis/specific_fns/n_state_model.py

Modified: branches/rdc_analysis/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/specific_fns/n_state_model.py?rev=6865&r1=6864&r2=6865&view=diff
==============================================================================
--- branches/rdc_analysis/specific_fns/n_state_model.py (original)
+++ branches/rdc_analysis/specific_fns/n_state_model.py Wed Jul  9 11:29:10 
2008
@@ -878,6 +878,10 @@
         if hasattr(cdp, 'model'):
             raise RelaxModelError, 'N-state'
 
+        # Test if the model name exists.
+        if not model in ['2-domain', 'population', 'fixed']:
+            raise RelaxError, "The model name " + `model` + " is invalid."
+
         # Set the model
         cdp.model = model
 




Related Messages


Powered by MHonArc, Updated Wed Jul 09 12:00:20 2008