mailr7637 - in /1.3/specific_fns: model_free/main.py setup.py


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

Header


Content

Posted by edward on October 12, 2008 - 12:26:
Author: bugman
Date: Sun Oct 12 12:26:47 2008
New Revision: 7637

URL: http://svn.gna.org/viewcvs/relax?rev=7637&view=rev
Log:
Created the new specific method model_desc() for returning a human readable 
model description.

This will be used in the model selection printouts.


Modified:
    1.3/specific_fns/model_free/main.py
    1.3/specific_fns/setup.py

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=7637&r1=7636&r2=7637&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Sun Oct 12 12:26:47 2008
@@ -1681,6 +1681,38 @@
         # CSA.
         elif param == 'csa':
             return [-100 * 1e-6, -300 * 1e-6]
+
+
+    def model_desc(self, model_index):
+        """Return a description of the model.
+
+        @param model_index: The model index.  This is zero for the global 
models or equal to the
+                            global spin index (which covers the molecule, 
residue, and spin
+                            indices).
+        @type model_index:  int
+        @return:            The model description.
+        @rtype:             str
+        """
+
+        # Determine the model type.
+        model_type = self.determine_model_type()
+
+        # Get the current data pipe.
+        cdp = pipes.get_pipe()
+
+        # Global models.
+        if model_type == 'all':
+            return "Global model - all diffusion tensor parameters and spin 
specific model-free parameters."
+        elif model_type == 'diff':
+            return "Diffusion tensor model."
+
+        # Spin specific model.
+        else:
+            # Get the spin container.
+            spin, spin_id = return_spin_from_index(model_index, 
return_spin_id=True)
+
+            # Return the spin id.
+            return spin_id
 
 
     def model_loop(self):

Modified: 1.3/specific_fns/setup.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/setup.py?rev=7637&r1=7636&r2=7637&view=diff
==============================================================================
--- 1.3/specific_fns/setup.py (original)
+++ 1.3/specific_fns/setup.py Sun Oct 12 12:26:47 2008
@@ -114,6 +114,10 @@
             function = inst.minimise
 
         # Model loop.
+        if eqi == 'model_desc':
+            function = inst.model_desc
+
+        # Model loop.
         if eqi == 'model_loop':
             function = inst.model_loop
 




Related Messages


Powered by MHonArc, Updated Sun Oct 12 12:40:02 2008