Hi Michael, We could add an arg to limit the number of iterations, but I think there is a much better way. The problem of iterating forever is because of circling around the minimum (not the optimisation minimum but Occam's razor, as described in equation (14) of my 2007 paper http://www.nmr-relax.com/refs.html). Currently only the current to previous iterations are compared, but some people have encountered a 3 iteration cycle. Even larger looping might occur. Note that the repeated position in this cycle is identical to one of the previous. So we should really store all of the required info in the convergence() method of auto_analyses/dauvergne_protocol.py and check the current against all iterations. If one of these converged loops has not been reached after 20 iterations, then either the system is complex but will still soon converge, or something is seriously, very seriously wrong. The model should be deselected and the user told of its total failure. My experience is that after 20, convergence has been reached. But I think we should allow more before termination, as the termination is a sign that something is sick. If we catch the large iteration circling about Occam's razor and terminate, do you think we would need a maximum iteration termination point and subsequent global model elimination? Have you encountered such a non-cycling, infinite looping? Regards, Edward On 12 April 2010 03:02, <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri Date: Mon Apr 12 03:02:19 2010 New Revision: 11061 URL: http://svn.gna.org/viewcvs/relax?rev=11061&view=rev Log: The relaxGUI controller updates its progress bar using informations from the status singleton during model-free analysis. Currently, there is a maximum of iterations set for models 1 - 5. This also has to be set in the dauvergne_protocol.py script. Edward, what do you think about limiting to 20 iterations? Modified: branches/bieri_gui/gui_bieri/controller.py Modified: branches/bieri_gui/gui_bieri/controller.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=11061&r1=11060&r2=11061&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/controller.py (original) +++ branches/bieri_gui/gui_bieri/controller.py Mon Apr 12 03:02:19 2010 @@ -142,13 +142,50 @@ def __init__(self,aWxTextCtrl): self.out=aWxTextCtrl + self.status = Status() + def limit_entries(self): + """ Function to overcome feedback problem of wx.CallAfter() command""" + + # Maximum allowed number of lines in log window. + max_entries = 10000 + + # read number of lines in log window. + total_entries = self.out.log_panel.GetNumberOfLines() + + # Shift entries backwards if maximum of line exeeded. + if total_entries > max_entries: + # Reset log window entries + new_entries = 'Refreshing log window...\n\n' + self.out.log_panel.SetValue(new_entries) def write(self,string): - global progress # Limit panle entries to max_entries Lines. wx.CallAfter(self.limit_entries) + + # Update Gauge (Progress bar). + # Local tm model: + if self.status.dAuvergne_protocol.diff_model == 'local_tm': + # Current model. + no = self.status.dAuvergne_protocol.current_model[2:] + no = int(no) + + # Total selected models. + total_models = len(self.status.dAuvergne_protocol.local_mf_models) + + # update Progress bar. + wx.CallAfter(self.out.progress_bar.SetValue, (100*no/total_models)) + + # Sphere to Ellipsoid Models. + if self.status.dAuvergne_protocol.diff_model in ['sphere', 'prolate', 'oblate', 'ellipsoid']: + # Determine actual round (maximum is 20). + wx.CallAfter(self.out.progress_bar.SetValue, (100*(self.status.dAuvergne_protocol.round-1)/20)) + + # Final analysis. + if self.status.dAuvergne_protocol.diff_model == 'final': + mc_simulation = self.status.mc_number + # Add new output. wx.CallAfter(self.out.log_panel.AppendText, string) _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@xxxxxxx 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