Author: bugman Date: Thu Nov 21 14:28:42 2013 New Revision: 21577 URL: http://svn.gna.org/viewcvs/relax?rev=21577&view=rev Log: Clean ups and speed ups of the 1H MMQ flag calls. Modified: branches/relax_disp/specific_analyses/relax_disp/api.py branches/relax_disp/specific_analyses/relax_disp/disp_data.py branches/relax_disp/specific_analyses/relax_disp/optimisation.py Modified: branches/relax_disp/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/api.py?rev=21577&r1=21576&r2=21577&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/api.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/api.py Thu Nov 21 14:28:42 2013 @@ -686,7 +686,7 @@ # All other models (the base data is the R2eff/R1rho values). else: - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Loop over the sequence. @@ -734,7 +734,7 @@ # Calculate the chi-squared value. else: - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Loop over all spins. @@ -785,7 +785,7 @@ # All other models (with R2eff/R1rho base data). else: - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Unpack the data. @@ -1132,7 +1132,7 @@ # Test the sequence data exists. check_mol_res_spin_data() - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Loop over spin data. @@ -1231,7 +1231,7 @@ # Unpack the data. spin, spin_id = data_id - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Get the attached proton. @@ -1472,7 +1472,7 @@ # Unpack the data. spin, spin_id = data_id - # MMQ flags. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Get the attached proton. Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=21577&r1=21576&r2=21577&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Nov 21 14:28:42 2013 @@ -1113,6 +1113,11 @@ if not exists_mol_res_spin_data(): raise RelaxNoSequenceError + # Initalise. + + # 1H MMQ flag. + proton_mmq_flag = has_proton_mmq_cpmg() + # Loop over each experiment type. for exp_type, exp_type_index in loop_exp(return_indices=True): # Loop over each spin. @@ -1120,11 +1125,6 @@ # Skip protons for MMQ data. if spin.model in MODEL_LIST_MMQ and spin.isotope == '1H': continue - - # MMQ flags. - proton_sq_flag = has_proton_sq_cpmg() - proton_mq_flag = has_proton_mq_cpmg() - proton_mmq_flag = proton_sq_flag or proton_mq_flag # Get the attached proton. proton = None @@ -1310,6 +1310,9 @@ x_err_flag = False y_err_flag = False + # 1H MMQ flag. + proton_mmq_flag = has_proton_mmq_cpmg() + # Loop over the spectrometer frequencies. graph_index = 0 err = False @@ -1328,11 +1331,6 @@ # No data present. if not hasattr(spin, 'intensities'): continue - - # MMQ flags. - proton_sq_flag = has_proton_sq_cpmg() - proton_mq_flag = has_proton_mq_cpmg() - proton_mmq_flag = proton_sq_flag or proton_mq_flag # Get the attached proton. proton = None @@ -2135,10 +2133,8 @@ exp_num = num_exp_types() spin_num = len(spins) - # MMQ flags. - proton_sq_flag = has_proton_sq_cpmg() - proton_mq_flag = has_proton_mq_cpmg() - proton_mmq_flag = proton_sq_flag or proton_mq_flag + # 1H MMQ flag. + proton_mmq_flag = has_proton_mmq_cpmg() # Initialise the data structures for the target function. exp_types = [] @@ -2547,16 +2543,14 @@ format_head = "# %-18s %-20s %-20s %-20s %-20s %-20s\n" format = "%-20s %20s %20s %20s %20s %20s\n" + # 1H MMQ flag. + proton_mmq_flag = has_proton_mmq_cpmg() + # Loop over each spin. for spin, spin_id in spin_loop(return_id=True, skip_desel=True): # Skip protons for MMQ data. if spin.model in MODEL_LIST_MMQ and spin.isotope == '1H': continue - - # MMQ flags. - proton_sq_flag = has_proton_sq_cpmg() - proton_mq_flag = has_proton_mq_cpmg() - proton_mmq_flag = proton_sq_flag or proton_mq_flag # Get the attached proton. proton = None Modified: branches/relax_disp/specific_analyses/relax_disp/optimisation.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/optimisation.py?rev=21577&r1=21576&r2=21577&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/optimisation.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/optimisation.py Thu Nov 21 14:28:42 2013 @@ -478,7 +478,7 @@ # Store the back-calculated values. if memo.sim_index == None: - # MMQ flag. + # 1H MMQ flag. proton_mmq_flag = has_proton_mmq_cpmg() # Reconstruct the back_calc data structure.