Author: bugman Date: Thu Jun 26 14:21:15 2014 New Revision: 24328 URL: http://svn.gna.org/viewcvs/relax?rev=24328&view=rev Log: Added proper support for the double rotor frame order models to the system test scripts. This is for the CaM synthetic data. The base script can now handle the current parameterisation of the double rotor model with a single pivot, an eigenframe, and the second pivot defined by a displacement along the z-axis. The scripts for the double_rotor and double_rotor_large_angle data sets have been changed to use this parameterisation as well. Modified: branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/base_script.py branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor.py branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor_large_angle.py Modified: branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/base_script.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/base_script.py?rev=24328&r1=24327&r2=24328&view=diff ============================================================================== --- branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/base_script.py (original) +++ branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/base_script.py Thu Jun 26 14:21:15 2014 @@ -55,6 +55,7 @@ NUM_INT_PTS = 2000 # The model parameters. + PIVOT_DISP = None AVE_POS_X, AVE_POS_Y, AVE_POS_Z = [ -20.859750185691549, -2.450606987447843, -2.191854570352916] AVE_POS_ALPHA, AVE_POS_BETA, AVE_POS_GAMMA = [ 5.623468683852550, 0.435439748282942, 5.081265879629926] AXIS_THETA = None @@ -70,11 +71,10 @@ CONE_SIGMA_MAX = None AXIS_THETA2 = None AXIS_PHI2 = None - CONE_SIGMA_MAX2 = None + CONE_SIGMA_MAX_2 = None # The pivot points. PIVOT = array([ 37.254, 0.5, 16.7465], float32) - PIVOT2 = None # The CoM - for use in the rotor models. COM = array([44.737253525507697, -1.1684805963699558, 14.072436716990133], float32) @@ -158,6 +158,7 @@ # Set the parameter values. params = [ + 'pivot_disp', 'ave_pos_x', 'ave_pos_y', 'ave_pos_z', @@ -174,7 +175,8 @@ 'cone_theta_y', 'cone_theta', 'cone_s1', - 'cone_sigma_max' + 'cone_sigma_max', + 'cone_sigma_max_2' ] for param in params: # Variable name. Modified: branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor.py?rev=24328&r1=24327&r2=24328&view=diff ============================================================================== --- branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor.py (original) +++ branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor.py Thu Jun 26 14:21:15 2014 @@ -23,10 +23,39 @@ """Script for optimising the second rotor frame order test model of CaM.""" # Python module imports -from numpy import array, float32 +from numpy import array, float32, float64, transpose +from numpy.linalg import norm # relax module imports. from base_script import Base_script +from lib.geometry.rotations import R_to_euler_zyz + + +def eigen_system(): + """Recreate the eigensystem parameters.""" + + # The centre of masses of each domain (from the system_create.log file). + N_COM = array([41.739, 6.03, -0.764], float64) + C_COM = array([26.837, -12.379, 28.342], float64) + + # The Z-axis as the inter CoM vector. + z_axis = N_COM - C_COM + disp = norm(z_axis) + z_axis /= disp + + # The eigenframe (partly from the system_create.log file). + eigensystem = transpose(array([ + [-0.487095774865268, -0.60362450312215, -0.63116968030708 ], + [ -7.778375610280605e-01, 6.284649244351433e-01, -7.532653237683726e-04], + z_axis + ], float64)) + + # Convert to Euler angles. + a, b, g = R_to_euler_zyz(eigensystem) + + # Return the parameters. + return a, b, g, disp + class Analysis(Base_script): @@ -37,16 +66,12 @@ MODEL = 'double rotor' # The model parameters. - AXIS_THETA = 1.494291741547518 - AXIS_PHI = 2.525044022476957 + EIGEN_ALPHA, EIGEN_BETA, EIGEN_GAMMA, PIVOT_DISP = eigen_system() CONE_SIGMA_MAX = 10.5 / 2.0 / 360.0 * 2.0 * pi - AXIS_THETA2 = 2.30381499622381 - AXIS_PHI2 = -2.249696457768556 - CONE_SIGMA_MAX2 = 11.5 / 2.0 / 360.0 * 2.0 * pi + CONE_SIGMA_MAX_2 = 11.5 / 2.0 / 360.0 * 2.0 * pi - # The pivot points. - PIVOT = array([41.739, 6.03, -0.764], float32) - PIVOT2 = array([26.837, -12.379, 28.342], float32) + # The pivot point. + PIVOT = array([26.837, -12.379, 28.342], float32) # Execute the analysis. Modified: branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor_large_angle.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor_large_angle.py?rev=24328&r1=24327&r2=24328&view=diff ============================================================================== --- branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor_large_angle.py (original) +++ branches/frame_order_cleanup/test_suite/system_tests/scripts/frame_order/cam/double_rotor_large_angle.py Thu Jun 26 14:21:15 2014 @@ -23,10 +23,39 @@ """Script for optimising the second rotor frame order test model of CaM.""" # Python module imports -from numpy import array, float32 +from numpy import array, float32, float64, transpose +from numpy.linalg import norm # relax module imports. from base_script import Base_script +from lib.geometry.rotations import R_to_euler_zyz + + +def eigen_system(): + """Recreate the eigensystem parameters.""" + + # The centre of masses of each domain (from the system_create.log file). + N_COM = array([41.739, 6.03, -0.764], float64) + C_COM = array([26.837, -12.379, 28.342], float64) + + # The Z-axis as the inter CoM vector. + z_axis = N_COM - C_COM + disp = norm(z_axis) + z_axis /= disp + + # The eigenframe (partly from the system_create.log file). + eigensystem = transpose(array([ + [-0.487095774865268, -0.60362450312215, -0.63116968030708 ], + [ -7.778375610280605e-01, 6.284649244351433e-01, -7.532653237683726e-04], + z_axis + ], float64)) + + # Convert to Euler angles. + a, b, g = R_to_euler_zyz(eigensystem) + + # Return the parameters. + return a, b, g, disp + class Analysis(Base_script): @@ -37,16 +66,12 @@ MODEL = 'double rotor' # The model parameters. - AXIS_THETA = 1.494291741547518 - AXIS_PHI = 2.525044022476957 + EIGEN_ALPHA, EIGEN_BETA, EIGEN_GAMMA, PIVOT_DISP = eigen_system() CONE_SIGMA_MAX = 55.0 / 2.0 / 360.0 * 2.0 * pi - AXIS_THETA2 = 2.30381499622381 - AXIS_PHI2 = -2.249696457768556 - CONE_SIGMA_MAX2 = 85.0 / 2.0 / 360.0 * 2.0 * pi + CONE_SIGMA_MAX_2 = 85.0 / 2.0 / 360.0 * 2.0 * pi - # The pivot points. - PIVOT = array([41.739, 6.03, -0.764], float32) - PIVOT2 = array([26.837, -12.379, 28.342], float32) + # The pivot points + PIVOT = array([26.837, -12.379, 28.342], float32) # Execute the analysis.