Author: bugman Date: Thu Apr 10 17:43:47 2014 New Revision: 22687 URL: http://svn.gna.org/viewcvs/relax?rev=22687&view=rev Log: Shifted the frame order specific API deselect() method into the Api_common base class. The method has been renamed to _deselect_global() and extended to handle Monte Carlo simulations. Modified: trunk/specific_analyses/api_common.py trunk/specific_analyses/frame_order/api.py Modified: trunk/specific_analyses/api_common.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/api_common.py?rev=22687&r1=22686&r2=22687&view=diff ============================================================================== --- trunk/specific_analyses/api_common.py (original) +++ trunk/specific_analyses/api_common.py Thu Apr 10 17:43:47 2014 @@ -120,6 +120,24 @@ setattr(data_cont, name, value) + def _deselect_global(self, model_info, sim_index=None): + """Common method for deselecting a global model. + + @param model_info: The model index from model_loop(). This is ignored. + @type model_info: int + @keyword sim_index: The optional Monte Carlo simulation index. If None, then models will be deselected, otherwise the given simulation will. + @type sim_index: None or int + """ + + # The simulation structure. + if sim_index != None: + cdp.select_sim[sim_index] = False + + # The model. + else: + cdp.select = False + + def _eliminate_false(self, name, value, model_info, args, sim=None): """Dummy method for model elimination. Modified: trunk/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/api.py?rev=22687&r1=22686&r2=22687&view=diff ============================================================================== --- trunk/specific_analyses/frame_order/api.py (original) +++ trunk/specific_analyses/frame_order/api.py Thu Apr 10 17:43:47 2014 @@ -56,6 +56,7 @@ """Initialise the class by placing API_common methods into the API.""" # Place methods into the API. + self.deselect = self._deselect_global self.overfit_deselect = self._overfit_deselect_dummy self.return_conversion_factor = self._return_no_conversion_factor self.set_param_values = self._set_param_values_global @@ -186,19 +187,6 @@ # Return the data. return mc_data - - - def deselect(self, model_info, sim_index=None): - """Deselect models or simulations. - - @param model_info: The model index from model_loop(). This is zero for the global models or equal to the global spin index (which covers the molecule, residue, and spin indices). - @type model_info: int - @keyword sim_index: The optional Monte Carlo simulation index. If None, then models will be deselected, otherwise the given simulation will. - @type sim_index: None or int - """ - - # Set the deselection flag. - cdp.select = False def duplicate_data(self, pipe_from=None, pipe_to=None, model_info=None, global_stats=False, verbose=True):