Hi Edward, I gave the new script a try, setting CONV_LOOP = 1, but it reported an error after optimizing the first round:
""" Convergence: [ No ] relax> run.create(run='previous', run_type='mf') RelaxError: The run 'previous' already exists. """ If you have any suggestions for changes to the script, send them my way and I'll give it a try. Doug On Jun 24, 2007, at 11:47 AM, Edward d'Auvergne wrote: > Hi, > > The simplest way to do this would be to use a while loop using a > modified version of the convergence() function which returns 1 or 0 > depending on whether the results have converged (exactly like your > suggestion). I have added this looping ability to the > full_analysis.py script in the relax repository (to both the 1.2 and > 1.3 lines). This is not activated by default though and the scripts > in the repository are significantly different from that in the relax > 1.2.10 version (all the variables which should be modified by the user > have been shifted to the top of the script). Would you be able to > test if this automatic looping over all rounds of optimisation until > convergence actually works? There could possibly be bugs lurking > there. Thanks. > > The problem that you encountered with the calling of the __init__() > function is because this function should not be called. Using that > type of approach, the looping should have been outside of the Main > class to work. > > Cheers, > > Edward > > > On 6/16/07, Douglas Kojetin <[EMAIL PROTECTED]> wrote: >> Hi All, >> >> Is it possible to edit full_analysis.py so the optimization of MII to >> MV (self.round > 0) is done automatically by looping until >> convergence? > > Do you mean that the script will automatically > > >> I tried to do this by modifying the following in >> convergence() [near the end]: >> >> """ >> # Final print out. >> ################## >> >> print "\nConvergence:" >> if chi2_converged and models_converged and params_converged: >> print " [ Yes ]" >> return 1 >> else: >> print " [ No ]" >> return 0 >> """ >> >> then modifying __init__(), at the end of the "elif DIFF_MODEL == >> 'sphere' or DIFF_MODEL == 'prolate' or DIFF_MODEL == 'oblate' or >> DIFF_MODEL == 'ellipsoid':" statement: >> >> """ >> # Test for convergence. >> test=self.convergence(run=name) >> >> if test == 0: >> __init__(self.relax) >> #Main(self.relax) >> """ >> >> but it did not work properly. I think the problem has something to >> do with the call to __init__() or Main(). I'll see if I can dig up >> the error reported by relax. >> >> Thanks, >> Doug >> >> _______________________________________________ >> relax (http://nmr-relax.com) >> >> This is the relax-users mailing list >> relax-users@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-users >> _______________________________________________ relax (http://nmr-relax.com) This is the relax-users mailing list relax-users@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-users