mailr10626 - in /1.3/maths_fns: frame_order_matrix_ops.py order_parameters.py


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

Header


Content

Posted by edward on February 03, 2010 - 11:22:
Author: bugman
Date: Wed Feb  3 11:22:00 2010
New Revision: 10626

URL: http://svn.gna.org/viewcvs/relax?rev=10626&view=rev
Log:
Added the stub function maths_fns.order_parameters.iso_cone_S_to_cos_theta().

This will be used to convert the order parameter S into the cosine of the 
cone angle.


Added:
    1.3/maths_fns/order_parameters.py
Modified:
    1.3/maths_fns/frame_order_matrix_ops.py

Modified: 1.3/maths_fns/frame_order_matrix_ops.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order_matrix_ops.py?rev=10626&r1=10625&r2=10626&view=diff
==============================================================================
--- 1.3/maths_fns/frame_order_matrix_ops.py (original)
+++ 1.3/maths_fns/frame_order_matrix_ops.py Wed Feb  3 11:22:00 2010
@@ -213,7 +213,7 @@
     matrix[7, 7] = matrix[2, 2]
 
     # Calculate the cone angle.
-    cos_theta = order_parameters.cos_theta(s1)
+    cos_theta = order_parameters.iso_cone_S_to_cos_theta(s1)
 
     # The c11.c22 and c12.c21 elements.
     matrix[0, 4] = matrix[4, 0] = (cos_theta + 1.0) / 4.0

Added: 1.3/maths_fns/order_parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/order_parameters.py?rev=10626&view=auto
==============================================================================
--- 1.3/maths_fns/order_parameters.py (added)
+++ 1.3/maths_fns/order_parameters.py Wed Feb  3 11:22:00 2010
@@ -1,0 +1,40 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2010 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful;                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Module for the conversion of order parameters to specific model 
parameters and vice versa."""
+
+
+def iso_cone_S_to_cos_theta(S):
+    """Convert the isotropic cone order parameter S into the cosine of the 
cone angle.
+
+    @param S:   The order parameter value (not squared).
+    @type S:    float
+    @return:    The value of cos(theta).
+    @rtype:     float
+    """
+
+    # Convert.
+    cos_theta = S
+
+    # Return cos(theta).
+    return cos_theta




Related Messages


Powered by MHonArc, Updated Wed Feb 03 18:20:02 2010