mailr9082 - in /branches/frame_order/prompt: align_tensor.py 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 June 18, 2009 - 22:04:
Author: bugman
Date: Thu Jun 18 22:04:39 2009
New Revision: 9082

URL: http://svn.gna.org/viewcvs/relax?rev=9082&view=rev
Log:
Renamed the user function n_state_model.set_type() to 
align_tensor.reduction().


Modified:
    branches/frame_order/prompt/align_tensor.py
    branches/frame_order/prompt/n_state_model.py

Modified: branches/frame_order/prompt/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/prompt/align_tensor.py?rev=9082&r1=9081&r2=9082&view=diff
==============================================================================
--- branches/frame_order/prompt/align_tensor.py (original)
+++ branches/frame_order/prompt/align_tensor.py Thu Jun 18 22:04:39 2009
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2007-2008 Edward d'Auvergne                                  
 #
+# Copyright (C) 2007-2009 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -334,6 +334,52 @@
         align_tensor.matrix_angles(basis_set, tensors)
 
 
+    def reduction(self, from_tensor=None, to_tensor=None):
+        """Specify that one tensor is a reduction of another.
+
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        from_tensor:  The full alignment tensor.
+
+        to_tensor:  The reduce alignment tensor.
+
+
+        Description
+        ~~~~~~~~~~~
+
+        Prior to optimisation of the N-state model and Frame Order theories 
using alignment tensors,
+        which tensor is a reduction of which other tensor must be specified 
through this user
+        function.
+
+
+        Examples
+        ~~~~~~~~
+
+        To state that the alignment tensor loaded as 'chi3 C-dom' is a 
reduction of 'chi3 N-dom', type:
+
+        relax> align_tensor.reduction(from_tensor='chi3 N-dom', 
to_tensor='chi3 C-dom')
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "align_tensor.reduction("
+            text = text + "from_tensor=" + `from_tensor`
+            text = text + ", to_tensor=" + `to_tensor` + ")"
+            print text
+
+        # From tensor argument.
+        if type(from_tensor) != str:
+            raise RelaxStrError, ('from tensor', from_tensor)
+
+        # To tensor argument.
+        if type(to_tensor) != str:
+            raise RelaxStrError, ('to tensor', to_tensor)
+
+        # Execute the functional code.
+        align_tensor.reduction(from_tensor=from_tensor, to_tensor=to_tensor)
+
+
     def svd(self, basis_set=0, tensors=None):
         """Function for calculating the singular values for all tensors and 
the condition number.
 

Modified: branches/frame_order/prompt/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/prompt/n_state_model.py?rev=9082&r1=9081&r2=9082&view=diff
==============================================================================
--- branches/frame_order/prompt/n_state_model.py (original)
+++ branches/frame_order/prompt/n_state_model.py Thu Jun 18 22:04:39 2009
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+# Copyright (C) 2008-2009 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -377,49 +377,3 @@
 
         # Execute the functional code.
         n_state_model_obj.set_domain(tensor=tensor, domain=domain)
-
-
-    def set_type(self, tensor=None, red=False):
-        """Set whether the alignment tensor is the full or reduced tensor.
-
-        Keyword Arguments
-        ~~~~~~~~~~~~~~~~~
-
-        tensor:  The alignment tensor identification string.
-
-        red:  The state of the alignment tensor.  If True, then it is 
labelled as the full tensor.
-        If False, then it is labelled as the tensor reduced because of 
domain motions.
-
-
-        Description
-        ~~~~~~~~~~~
-
-        Prior to optimisation of the N-state model the state of alignment 
tensor, whether it is the
-        full or reduced tensor, must be set using this user function.
-
-
-        Examples
-        ~~~~~~~~
-
-        To state that the alignment tensor loaded as 'chi3 C-dom' is the 
reduced tensor, type:
-
-        relax> n_state_model.set_type(tensor='chi3 C-dom', red=True)
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "n_state_model.set_type("
-            text = text + "tensor=" + `tensor`
-            text = text + ", red=" + `red` + ")"
-            print text
-
-        # Tensor argument.
-        if type(tensor) != str:
-            raise RelaxStrError, ('tensor', tensor)
-
-        # Red argument.
-        if type(red) != bool:
-            raise RelaxBoolError, ('red', red)
-
-        # Execute the functional code.
-        n_state_model_obj.set_type(tensor=tensor, red=red)




Related Messages


Powered by MHonArc, Updated Thu Jun 18 22:20:03 2009