mailr6863 - in /branches/rdc_analysis: prompt/n_state_model.py 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:26:
Author: bugman
Date: Wed Jul  9 11:26:09 2008
New Revision: 6863

URL: http://svn.gna.org/viewcvs/relax?rev=6863&view=rev
Log:
Renamed the n_state_model.setup_model() user function to 
n_state_model.select_model().

This is to match the convention of the other analyses.


Modified:
    branches/rdc_analysis/prompt/n_state_model.py
    branches/rdc_analysis/specific_fns/n_state_model.py

Modified: branches/rdc_analysis/prompt/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/prompt/n_state_model.py?rev=6863&r1=6862&r2=6863&view=diff
==============================================================================
--- branches/rdc_analysis/prompt/n_state_model.py (original)
+++ branches/rdc_analysis/prompt/n_state_model.py Wed Jul  9 11:26:09 2008
@@ -280,7 +280,7 @@
         n_state_model_obj.ref_domain(ref=ref)
 
 
-    def setup_model(self, model=None):
+    def select_model(self, model=None):
         """Select the N-state model type and set up the model.
 
         Keyword Arguments
@@ -313,12 +313,12 @@
 
         To analyse populations of states, type:
 
-        relax> n_state_model.setup_model(model='populations')
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "n_state_model.setup_model("
+        relax> n_state_model.select_model(model='populations')
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "n_state_model.select_model("
             text = text + "model=" + `model` + ")"
             print text
 
@@ -327,7 +327,7 @@
             raise RelaxStrError, ('model', model)
 
         # Execute the functional code.
-        n_state_model_obj.setup_model(model=model)
+        n_state_model_obj.select_model(model=model)
 
 
     def set_domain(self, tensor=None, domain=None):

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=6863&r1=6862&r2=6863&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:26:09 
2008
@@ -860,6 +860,31 @@
             return None
 
 
+    def select_model(self, model=None):
+        """Select the N-state model type.
+
+        @param model:   The N-state model type.  Can be one of '2-domain', 
'population', or 'fixed'.
+        @type model:    str
+        """
+
+        # Test if the current data pipe exists.
+        if not ds.current_pipe:
+            raise RelaxNoPipeError
+
+        # Alias the current data pipe.
+        cdp = ds[ds.current_pipe]
+
+        # Test if the model is setup.
+        if hasattr(cdp, 'model'):
+            raise RelaxModelError, 'N-state'
+
+        # Set the model
+        cdp.model = model
+
+        # Initialise the list of model parameters.
+        cdp.params = []
+
+
     def set_doc(self):
         """
         N-state model set details
@@ -972,28 +997,3 @@
         # The tensor label doesn't exist.
         if not match:
             raise RelaxNoTensorError, ('alignment', tensor)
-
-
-    def setup_model(self, model=None):
-        """Select the N-state model type.
-
-        @param model:   The N-state model type.  Can be one of '2-domain', 
'population', or 'fixed'.
-        @type model:    str
-        """
-
-        # Test if the current data pipe exists.
-        if not ds.current_pipe:
-            raise RelaxNoPipeError
-
-        # Alias the current data pipe.
-        cdp = ds[ds.current_pipe]
-
-        # Test if the model is setup.
-        if hasattr(cdp, 'model'):
-            raise RelaxModelError, 'N-state'
-
-        # Set the model
-        cdp.model = model
-
-        # Initialise the list of model parameters.
-        cdp.params = []




Related Messages


Powered by MHonArc, Updated Wed Jul 09 11:40:11 2008