Author: bugman Date: Thu Nov 20 09:53:10 2014 New Revision: 26646 URL: http://svn.gna.org/viewcvs/relax?rev=26646&view=rev Log: More improvements for the align_tensor.matrix_angles user function description. Modified: trunk/user_functions/align_tensor.py Modified: trunk/user_functions/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/trunk/user_functions/align_tensor.py?rev=26646&r1=26645&r2=26646&view=diff ============================================================================== --- trunk/user_functions/align_tensor.py (original) +++ trunk/user_functions/align_tensor.py Thu Nov 20 09:53:10 2014 @@ -341,7 +341,7 @@ ) # Description. uf.desc.append(Desc_container()) -uf.desc[-1].add_paragraph("This will calculate the inter-matrix angles between all loaded alignment tensors for the current data pipe. For the vector basis sets, the matrices are first converted to vector form and then then the inter-vector angles rather than inter-matrix angles are calculated. The angles are dependent upon the basis set - linear maps produce identical results whereas non-linear maps result in different angles. The basis set can be one of:") +uf.desc[-1].add_paragraph("This will calculate the inter-matrix angles between all loaded alignment tensors for the current data pipe. For the vector basis sets, the matrices are first mapped to vector form and then then the inter-vector angles rather than inter-matrix angles are calculated. The angles are dependent upon the basis set - linear maps produce identical results whereas non-linear maps result in different angles. The basis set can be one of:") uf.desc[-1].add_item_list_element("'matrix'", "The standard inter-matrix angles. This default option is a linear map, hence angles are preserved. The angle is calculated via the arccos of the Euclidean inner product of the alignment matrices in rank-2, 3D form divided by the Frobenius norm ||A||_F of the matrices.") uf.desc[-1].add_item_list_element("'irreducible 5D'", "The inter-tensor vector angles for the irreducible spherical tensor 5D basis set {A-2, A-1, A0, A1, A2}. This is a linear map, hence angles are preserved. These are the spherical harmonic decomposition coefficients.") uf.desc[-1].add_item_list_element("'unitary 9D'", "The inter-tensor vector angles for the unitary 9D basis set {Sxx, Sxy, Sxz, Syx, Syy, Syz, Szx, Szy, Szz}. This is a linear map, hence angles are preserved.") @@ -351,7 +351,7 @@ uf.desc[-1].add_verbatim("""\ / <A1 , A2> \ theta = arccos | ------------- | , - \ ||A1|| ||A2|| / \ + \ ||A1||.||A2|| / \ """) uf.desc[-1].add_paragraph("where <a,b> is the Euclidean inner product and ||a|| is the Frobenius norm of the matrix. For the irreducible spherical tensor 5D basis set, the Am components are defined as") uf.desc[-1].add_verbatim("""\ @@ -369,7 +369,9 @@ """) uf.desc[-1].add_paragraph("and, for this complex notation, the angle is") uf.desc[-1].add_verbatim("""\ - theta = arccos(Re(<A1|A2>) / (|A1|.|A2|)) , \ + / Re(<A1|A2>) \ + theta = arccos | ----------- | , + \ |A1|.|A2| / \ """) uf.desc[-1].add_paragraph("where the inner product is defined as") uf.desc[-1].add_verbatim("""\ @@ -379,7 +381,13 @@ /__ m=-2,2 \ """) -uf.desc[-1].add_paragraph("and where Am* = (-1)^m A-m, and the norm is defined as |A1| = Re(sqrt(<A1|A1>)).") +uf.desc[-1].add_paragraph("and where Am* = (-1)^m A-m, and the norm is defined as |A1| = Re(sqrt(<A1|A1>)). For all other basis sets whereby the map is real matrix -> real vector, the inter-tensor angle is defined as") +uf.desc[-1].add_verbatim("""\ + / <A1|A2> \ + theta = arccos | --------- | , + \ |A1|.|A2| / \ +""") +uf.desc[-1].add_paragraph("where the inner product <A1|A2> is simply the vector dot product and |A1| is the vector length.") uf.backend = align_tensor.matrix_angles uf.menu_text = "&matrix_angles" uf.gui_icon = "oxygen.categories.applications-education"