Author: bugman
Date: Sun Nov  2 22:14:36 2014
New Revision: 26410

URL: http://svn.gna.org/viewcvs/relax?rev=26410&view=rev
Log:
Implemented the compile_1st_matrix_rotor() function.

This is for the lib.frame_order.rotor module.  The function will calculate the 
1st degree in-frame
frame order matrix for the rotor model.

Modified:
    branches/frame_order_cleanup/lib/frame_order/rotor.py

Modified: branches/frame_order_cleanup/lib/frame_order/rotor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/rotor.py?rev=26410&r1=26409&r2=26410&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/frame_order/rotor.py       (original)
+++ branches/frame_order_cleanup/lib/frame_order/rotor.py       Sun Nov  2 
22:14:36 2014
@@ -33,6 +33,32 @@
 # relax module imports.
 from lib.compat import norm
 from lib.frame_order.matrix_ops import rotate_daeg
+
+
+def compile_1st_matrix_rotor(matrix, R_eigen, sigma_max):
+    """Generate the 1st degree Frame Order matrix for the rotor model.
+
+    @param matrix:      The Frame Order matrix, 1st degree to be populated.
+    @type matrix:       numpy 3D, rank-2 array
+    @param R_eigen:     The eigenframe rotation matrix.
+    @type R_eigen:      numpy 3D, rank-2 array
+    @param sigma_max:   The maximum torsion angle.
+    @type sigma_max:    float
+    """
+
+    # Zeros.
+    matrix[:] = 0.0
+
+    # The sinc value.
+    val = sinc(sigma_max/pi)
+
+    # Diagonal values.
+    matrix[0, 0] = val
+    matrix[1, 1] = val
+    matrix[2, 2] = 1.0
+
+    # Rotate and return the frame order matrix.
+    return rotate_daeg(matrix, R_eigen)
 
 
 def compile_2nd_matrix_rotor(matrix, Rx2_eigen, smax):


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to