Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2009-2012,2014 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax (http://www.nmr-relax.com). # 6 # # 7 # This program is free software: you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation, either version 3 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # This program is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. # 19 # # 20 ############################################################################### 21 22 # Module docstring. 23 """Module for the handling of Frame Order.""" 24 25 # relax module imports. 26 from lib.frame_order.matrix_ops import rotate_daeg 27 2830 """Generate the 1st degree Frame Order matrix for the free rotor model. 31 32 @param matrix: The Frame Order matrix, 1st degree to be populated. 33 @type matrix: numpy 3D, rank-2 array 34 @param R_eigen: The eigenframe rotation matrix. 35 @type R_eigen: numpy 3D, rank-2 array 36 """ 37 38 # Zeros. 39 matrix[:] = 0.0 40 41 # The single value. 42 matrix[2, 2] = 1.0 43 44 # Rotate and return the frame order matrix. 45 return rotate_daeg(matrix, R_eigen)46 4749 """Generate the rotated 2nd degree Frame Order matrix for the free rotor model. 50 51 The rotor axis is assumed to be parallel to the z-axis in the eigenframe. 52 53 54 @param matrix: The Frame Order matrix, 2nd degree to be populated. 55 @type matrix: numpy 9D, rank-2 array 56 @param Rx2_eigen: The Kronecker product of the eigenframe rotation matrix with itself. 57 @type Rx2_eigen: numpy 9D, rank-2 array 58 """ 59 60 # Zeros. 61 matrix[:] = 0.0 62 63 # Diagonal. 64 matrix[0, 0] = 0.5 65 matrix[1, 1] = 0.5 66 matrix[3, 3] = 0.5 67 matrix[4, 4] = 0.5 68 matrix[8, 8] = 1 69 70 # Off diagonal set 1. 71 matrix[0, 4] = matrix[4, 0] = 0.5 72 73 # Off diagonal set 2. 74 matrix[1, 3] = matrix[3, 1] = -0.5 75 76 # Rotate and return the frame order matrix. 77 return rotate_daeg(matrix, Rx2_eigen)78
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 8 10:44:56 2024 | http://epydoc.sourceforge.net |