Author: bugman Date: Thu Feb 19 14:19:02 2015 New Revision: 27666 URL: http://svn.gna.org/viewcvs/relax?rev=27666&view=rev Log: Merged revisions 27661-27662,27664 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk
........ r27661 | bugman | 2015-02-17 16:27:20 +0100 (Tue, 17 Feb 2015) | 6 lines Added some error checking for the monte_carlo.setup user function. A RelaxError is now raised if the number of simulations is less than 3. This prevents Python errors when later calling the monte_carlo.error_analysis user function. ........ r27662 | bugman | 2015-02-17 16:48:45 +0100 (Tue, 17 Feb 2015) | 6 lines Test suite fixes for the error checking in the monte_carlo.setup user function. The number of simulations has been increased from either 1 or 2 in all tests to the minimal number of simulations (3). ........ r27664 | bugman | 2015-02-18 17:55:35 +0100 (Wed, 18 Feb 2015) | 3 lines Small fix for the structure.write_pdb user function for handling old relax state and results files. ........ Modified: branches/nmrglue/ (props changed) branches/nmrglue/lib/structure/internal/object.py branches/nmrglue/pipe_control/error_analysis.py branches/nmrglue/test_suite/gui_tests/model_free.py branches/nmrglue/test_suite/system_tests/relax_disp.py branches/nmrglue/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py branches/nmrglue/test_suite/system_tests/scripts/peak_lists/ccpn_analysis.py branches/nmrglue/test_suite/system_tests/scripts/relax_disp/r1rho_off_res_tp02.py Propchange: branches/nmrglue/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Feb 19 14:19:02 2015 @@ -1 +1 @@ -/trunk:1-27659 +/trunk:1-27665 Modified: branches/nmrglue/lib/structure/internal/object.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/lib/structure/internal/object.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/lib/structure/internal/object.py (original) +++ branches/nmrglue/lib/structure/internal/object.py Thu Feb 19 14:19:02 2015 @@ -2970,6 +2970,12 @@ # Loop over and unpack the helix data. index = 1 for helix_id, mol_init_index, init_res_name, init_seq_num, mol_end_index, end_res_name, end_seq_num, helix_class, length in self.helices: + # The chain IDs. + if mol_init_index == None: + mol_init_index = 0 + if mol_end_index == None: + mol_end_index = 0 + pdb_write.helix(file, ser_num=index, helix_id=helix_id, init_chain_id=CHAIN_ID_LIST[mol_init_index], init_res_name=init_res_name, init_seq_num=init_seq_num, end_chain_id=CHAIN_ID_LIST[mol_end_index], end_res_name=end_res_name, end_seq_num=end_seq_num, helix_class=helix_class, length=length) index += 1 @@ -2984,6 +2990,10 @@ index = 1 for strand, sheet_id, num_strands, init_res_name, mol_init_index, init_seq_num, init_icode, end_res_name, mol_end_index, end_seq_num, end_icode, sense, cur_atom, cur_res_name, mol_cur_index, cur_res_seq, cur_icode, prev_atom, prev_res_name, mol_prev_index, prev_res_seq, prev_icode in self.sheets: # Translate molecule indices to chain IDs. + if mol_init_index == None: + mol_init_index = 0 + if mol_end_index == None: + mol_end_index = 0 init_chain_id = CHAIN_ID_LIST[mol_init_index] end_chain_id = CHAIN_ID_LIST[mol_end_index] cur_chain_id = None Modified: branches/nmrglue/pipe_control/error_analysis.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/pipe_control/error_analysis.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/pipe_control/error_analysis.py (original) +++ branches/nmrglue/pipe_control/error_analysis.py Thu Feb 19 14:19:02 2015 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2004-2014 Edward d'Auvergne # +# Copyright (C) 2004-2015 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -362,18 +362,20 @@ def monte_carlo_setup(number=None, all_select_sim=None): - """Function for setting up Monte Carlo simulations. + """Store the Monte Carlo simulation number. @keyword number: The number of Monte Carlo simulations to set up. @type number: int - @keyword all_select_sim: The selection status of the Monte Carlo simulations. The first - dimension of this matrix corresponds to the simulation and the - second corresponds to the instance. + @keyword all_select_sim: The selection status of the Monte Carlo simulations. The first dimension of this matrix corresponds to the simulation and the second corresponds to the instance. @type all_select_sim: list of lists of bool """ # Test if the current data pipe exists. check_pipe() + + # Check the value. + if number < 3: + raise RelaxError("A minimum of 3 Monte Carlo simulations is required.") # Create a number of MC sim data structures. cdp.sim_number = number Modified: branches/nmrglue/test_suite/gui_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/gui_tests/model_free.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/test_suite/gui_tests/model_free.py (original) +++ branches/nmrglue/test_suite/gui_tests/model_free.py Thu Feb 19 14:19:02 2015 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006-2014 Edward d'Auvergne # +# Copyright (C) 2006-2015 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -132,7 +132,7 @@ analysis.data.diff_tensor_grid_inc = {'sphere': 5, 'prolate': 5, 'oblate': 5, 'ellipsoid': 3} # Set the number of Monte Carlo simulations. - analysis.mc_sim_num.SetValue(2) + analysis.mc_sim_num.SetValue(3) # Set the maximum number of iterations (changing the allowed values). analysis.max_iter.control.SetRange(0, 100) @@ -344,7 +344,7 @@ analysis.data.diff_tensor_grid_inc = {'sphere': 5, 'prolate': 5, 'oblate': 5, 'ellipsoid': 3} # Set the number of Monte Carlo simulations. - analysis.mc_sim_num.SetValue(2) + analysis.mc_sim_num.SetValue(3) # Set the maximum number of iterations (changing the allowed values). analysis.max_iter.control.SetRange(0, 100) @@ -360,7 +360,7 @@ self.assertEqual(analysis.data.local_tm_models, ['tm0', 'tm1']) self.assertEqual(analysis.data.mf_models, ['m1', 'm2']) self.assertEqual(analysis.data.grid_inc, 3) - self.assertEqual(analysis.data.mc_sim_num, 2) + self.assertEqual(analysis.data.mc_sim_num, 3) self.assertEqual(analysis.data.max_iter, 1) self.assertEqual(analysis.data.diff_tensor_grid_inc['sphere'], 5) self.assertEqual(analysis.data.diff_tensor_grid_inc['prolate'], 5) Modified: branches/nmrglue/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/relax_disp.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/test_suite/system_tests/relax_disp.py (original) +++ branches/nmrglue/test_suite/system_tests/relax_disp.py Thu Feb 19 14:19:02 2015 @@ -1344,7 +1344,7 @@ pre_run_dir = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21715_clustered_indexerror'+sep+'non_clustered' relax_disp.Relax_disp.opt_func_tol = 1e-5 relax_disp.Relax_disp.opt_max_iterations = 1000 - relax_disp.Relax_disp(pipe_name='origin - relax_disp (Sun Feb 23 19:36:51 2014)', pipe_bundle='relax_disp (Sun Feb 23 19:36:51 2014)', results_dir=self.tmpdir, models=['R2eff', 'No Rex'], grid_inc=11, mc_sim_num=2, modsel='AIC', pre_run_dir=pre_run_dir, insignificance=1.0, numeric_only=True, mc_sim_all_models=False, eliminate=True) + relax_disp.Relax_disp(pipe_name='origin - relax_disp (Sun Feb 23 19:36:51 2014)', pipe_bundle='relax_disp (Sun Feb 23 19:36:51 2014)', results_dir=self.tmpdir, models=['R2eff', 'No Rex'], grid_inc=11, mc_sim_num=3, modsel='AIC', pre_run_dir=pre_run_dir, insignificance=1.0, numeric_only=True, mc_sim_all_models=False, eliminate=True) def test_bug_22146_unpacking_r2a_r2b_cluster_B14(self): @@ -5057,7 +5057,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=1000) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5129,7 +5129,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=1000) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5199,7 +5199,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=1000) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5269,7 +5269,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=1000) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5341,7 +5341,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=100) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5411,7 +5411,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=1000) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) @@ -5508,7 +5508,7 @@ self.interpreter.minimise.execute(min_algor='simplex', func_tol=1e-05, max_iter=10) # Monte Carlo simulations. - self.interpreter.monte_carlo.setup(number=2) + self.interpreter.monte_carlo.setup(number=3) self.interpreter.monte_carlo.create_data(method='back_calc') self.interpreter.monte_carlo.initial_values() self.interpreter.minimise.execute(min_algor='simplex', max_iter=10) Modified: branches/nmrglue/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py (original) +++ branches/nmrglue/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py Thu Feb 19 14:19:02 2015 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2004-2013 Edward d'Auvergne # +# Copyright (C) 2004-2015 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -165,7 +165,7 @@ MIN_ALGOR = 'newton' # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. -MC_NUM = 2 +MC_NUM = 3 # Automatic looping over all rounds until convergence (must be a boolean value of True or False). CONV_LOOP = True Modified: branches/nmrglue/test_suite/system_tests/scripts/peak_lists/ccpn_analysis.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/scripts/peak_lists/ccpn_analysis.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/test_suite/system_tests/scripts/peak_lists/ccpn_analysis.py (original) +++ branches/nmrglue/test_suite/system_tests/scripts/peak_lists/ccpn_analysis.py Thu Feb 19 14:19:02 2015 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2004-2014 Edward d'Auvergne # +# Copyright (C) 2004-2015 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -116,7 +116,7 @@ minimise.execute('simplex', scaling=False, constraints=False) # Monte Carlo simulations. -monte_carlo.setup(number=2) +monte_carlo.setup(number=3) monte_carlo.create_data() monte_carlo.initial_values() minimise.execute('simplex', scaling=False, constraints=False) Modified: branches/nmrglue/test_suite/system_tests/scripts/relax_disp/r1rho_off_res_tp02.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/scripts/relax_disp/r1rho_off_res_tp02.py?rev=27666&r1=27665&r2=27666&view=diff ============================================================================== --- branches/nmrglue/test_suite/system_tests/scripts/relax_disp/r1rho_off_res_tp02.py (original) +++ branches/nmrglue/test_suite/system_tests/scripts/relax_disp/r1rho_off_res_tp02.py Thu Feb 19 14:19:02 2015 @@ -21,7 +21,7 @@ GRID_INC = 4 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. -MC_NUM = 1 +MC_NUM = 3 # Set up the data pipe. _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits