Author: bugman Date: Wed Jan 13 15:15:37 2010 New Revision: 10197 URL: http://svn.gna.org/viewcvs/relax?rev=10197&view=rev Log: Removed the alpha Euler angle from the isotropic code frame order model. Modified: 1.3/maths_fns/frame_order.py 1.3/specific_fns/frame_order.py Modified: 1.3/maths_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order.py?rev=10197&r1=10196&r2=10197&view=diff ============================================================================== --- 1.3/maths_fns/frame_order.py (original) +++ 1.3/maths_fns/frame_order.py Wed Jan 13 15:15:37 2010 @@ -225,26 +225,22 @@ def func_iso_cone(self, params): """Target function for isotropic cone model optimisation using the alignment tensors. - This function optimises against alignment tensors. The cone axis spherical angles theta and - phi and the cone angle theta are the 3 parameters optimised in this model. - - @param params: The vector of parameter values {alpha, beta, gamma, theta, phi, theta_cone} - where the first 3 are the tensor rotation Euler angles, the next two are the - polar and azimuthal angles of the cone axis theta_cone is the isotropic cone - angle. + This function optimises against alignment tensors. + + @param params: The vector of parameter values {beta, gamma, theta, phi, theta_cone} where the first 2 are the tensor rotation Euler angles, the next two are the polar and azimuthal angles of the cone axis theta_cone is the isotropic cone angle. @type params: list of float @return: The chi-squared or SSE value. @rtype: float """ # Unpack the parameters. - alpha, beta, gamma, theta, phi, theta_cone = params + beta, gamma, theta, phi, theta_cone = params # Generate the 2nd degree Frame Order super matrix. self.frame_order_2nd = compile_2nd_matrix_iso_cone(self.frame_order_2nd, self.rot, self.z_axis, self.cone_axis, theta, phi, theta_cone) # Reduced alignment tensor rotation. - euler_to_R(alpha, beta, gamma, self.rot) + euler_to_R(0.0, beta, gamma, self.rot) # Back calculate the reduced tensors. for i in range(self.num_tensors): Modified: 1.3/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/frame_order.py?rev=10197&r1=10196&r2=10197&view=diff ============================================================================== --- 1.3/specific_fns/frame_order.py (original) +++ 1.3/specific_fns/frame_order.py Wed Jan 13 15:15:37 2010 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2009 Edward d'Auvergne # +# Copyright (C) 2009-2010 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -73,7 +73,7 @@ # The isotropic cone model initial parameter vector (the cone axis angles and the cone angle). elif cdp.model == 'iso cone': - return array([cdp.alpha, cdp.beta, cdp.gamma, cdp.theta_axis, cdp.phi_axis, cdp.theta_cone], float64) + return array([cdp.beta, cdp.gamma, cdp.theta_axis, cdp.phi_axis, cdp.theta_cone], float64) def _back_calc(self): @@ -433,9 +433,13 @@ # Set up the tensor rotation parameter arrays. if init: - cdp.params.append('alpha') - cdp.params.append('beta') - cdp.params.append('gamma') + if cdp.model == 'iso cone': + cdp.params.append('beta') + cdp.params.append('gamma') + else: + cdp.params.append('alpha') + cdp.params.append('beta') + cdp.params.append('gamma') # Initialise the tensor rotation angles. if not hasattr(cdp, 'alpha'): @@ -497,7 +501,10 @@ # Isotropic cone model. elif cdp.model == 'iso cone': # Disassemble the parameter vector. - alpha, beta, gamma, theta_axis, phi_axis, theta_cone = param_vector + beta, gamma, theta_axis, phi_axis, theta_cone = param_vector + + # Alpha is zero in this model! + alpha = 0.0 # Wrap the cone angle to be between 0 and pi. if theta_cone < 0.0: @@ -667,15 +674,22 @@ # Parameters. if set == 'all' or set == 'params': - names.append('alpha') - names.append('beta') - names.append('gamma') - # The isotropic cone model. if hasattr(cdp, 'model') and cdp.model == 'iso cone': + # Euler angles. + names.append('beta') + names.append('gamma') + + # Angular cone parameters. names.append('theta_axis') names.append('phi_axis') names.append('theta_cone') + + # All other models. + else: + names.append('alpha') + names.append('beta') + names.append('gamma') # Minimisation statistics. if set == 'all' or set == 'min': @@ -688,27 +702,41 @@ # Parameter errors. if error_names and (set == 'all' or set == 'params'): - names.append('alpha_err') - names.append('beta_err') - names.append('gamma_err') - # The isotropic cone model. if hasattr(cdp, 'model') and cdp.model == 'iso cone': + # Euler angles. + names.append('beta_err') + names.append('gamma_err') + + # Angular cone parameters. names.append('theta_axis_err') names.append('phi_axis_err') names.append('theta_cone_err') + # All other models. + else: + names.append('alpha_err') + names.append('beta_err') + names.append('gamma_err') + # Parameter simulation values. if sim_names and (set == 'all' or set == 'params'): - names.append('alpha_sim') - names.append('beta_sim') - names.append('gamma_sim') - # The isotropic cone model. if hasattr(cdp, 'model') and cdp.model == 'iso cone': + # Euler angles. + names.append('beta_sim') + names.append('gamma_sim') + + # Angular cone parameters. names.append('theta_axis_sim') names.append('phi_axis_sim') names.append('theta_cone_sim') + + # All other models. + else: + names.append('alpha_sim') + names.append('beta_sim') + names.append('gamma_sim') # Return the names. return names