mailr4238 - /branches/N_state_model/prompt/align_tensor.py


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

Header


Content

Posted by edward on December 21, 2007 - 15:58:
Author: bugman
Date: Fri Dec 21 15:58:23 2007
New Revision: 4238

URL: http://svn.gna.org/viewcvs/relax?rev=4238&view=rev
Log:
Added the basis_set argument to the align_tensor.matrix_angles() user 
function.


Modified:
    branches/N_state_model/prompt/align_tensor.py

Modified: branches/N_state_model/prompt/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/prompt/align_tensor.py?rev=4238&r1=4237&r2=4238&view=diff
==============================================================================
--- branches/N_state_model/prompt/align_tensor.py (original)
+++ branches/N_state_model/prompt/align_tensor.py Fri Dec 21 15:58:23 2007
@@ -285,24 +285,37 @@
         align_tensor.init(tensor=tensor, params=params, scale=scale, 
angle_units=angle_units, param_types=param_types, errors=errors)
 
 
-    def matrix_angles(self):
+    def matrix_angles(self, basis_set=0):
         """Function for calculating the 5D angles between all alignment 
tensors.
+
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        basis_set:  The basis set to operate with.
+
 
         Description
         ~~~~~~~~~~~
 
         This function will calculate the angles between all loaded alignment 
tensors for the current
         data pipe.  The matrices are first converted to a 5D vector form and 
then then angles are
-        calculated.  Unlike SVD, the basis set choice has no effect on the 
angles.
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "align_tensor.matrix_angles()"
-            print text
-
-        # Execute the functional code.
-        align_tensor.matrix_angles()
+        calculated.  The angles are dependent on the basis set.  If the 
basis_set argument is set to
+        the default of 0, the vectors {Sxx, Syy, Sxy, Sxz, Syz} are used.  
If the basis_set argument
+        is set to 1, the vectors {Szz, Sxxyy, Sxy, Sxz, Syz} are used 
instead.
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "align_tensor.matrix_angles("
+            text = text + "basis_set=" + `basis_set` + ")"
+            print text
+
+        # Basis set argument.
+        if type(basis_set) != int:
+            raise RelaxIntError, ('basis set', basis_set)
+
+        # Execute the functional code.
+        align_tensor.matrix_angles(basis_set)
 
 
     def svd(self, basis_set=0):




Related Messages


Powered by MHonArc, Updated Fri Dec 21 16:00:21 2007