Author: bugman Date: Sat Mar 23 10:11:02 2013 New Revision: 19051 URL: http://svn.gna.org/viewcvs/relax?rev=19051&view=rev Log: Shifted the target_functions.order_parameters module to lib.order.order_parameters. Added: trunk/lib/order/order_parameters.py - copied unchanged from r19029, trunk/target_functions/order_parameters.py Removed: trunk/target_functions/order_parameters.py Modified: trunk/lib/order/__init__.py trunk/target_functions/__init__.py trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor/frame_order.py trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor2/frame_order.py trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor.py trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor2.py trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor.py trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor_eigenframe.py trunk/test_suite/unit_tests/_target_functions/_frame_order/test_matrix_ops.py Modified: trunk/lib/order/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/order/__init__.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/lib/order/__init__.py (original) +++ trunk/lib/order/__init__.py Sat Mar 23 10:11:02 2013 @@ -23,5 +23,5 @@ """The relax-lib NMR package - a library of functions for order and entropy.""" __all__ = [ - '' + 'order_parameters' ] Modified: trunk/target_functions/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/__init__.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/target_functions/__init__.py (original) +++ trunk/target_functions/__init__.py Sat Mar 23 10:11:02 2013 @@ -32,7 +32,6 @@ 'jw_mapping', 'mf', 'n_state_model', - 'order_parameters', 'paramag_centre', 'potential', 'ri_comps', Removed: trunk/target_functions/order_parameters.py URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/order_parameters.py?rev=19050&view=auto ============================================================================== --- trunk/target_functions/order_parameters.py (original) +++ trunk/target_functions/order_parameters.py (removed) @@ -1,80 +1,0 @@ -############################################################################### -# # -# Copyright (C) 2010 Edward d'Auvergne # -# # -# This file is part of the program relax (http://www.nmr-relax.com). # -# # -# This program 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 3 of the License, or # -# (at your option) any later version. # -# # -# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. # -# # -############################################################################### - -# Module docstring. -"""Module for the conversion of order parameters to specific model parameters and vice versa.""" - -# Python module imports. -from math import acos, cos, pi, sqrt - - -def iso_cone_theta_to_S(theta): - """Convert the isotropic cone angle to the order parameter S. - - This uses Woessner's diffusion in a cone order parameter defined as:: - - S = 1/2 (1 + cos(theta)) * cos(theta) - - - @param theta: The isotropic cone angle. - @type theta: float - @return: The order parameter value. - @rtype: float - """ - - # Convert. - S = 0.5 * (1.0 + cos(theta)) * cos(theta) - - # Return the order parameter. - return S - - -def iso_cone_S_to_theta(S): - """Convert the isotropic cone order parameter S into the cone angle. - - This uses Woessner's diffusion in a cone order parameter defined as:: - - S = 1/2 (1 + cos(theta)) * cos(theta) - - The conversion equation is:: - - theta = acos((sqrt(8.0*S + 1) - 1)/2) - - Hence the cone angle is only between 0 and 2pi/3, as the order parameter for higher cone angles is ambiguous. - - - @param S: The order parameter value (not squared). - @type S: float - @return: The value of cos(theta). - @rtype: float - """ - - # Catch bad order parameters. - if S > 1.0: - return 0.0 - if S < -0.125: - return 2*pi - - # Convert. - theta = acos(0.5*(sqrt(8.0*S + 1) - 1)) - - # Return theta. - return theta Modified: trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor/frame_order.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor/frame_order.py (original) +++ trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor/frame_order.py Sat Mar 23 10:11:02 2013 @@ -5,8 +5,8 @@ from os import sep # relax module imports. -from target_functions.order_parameters import iso_cone_theta_to_S from lib.geometry.rotations import euler_to_R_zyz +from lib.order.order_parameters import iso_cone_theta_to_S class Analysis: Modified: trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor2/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor2/frame_order.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor2/frame_order.py (original) +++ trunk/test_suite/shared_data/frame_order/cam/iso_cone_free_rotor2/frame_order.py Sat Mar 23 10:11:02 2013 @@ -6,7 +6,7 @@ # relax module imports. from lib.geometry.rotations import euler_to_R_zyz -from target_functions.order_parameters import iso_cone_theta_to_S +from lib.order.order_parameters import iso_cone_theta_to_S class Analysis: Modified: trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor.py (original) +++ trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor.py Sat Mar 23 10:11:02 2013 @@ -24,8 +24,8 @@ # relax module imports. from base_script import Base_script -from target_functions.order_parameters import iso_cone_theta_to_S from lib.geometry.rotations import reverse_euler_zyz +from lib.order.order_parameters import iso_cone_theta_to_S class Analysis(Base_script): Modified: trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor2.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor2.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor2.py (original) +++ trunk/test_suite/system_tests/scripts/frame_order/cam/iso_cone_free_rotor2.py Sat Mar 23 10:11:02 2013 @@ -24,8 +24,8 @@ # relax module imports. from base_script import Base_script -from target_functions.order_parameters import iso_cone_theta_to_S from lib.geometry.rotations import reverse_euler_zyz +from lib.order.order_parameters import iso_cone_theta_to_S class Analysis(Base_script): Modified: trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor.py (original) +++ trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor.py Sat Mar 23 10:11:02 2013 @@ -8,7 +8,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from lib.geometry.coord_transform import cartesian_to_spherical -from target_functions.order_parameters import iso_cone_theta_to_S +from lib.order.order_parameters import iso_cone_theta_to_S from status import Status; status = Status() Modified: trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor_eigenframe.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor_eigenframe.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor_eigenframe.py (original) +++ trunk/test_suite/system_tests/scripts/frame_order/model_calcs/iso_cone_free_rotor_eigenframe.py Sat Mar 23 10:11:02 2013 @@ -8,7 +8,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from lib.geometry.rotations import R_to_euler_zyz -from target_functions.order_parameters import iso_cone_theta_to_S +from lib.order.order_parameters import iso_cone_theta_to_S from status import Status; status = Status() Modified: trunk/test_suite/unit_tests/_target_functions/_frame_order/test_matrix_ops.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_target_functions/_frame_order/test_matrix_ops.py?rev=19051&r1=19050&r2=19051&view=diff ============================================================================== --- trunk/test_suite/unit_tests/_target_functions/_frame_order/test_matrix_ops.py (original) +++ trunk/test_suite/unit_tests/_target_functions/_frame_order/test_matrix_ops.py Sat Mar 23 10:11:02 2013 @@ -29,7 +29,7 @@ from lib.geometry.coord_transform import cartesian_to_spherical from target_functions.frame_order import * from lib.algebra.kronecker_product import transpose_23 -from target_functions.order_parameters import iso_cone_theta_to_S +from lib.order.order_parameters import iso_cone_theta_to_S from status import Status; status = Status()