Author: bugman Date: Thu Oct 1 19:49:46 2015 New Revision: 27917 URL: http://svn.gna.org/viewcvs/relax?rev=27917&view=rev Log: Merged revisions 23208-23211 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_cleanup ........ r23208 | bugman | 2014-05-16 16:36:45 +0200 (Fri, 16 May 2014) | 7 lines Updated the CaM frame order test model superimposition script. The structure.superimpose user function is now correctly called. The output log file has been added to the repository as it contains the correct translation and Euler rotation information needed for the test models. ........ r23209 | bugman | 2014-05-16 16:55:55 +0200 (Fri, 16 May 2014) | 6 lines Parameter update for the isotropic cone CaM frame order test model optimisation script. The Euler angles for the rotation about the motional pivot have been replaced by the translation vector and Euler angle CoM rotation parameters. ........ r23210 | bugman | 2014-05-17 18:03:44 +0200 (Sat, 17 May 2014) | 1 line Removed an unused import and an extra blank line. ........ r23211 | bugman | 2014-05-17 18:03:46 +0200 (Sat, 17 May 2014) | 5 lines Fix for a number of the frame order models which do not have parameter constraints. The linear_constraint() function was returning A, b = [], [] for these models, but these empty numpy arrays were causing the minfx library (https://gna.org/projects/minfx/) to fail. These values are now caught and the constraint algorithm turned off in the minimise() specific API method. ........ Added: trunk/test_suite/shared_data/frame_order/cam/superimpose.log - copied unchanged from r23211, branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/superimpose.log Modified: trunk/ (props changed) trunk/specific_analyses/frame_order/api.py trunk/test_suite/shared_data/frame_order/cam/iso_cone/frame_order.py trunk/test_suite/shared_data/frame_order/cam/superimpose.py Propchange: trunk/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Oct 1 19:49:46 2015 @@ -1 +1 @@ -/branches/frame_order_cleanup:1-23195,23197-23205 +/branches/frame_order_cleanup:1-23195,23197-23205,23208-23211 Modified: trunk/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/api.py?rev=27917&r1=27916&r2=27917&view=diff ============================================================================== --- trunk/specific_analyses/frame_order/api.py (original) +++ trunk/specific_analyses/frame_order/api.py Thu Oct 1 19:49:46 2015 @@ -29,9 +29,11 @@ from minfx.grid import grid_point_array from numpy import float64, zeros from re import search +from warnings import warn # relax module imports. from lib.errors import RelaxError, RelaxNoModelError +from lib.warnings import RelaxWarning from pipe_control import pipes from pipe_control.interatomic import interatomic_loop, return_interatom from pipe_control.mol_res_spin import return_spin, spin_loop @@ -505,6 +507,16 @@ if constraints: A, b = linear_constraints(scaling_matrix=scaling_matrix[0]) + # No constraints. + if len(A) == 0: + warn(RelaxWarning("The '%s' model parameters are not constrained, turning the linear constraint algorithm off." % cdp.model)) + constraints = False + + # Pop out the log barrier algorithm. + if min_algor == 'Log barrier': + min_algor = min_options[0] + min_options = min_options[1:] + # Grid search. if search('^[Gg]rid', min_algor): results = grid_point_array(func=model.func, args=(), points=min_options, verbosity=verbosity) Modified: trunk/test_suite/shared_data/frame_order/cam/iso_cone/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/frame_order/cam/iso_cone/frame_order.py?rev=27917&r1=27916&r2=27917&view=diff ============================================================================== --- trunk/test_suite/shared_data/frame_order/cam/iso_cone/frame_order.py (original) +++ trunk/test_suite/shared_data/frame_order/cam/iso_cone/frame_order.py Thu Oct 1 19:49:46 2015 @@ -3,12 +3,10 @@ # Python module imports. from numpy import array -# relax module imports. -from lib.geometry.rotations import reverse_euler_zyz - # The real parameter values. -AVE_POS_ALPHA, AVE_POS_BETA, AVE_POS_GAMMA = reverse_euler_zyz(4.3434999280669997, 0.43544332764249905, 3.8013235235956007) +AVE_POS_X, AVE_POS_Y, AVE_POS_Z = [ -21.269217407269576, -3.122610661328414, -2.400652421655998] +AVE_POS_ALPHA, AVE_POS_BETA, AVE_POS_GAMMA = [ 5.623469076122531, 0.435439405668396, 5.081265529106499] AXIS_THETA = 0.96007997859534299767 AXIS_PHI = 4.03227550621962294031 CONE_THETA = 0.6 @@ -85,6 +83,9 @@ frame_order.quad_int(flag=False) # Check the minimum. +value.set(param='ave_pos_x', val=AVE_POS_X) +value.set(param='ave_pos_y', val=AVE_POS_Y) +value.set(param='ave_pos_z', val=AVE_POS_Z) value.set(param='ave_pos_alpha', val=AVE_POS_ALPHA) value.set(param='ave_pos_beta', val=AVE_POS_BETA) value.set(param='ave_pos_gamma', val=AVE_POS_GAMMA) @@ -108,7 +109,6 @@ frame_order.pivot(pivot, fix=False) minimise('simplex', constraints=True) - # Test Monte Carlo simulations. monte_carlo.setup(number=5) monte_carlo.create_data() Modified: trunk/test_suite/shared_data/frame_order/cam/superimpose.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/frame_order/cam/superimpose.py?rev=27917&r1=27916&r2=27917&view=diff ============================================================================== --- trunk/test_suite/shared_data/frame_order/cam/superimpose.py (original) +++ trunk/test_suite/shared_data/frame_order/cam/superimpose.py Thu Oct 1 19:49:46 2015 @@ -8,7 +8,7 @@ structure.read_pdb('1J7P_1st_NH_rot.pdb', set_mol_name='C-dom', set_model_num=2) # Superimpose. -structure.superimpose(method='fit to first', centre='CoM') +structure.superimpose(method='fit to first', centre_type='CoM') # Save the result. structure.write_pdb('superimpose.pdb', force=True)