Continuing the Optimization and Resetting Variables

To continue the optimization after you have used OPTIMIZE_VARIABLES, you can either use this command and enter <Number of iterations> again or CONTINUE_OPTIMIZATION <Number of iterations>.

If you use CONTINUE_OPTIMIZATION, then PARROT continues the optimization using the same Hessian matrix. If the optimization is going well but you run out of iterations, then continuing with the same Hessian matrix may be useful.

As before, use LIST_RESULT to inspect the fit between the calculated and the experimental values for your experiments. If necessary, adjust the weights of the experiments again in the ED_EXP module. You may even discover that you have to exclude additional experiments from the optimization.

Besides looking at the rightmost column in the list of experiments (that is produced when you use LIST_RESULT), it is also useful to look at the sum of squares of the errors of all the variables. This is shown in the output of OPTIMIZE_VARIABLES and CONTINUE_OPTIMIZATION. This sum should be as low as possible.

The following shows part of the output that you get when using LIST_RESULT:

Shows part of the output that you get when using LIST_RESULT

In the example you can see that the sum of squares have decreased slightly. (The final sum of squares that you get after an optimization run is also presented directly in the output from OPTIMIZE_VARIABLES and CONTINUE_OPTIMIZATION.) As long as the sum of squares figure is decreasing, the optimization is working as it should.

When your calculated results have been improving for a while, that is, when the sum of squares has been decreasing, and you are confident that you are making definitive progress, then you should use the PARROT command RESCALE_VARIABLES to reset the starting values of the optimizing variables to their current values. When you do this, the start values and scaling factors of the optimizing variables (shown in the table’s third column in the preceding screen shot), are all set to the current values (shown in the table’s second column).

If your optimization is not going well, then you may want to reset the values of your optimization variables to their current start values. To do this, use RECOVER_VARIABLES.

After rescaling the variables, continue the optimization using OPTIMIZE_VARIABLES again. Cycle through calls of the commands OPTIMIZE_VARIABLES/CONTINUE_OPTIMIZATION, CONTINUE_OPTIMIZATION, RESCALE_VARIABLES and OPTIMIZE_VARIABLES again until your set of optimizing variables does not seem to improve anymore. Even when it seems to you that you have reached this point, it is recommended that you use OPTIMIZE_VARIABLES/CONTINUE_OPTIMIZATION a few extra times to make sure that the variable values cannot be further improved, that is, that the sum of squares of the errors of all the variables cannot be reduced further. If the final solution is repeatedly calculated after the same number of iterations and reaching the same result, then it is generally reasonable to accept the current variable values.