mailr4946 - /branches/N_state_model/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 February 11, 2008 - 16:05:
Author: bugman
Date: Mon Feb 11 16:05:26 2008
New Revision: 4946

URL: http://svn.gna.org/viewcvs/relax?rev=4946&view=rev
Log:
Added the ref arg to the specific_fns.n_state_model.model_setup() function.

The ref domain now is stored in the variable 'ref_domain' in the current data 
pipe.


Modified:
    branches/N_state_model/specific_fns/n_state_model.py

Modified: branches/N_state_model/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4946&r1=4945&r2=4946&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Mon Feb 11 16:05:26 
2008
@@ -480,11 +480,13 @@
             cdp.warning = warning
 
 
-    def model_setup(self, N=None):
+    def model_setup(self, N=None, ref=None):
         """Function for setting up the N-state model.
 
         @param N:   The number of states.
         @type N:    int
+        @param ref: The reference domain.
+        @type ref:  str
         """
 
         # Test if the current data pipe exists.
@@ -494,8 +496,17 @@
         # Alias the current data pipe.
         cdp = relax_data_store[relax_data_store.current_pipe]
 
-        # Set the value of N.
+        # Test if the reference domain exists.
+        exists = 0
+        for tensor_cont in cdp.align_tensors:
+            if tensor_cont.domain == ref:
+                exists = 1
+        if not exists:
+            raise RelaxError, "The reference domain cannot be found within 
any of the loaded tensors."
+            
+        # Set the value of N and reference domain.
         cdp.N = N
+        cdp.ref_domain = ref
 
         # Initialise the list of model parameters.
         cdp.params = []




Related Messages


Powered by MHonArc, Updated Mon Feb 11 16:40:10 2008