mailr10056 - /1.3/data/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 04, 2009 - 16:10:
Author: bugman
Date: Fri Dec  4 16:10:57 2009
New Revision: 10056

URL: http://svn.gna.org/viewcvs/relax?rev=10056&view=rev
Log:
Alphabetical reordering of the functions.


Modified:
    1.3/data/align_tensor.py

Modified: 1.3/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/align_tensor.py?rev=10056&r1=10055&r2=10056&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Fri Dec  4 16:10:57 2009
@@ -143,6 +143,44 @@
     tensor_diag[2, 2] = vals[Azz_index]
 
     # Return the tensor.
+def calc_Axxyy(Axx, Ayy):
+    """Function for calculating the Axx-yy value.
+
+    The equation for calculating the parameter is::
+
+        Axx-yy  =  Axx - Ayy.
+
+    @param Axx:     The Axx component of the alignment tensor.
+    @type Axx:      float
+    @param Ayy:     The Ayy component of the alignment tensor.
+    @type Ayy:      float
+    @return:        The Axx-yy component of the alignment tensor.
+    @rtype:         float
+    """
+
+    # Calculate and return the Axx-yy value.
+    return Axx - Ayy
+
+
+def calc_Azz(Axx, Ayy):
+    """Function for calculating the Azz value.
+
+    The equation for calculating the parameter is::
+
+        Azz  =  - Axx - Ayy.
+
+    @param Axx:     The Axx component of the alignment tensor.
+    @type Axx:      float
+    @param Ayy:     The Ayy component of the alignment tensor.
+    @type Ayy:      float
+    @return:        The Azz component of the alignment tensor.
+    @rtype:         float
+    """
+
+    # Calculate and return the Azz value.
+    return - Axx - Ayy
+
+
     return tensor_diag
 
 
@@ -181,124 +219,6 @@
     """
 
     return R_to_euler_zyz(R)
-
-
-def calc_Sxx(Axx):
-    """Function for calculating the Axx value.
-
-    The equation for calculating the parameter is::
-
-        Sxx  =  3/2 Axx.
-
-    @param Axx:     The Axx component of the alignment tensor.
-    @type Axx:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Axx value.
-    return 3.0/2.0 * Axx
-
-
-def calc_Syy(Ayy):
-    """Function for calculating the Ayy value.
-
-    The equation for calculating the parameter is::
-
-        Syy  =  3/2 Ayy.
-
-    @param Ayy:     The Ayy component of the alignment tensor.
-    @type Ayy:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Ayy value.
-    return 3.0/2.0 * Ayy
-
-
-def calc_Sxy(Axy):
-    """Function for calculating the Axy value.
-
-    The equation for calculating the parameter is::
-
-        Sxy  =  3/2 Axy.
-
-    @param Axy:     The Axy component of the alignment tensor.
-    @type Axy:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Axy value.
-    return 3.0/2.0 * Axy
-
-
-def calc_Sxz(Axz):
-    """Function for calculating the Axz value.
-
-    The equation for calculating the parameter is::
-
-        Sxz  =  3/2 Axz.
-
-    @param Axz:     The Axz component of the alignment tensor.
-    @type Axz:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Axz value.
-    return 3.0/2.0 * Axz
-
-
-def calc_Syz(Ayz):
-    """Function for calculating the Ayz value.
-
-    The equation for calculating the parameter is::
-
-        Syz  =  3/2 Ayz.
-
-    @param Ayz:     The Ayz component of the alignment tensor.
-    @type Ayz:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Ayz value.
-    return 3.0/2.0 * Ayz
-
-
-def calc_Axxyy(Axx, Ayy):
-    """Function for calculating the Axx-yy value.
-
-    The equation for calculating the parameter is::
-
-        Axx-yy  =  Axx - Ayy.
-
-    @param Axx:     The Axx component of the alignment tensor.
-    @type Axx:      float
-    @param Ayy:     The Ayy component of the alignment tensor.
-    @type Ayy:      float
-    @return:        The Axx-yy component of the alignment tensor.
-    @rtype:         float
-    """
-
-    # Calculate and return the Axx-yy value.
-    return Axx - Ayy
-
-
-def calc_Azz(Axx, Ayy):
-    """Function for calculating the Azz value.
-
-    The equation for calculating the parameter is::
-
-        Azz  =  - Axx - Ayy.
-
-    @param Axx:     The Axx component of the alignment tensor.
-    @type Axx:      float
-    @param Ayy:     The Ayy component of the alignment tensor.
-    @type Ayy:      float
-    @return:        The Azz component of the alignment tensor.
-    @rtype:         float
-    """
-
-    # Calculate and return the Azz value.
-    return - Axx - Ayy
 
 
 def calc_S(Sxx, Syy, Szz, Sxy, Sxz, Syz):
@@ -414,6 +334,124 @@
     return tensor_diag
 
 
+def calc_Sxx(Axx):
+    """Function for calculating the Axx value.
+
+    The equation for calculating the parameter is::
+
+        Sxx  =  3/2 Axx.
+
+    @param Axx:     The Axx component of the alignment tensor.
+    @type Axx:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Axx value.
+    return 3.0/2.0 * Axx
+
+
+def calc_Sxxyy(Sxx, Syy):
+    """Function for calculating the Sxx-yy value.
+
+    The equation for calculating the parameter is::
+
+        Sxx-yy  =  Sxx - Syy.
+
+    @param Sxx:     The Sxx component of the Saupe order matrix.
+    @type Sxx:      float
+    @param Syy:     The Syy component of the Saupe order matrix.
+    @type Syy:      float
+    @return:        The Sxx-yy component of the Saupe order matrix.
+    @rtype:         float
+    """
+
+    # Calculate and return the Sxx-yy value.
+    return Sxx - Syy
+
+
+def calc_Sxy(Axy):
+    """Function for calculating the Axy value.
+
+    The equation for calculating the parameter is::
+
+        Sxy  =  3/2 Axy.
+
+    @param Axy:     The Axy component of the alignment tensor.
+    @type Axy:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Axy value.
+    return 3.0/2.0 * Axy
+
+
+def calc_Sxz(Axz):
+    """Function for calculating the Axz value.
+
+    The equation for calculating the parameter is::
+
+        Sxz  =  3/2 Axz.
+
+    @param Axz:     The Axz component of the alignment tensor.
+    @type Axz:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Axz value.
+    return 3.0/2.0 * Axz
+
+
+def calc_Syy(Ayy):
+    """Function for calculating the Ayy value.
+
+    The equation for calculating the parameter is::
+
+        Syy  =  3/2 Ayy.
+
+    @param Ayy:     The Ayy component of the alignment tensor.
+    @type Ayy:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Ayy value.
+    return 3.0/2.0 * Ayy
+
+
+def calc_Syz(Ayz):
+    """Function for calculating the Ayz value.
+
+    The equation for calculating the parameter is::
+
+        Syz  =  3/2 Ayz.
+
+    @param Ayz:     The Ayz component of the alignment tensor.
+    @type Ayz:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Ayz value.
+    return 3.0/2.0 * Ayz
+
+
+def calc_Szz(Sxx, Syy):
+    """Function for calculating the Szz value.
+
+    The equation for calculating the parameter is::
+
+        Szz  =  - Sxx - Syy.
+
+    @param Sxx:     The Sxx component of the Saupe order matrix.
+    @type Sxx:      float
+    @param Syy:     The Syy component of the Saupe order matrix.
+    @type Syy:      float
+    @return:        The Szz component of the Saupe order matrix.
+    @rtype:         float
+    """
+
+    # Calculate and return the Szz value.
+    return - Sxx - Syy
+
+
 def calc_P(Axx, Ayy, Azz, Axy, Axz, Ayz):
     """Function for calculating the alignment tensor (in the structural 
frame).
 
@@ -549,70 +587,6 @@
     return Axx + 1.0/3.0
 
 
-def calc_Pyy(Ayy):
-    """Function for calculating the Pyy value.
-
-    The equation for calculating the parameter is::
-
-        Pyy  =  Ayy + 1/3.
-
-    @param Ayy:     The Ayy component of the alignment tensor.
-    @type Ayy:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Pyy value.
-    return Ayy + 1.0/3.0
-
-
-def calc_Pxy(Axy):
-    """Function for calculating the Pxy value.
-
-    The equation for calculating the parameter is::
-
-        Pxy  =  Axy.
-
-    @param Axy:     The Axy component of the alignment tensor.
-    @type Axy:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Pxy value.
-    return Axy
-
-
-def calc_Pxz(Axz):
-    """Function for calculating the Pxz value.
-
-    The equation for calculating the parameter is::
-
-        Pxz  =  Axz.
-
-    @param Axz:     The Axz component of the alignment tensor.
-    @type Axz:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Pxz value.
-    return Axz
-
-
-def calc_Pyz(Ayz):
-    """Function for calculating the Pyz value.
-
-    The equation for calculating the parameter is::
-
-        Pyz  =  Ayz.
-
-    @param Ayz:     The Ayz component of the alignment tensor.
-    @type Ayz:      float
-    @rtype:         float
-    """
-
-    # Calculate and return the Pyz value.
-    return Ayz
-
-
 def calc_Pxxyy(Pxx, Pyy):
     """Function for calculating the Pxx-yy value.
 
@@ -632,6 +606,70 @@
     return Pxx - Pyy
 
 
+def calc_Pxy(Axy):
+    """Function for calculating the Pxy value.
+
+    The equation for calculating the parameter is::
+
+        Pxy  =  Axy.
+
+    @param Axy:     The Axy component of the alignment tensor.
+    @type Axy:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Pxy value.
+    return Axy
+
+
+def calc_Pxz(Axz):
+    """Function for calculating the Pxz value.
+
+    The equation for calculating the parameter is::
+
+        Pxz  =  Axz.
+
+    @param Axz:     The Axz component of the alignment tensor.
+    @type Axz:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Pxz value.
+    return Axz
+
+
+def calc_Pyy(Ayy):
+    """Function for calculating the Pyy value.
+
+    The equation for calculating the parameter is::
+
+        Pyy  =  Ayy + 1/3.
+
+    @param Ayy:     The Ayy component of the alignment tensor.
+    @type Ayy:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Pyy value.
+    return Ayy + 1.0/3.0
+
+
+def calc_Pyz(Ayz):
+    """Function for calculating the Pyz value.
+
+    The equation for calculating the parameter is::
+
+        Pyz  =  Ayz.
+
+    @param Ayz:     The Ayz component of the alignment tensor.
+    @type Ayz:      float
+    @rtype:         float
+    """
+
+    # Calculate and return the Pyz value.
+    return Ayz
+
+
 def calc_Pzz(Pxx, Pyy):
     """Function for calculating the Pzz value.
 
@@ -649,92 +687,6 @@
 
     # Calculate and return the Pzz value.
     return 1.0 - Pxx - Pyy
-
-
-def calc_unit_x(R):
-    """Calculate the x unit vector.
-
-    This is given by the eigenvalue decomposition.
-
-
-    @param R:   The rotation matrix.
-    @type R:    numpy 3D, rank-2 array
-    @return:    The x unit vector.
-    @rtype:     numpy array (float64)
-    """
-
-    # Return the x unit vector.
-    return R[:, 0]
-
-
-def calc_unit_y(R):
-    """Calculate the y unit vector.
-
-    This is given by the eigenvalue decomposition.
-
-
-    @param R:   The rotation matrix.
-    @type R:    numpy 3D, rank-2 array
-    @return:    The y unit vector.
-    @rtype:     numpy array (float64)
-    """
-
-    # Return the y unit vector.
-    return R[:, 1]
-
-
-def calc_unit_z(R):
-    """Calculate the z unit vector.
-
-    This is given by the eigenvalue decomposition.
-
-
-    @param R:   The rotation matrix.
-    @type R:    numpy 3D, rank-2 array
-    @return:    The z unit vector.
-    @rtype:     numpy array (float64)
-    """
-
-    # Return the z unit vector.
-    return R[:, 2]
-
-
-def calc_Sxxyy(Sxx, Syy):
-    """Function for calculating the Sxx-yy value.
-
-    The equation for calculating the parameter is::
-
-        Sxx-yy  =  Sxx - Syy.
-
-    @param Sxx:     The Sxx component of the Saupe order matrix.
-    @type Sxx:      float
-    @param Syy:     The Syy component of the Saupe order matrix.
-    @type Syy:      float
-    @return:        The Sxx-yy component of the Saupe order matrix.
-    @rtype:         float
-    """
-
-    # Calculate and return the Sxx-yy value.
-    return Sxx - Syy
-
-
-def calc_Szz(Sxx, Syy):
-    """Function for calculating the Szz value.
-
-    The equation for calculating the parameter is::
-
-        Szz  =  - Sxx - Syy.
-
-    @param Sxx:     The Sxx component of the Saupe order matrix.
-    @type Sxx:      float
-    @param Syy:     The Syy component of the Saupe order matrix.
-    @type Syy:      float
-    @return:        The Szz component of the Saupe order matrix.
-    @rtype:         float
-    """
-
-    # Calculate and return the Szz value.
-    return - Sxx - Syy
 
 
 def calc_R(A):
@@ -765,6 +717,54 @@
 
     # Return the rotation matrix (with the columns reordered).
     return array([rot[:,x_index], rot[:,y_index], rot[:,z_index]])
+
+
+def calc_unit_x(R):
+    """Calculate the x unit vector.
+
+    This is given by the eigenvalue decomposition.
+
+
+    @param R:   The rotation matrix.
+    @type R:    numpy 3D, rank-2 array
+    @return:    The x unit vector.
+    @rtype:     numpy array (float64)
+    """
+
+    # Return the x unit vector.
+    return R[:, 0]
+
+
+def calc_unit_y(R):
+    """Calculate the y unit vector.
+
+    This is given by the eigenvalue decomposition.
+
+
+    @param R:   The rotation matrix.
+    @type R:    numpy 3D, rank-2 array
+    @return:    The y unit vector.
+    @rtype:     numpy array (float64)
+    """
+
+    # Return the y unit vector.
+    return R[:, 1]
+
+
+def calc_unit_z(R):
+    """Calculate the z unit vector.
+
+    This is given by the eigenvalue decomposition.
+
+
+    @param R:   The rotation matrix.
+    @type R:    numpy 3D, rank-2 array
+    @return:    The z unit vector.
+    @rtype:     numpy array (float64)
+    """
+
+    # Return the z unit vector.
+    return R[:, 2]
 
 
 def dependency_generator():




Related Messages


Powered by MHonArc, Updated Fri Dec 04 17:20:02 2009