Author: bugman Date: Fri Jun 6 10:26:20 2014 New Revision: 23683 URL: http://svn.gna.org/viewcvs/relax?rev=23683&view=rev Log: Converted the 'free rotor' frame order model to the new axis_alpha parameter system. The axis_theta and axis_phi spherical coordinates are converted to the new reduced parameter set defined by a random point in space (the CoM of all atoms), the pivot point, and a single angle alpha. The alpha parameter defines the rotor axis angle from the xy-plane. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py branches/frame_order_cleanup/specific_analyses/frame_order/uf.py branches/frame_order_cleanup/target_functions/frame_order.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py?rev=23683&r1=23682&r2=23683&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py Fri Jun 6 10:26:20 2014 @@ -679,7 +679,7 @@ # The centre of mass, for use in the rotor models. com = None - if cdp.model in ['rotor', 'double rotor']: + if cdp.model in ['rotor', 'free rotor', 'double rotor']: # The centre of mass of all objects in the data pipe. com = pipe_centre_of_mass(verbosity=0) com = array(com, float64) Modified: branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py?rev=23683&r1=23682&r2=23683&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py Fri Jun 6 10:26:20 2014 @@ -238,7 +238,7 @@ cdp.params.append('eigen_gamma') # Frame order eigenframe - the isotropic cone axis. - if cdp.model in ['iso cone', 'free rotor', 'iso cone, torsionless', 'iso cone, free rotor', 'double rotor']: + if cdp.model in ['iso cone', 'iso cone, torsionless', 'iso cone, free rotor', 'double rotor']: cdp.params.append('axis_theta') cdp.params.append('axis_phi') @@ -248,7 +248,7 @@ cdp.params.append('axis_phi_2') # Frame order eigenframe - the rotor axis alpha angle. - if cdp.model in ['rotor']: + if cdp.model in ['rotor', 'free rotor']: cdp.params.append('axis_alpha') # Cone parameters - pseudo-elliptic cone parameters. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/uf.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/uf.py?rev=23683&r1=23682&r2=23683&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/uf.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/uf.py Fri Jun 6 10:26:20 2014 @@ -176,9 +176,9 @@ com = pipe_centre_of_mass(verbosity=0) # Generate the rotor axis. - if cdp.model in ['rotor']: + if cdp.model in ['rotor', 'free rotor']: axis = create_rotor_axis_alpha(alpha=cdp.axis_alpha, pivot=pivot, point=com) - elif cdp.model in ['free rotor', 'iso cone', 'iso cone, free rotor']: + elif cdp.model in ['iso cone', 'iso cone, free rotor']: axis = create_rotor_axis_spherical(theta=cdp.axis_theta, phi=cdp.axis_phi) else: axis = create_rotor_axis_euler(alpha=cdp.eigen_alpha, beta=cdp.eigen_beta, gamma=cdp.eigen_gamma) Modified: branches/frame_order_cleanup/target_functions/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/target_functions/frame_order.py?rev=23683&r1=23682&r2=23683&view=diff ============================================================================== --- branches/frame_order_cleanup/target_functions/frame_order.py (original) +++ branches/frame_order_cleanup/target_functions/frame_order.py Fri Jun 6 10:26:20 2014 @@ -131,6 +131,7 @@ self.paramag_centre = paramag_centre self.total_num_params = len(init_params) self.num_int_pts = num_int_pts + print com self.com = com self.ave_pos_pivot = ave_pos_pivot self._param_pivot = pivot @@ -467,13 +468,13 @@ if self.pivot_opt: self._param_pivot = params[:3] self._translation_vector = params[3:6] - ave_pos_beta, ave_pos_gamma, axis_theta, axis_phi = params[6:] + ave_pos_beta, ave_pos_gamma, axis_alpha = params[6:] else: self._translation_vector = params[:3] - ave_pos_beta, ave_pos_gamma, axis_theta, axis_phi = params[3:] - - # Generate the cone axis from the spherical angles. - spherical_to_cartesian([1.0, axis_theta, axis_phi], self.cone_axis) + ave_pos_beta, ave_pos_gamma, axis_alpha = params[3:] + + # Generate the rotor axis. + self.cone_axis = create_rotor_axis_alpha(alpha=axis_alpha, pivot=array(self._param_pivot, float64), point=self.com) # Pre-calculate the eigenframe rotation matrix. two_vect_to_R(self.z_axis, self.cone_axis, self.R_eigen)