Questions about the optimization algorithms


Click here for full thread
Clicked A Few Times
Running nwchem 6.3 under cygwin.
This one for example:

start job

geometry
 br                   -2.01831315    -1.06717437    -0.01794343
 c                     0.71397624     0.55508022    -0.59341280
 br                    0.08803644     2.16878720     0.17752161
 o                     1.37647154    -0.20589795     0.41849209
 c                     1.65795195    -1.53304007     0.22267872
 o                     0.72385107     0.24572267    -1.74878316
 n                     0.72978292    -2.33610677    -0.19045493
 n                     2.91146126    -1.84983774     0.56027243
 h                     3.23013072    -2.80471532     0.60332273
 h                     3.54052254    -1.11128779     0.83735862
 h                    -0.31722801    -1.95873964    -0.21958063
 h                     0.90121852    -3.31518504    -0.37579711
end

basis
  * library 6-311G**
end

dft
  xc m06-2x
  iterations 50
end

cosmo
  dielec 5.0
end

driver
  maxiter 100
  xyz strct
end

task dft optimize


This structure was previously optimized without cosmo, so should be reasonably close, and in fact the structure doesn't change much, but it still runs the full hundred cycles. In the beginning the energy goes up and down quite a bit. This is what I get when I grep @ on the output file:

@ Step       Energy      Delta E   Gmax     Grms     Xrms     Xmax   Walltime
@ ---- ---------------- -------- -------- -------- -------- -------- --------
@    0   -5486.92844911  0.0D+00  0.04732  0.01069  0.00000  0.00000    411.5
@    1   -5486.93364498 -5.2D-03  0.02906  0.00595  0.05979  0.12305   1045.3
@    2   -5486.93368188 -3.7D-05  0.02544  0.00475  0.03640  0.09253   1668.8
@    3   -5486.93434732 -6.7D-04  0.04166  0.01236  0.02909  0.07943   2289.2
@    4   -5486.93368467  6.6D-04  0.04744  0.00798  0.01177  0.03221   2921.0
@    5   -5486.93467643 -9.9D-04  0.02472  0.00449  0.02113  0.06103   3539.8
@    6   -5486.93624359 -1.6D-03  0.01271  0.00396  0.03632  0.08935   4180.0
@    7   -5486.93657487 -3.3D-04  0.11603  0.03303  0.01920  0.06463   4541.5
@    8   -5486.93379065  2.8D-03  0.70394  0.19879  0.01255  0.03109   5183.2
@    9   -5486.93455726 -7.7D-04  0.01638  0.00413  0.01270  0.03103   5805.9
@   10   -5486.93570085 -1.1D-03  0.05280  0.01443  0.02311  0.06400   6427.3
@   11   -5486.93598450 -2.8D-04  0.04597  0.01326  0.02310  0.09230   7055.0
@   12   -5486.93578777  2.0D-04  0.04515  0.01310  0.00763  0.02746   7684.0
@   13   -5486.93548810  3.0D-04  0.02457  0.00689  0.05379  0.12562   8314.8
@   14   -5486.93560663 -1.2D-04  0.02770  0.00767  0.01226  0.03133   8981.6
@   15   -5486.93568460 -7.8D-05  0.02627  0.00741  0.02219  0.07755   9685.9
@   16   -5486.93617064 -4.9D-04  0.02437  0.00673  0.02603  0.06769  10392.9
@   17   -5486.93600419  1.7D-04  0.02412  0.00668  0.00633  0.01714  11097.2
@   18   -5486.93601866 -1.4D-05  0.01744  0.00492  0.02232  0.05411  11800.3
@   19   -5486.93578052  2.4D-04  0.01745  0.00491  0.00094  0.00246  12504.4
@   20   -5486.93578027  2.5D-07  0.01402  0.00439  0.03126  0.09973  13213.6
@   21   -5486.93605543 -2.8D-04  0.01526  0.00435  0.03148  0.10687  13921.2
@   22   -5486.93618896 -1.3D-04  0.01239  0.00347  0.01211  0.03196  14617.5
@   23   -5486.93580136  3.9D-04  0.01179  0.00348  0.01720  0.04661  15324.5
@   24   -5486.93623315 -4.3D-04  0.01119  0.00313  0.01094  0.02871  16029.8
@   25   -5486.93622859  4.6D-06  0.00989  0.00276  0.00224  0.00684  16734.6
@   26   -5486.93622956 -9.7D-07  0.00976  0.00272  0.00018  0.00058  17436.7
@   27   -5486.93623161 -2.1D-06  0.00951  0.00265  0.00032  0.00117  18140.0
@   28   -5486.93599046  2.4D-04  0.00924  0.00256  0.00036  0.00127  18841.9
@   29   -5486.93599069 -2.4D-07  0.00920  0.00255  0.00005  0.00016  19543.9
@   30   -5486.93599146 -7.6D-07  0.00909  0.00252  0.00015  0.00052  20248.4
@   31   -5486.93599316 -1.7D-06  0.00887  0.00246  0.00032  0.00104  20949.1
@   32   -5486.93599555 -2.4D-06  0.00857  0.00238  0.00045  0.00133  21651.7
@   33   -5486.93599795 -2.4D-06  0.00828  0.00230  0.00046  0.00127  22352.8
@   34   -5486.93563874  3.6D-04  0.00776  0.00218  0.00047  0.00119  23069.9
@   35   -5486.93564017 -1.4D-06  0.00561  0.00155  0.00431  0.01179  23771.0
@   36   -5486.93565670 -1.7D-05  0.00365  0.00105  0.00712  0.02326  24463.8
@   37   -5486.93642046 -7.6D-04  0.00262  0.00079  0.00752  0.03183  25152.7
@   38   -5486.93642150 -1.0D-06  0.00264  0.00079  0.00021  0.00077  25841.1
@   39   -5486.93642384 -2.3D-06  0.00268  0.00079  0.00048  0.00148  26530.9
@   40   -5486.93642592 -2.1D-06  0.00271  0.00080  0.00046  0.00152  27205.6
@   41   -5486.93642779 -1.9D-06  0.00274  0.00080  0.00043  0.00135  27883.3
@   42   -5486.93642940 -1.6D-06  0.00276  0.00081  0.00038  0.00120  28556.1
@   43   -5486.93626565  1.6D-04  0.00327  0.00091  0.00036  0.00111  29231.4
@   44   -5486.93626579 -1.3D-07  0.00327  0.00091  0.00005  0.00012  29902.1
@   45   -5486.93626619 -4.0D-07  0.00327  0.00091  0.00014  0.00038  30576.3
@   46   -5486.93626656 -3.7D-07  0.00327  0.00090  0.00013  0.00035  31249.5
@   47   -5486.93626697 -4.0D-07  0.00326  0.00090  0.00015  0.00040  31924.6
@   48   -5486.93626746 -4.9D-07  0.00326  0.00090  0.00019  0.00044  32599.7
@   49   -5486.93626805 -5.9D-07  0.00327  0.00090  0.00024  0.00060  33274.3
@   50   -5486.93626869 -6.4D-07  0.00327  0.00090  0.00026  0.00065  33949.0
@   51   -5486.93626928 -5.8D-07  0.00328  0.00091  0.00026  0.00062  34610.3
@   52   -5486.93626987 -5.9D-07  0.00328  0.00091  0.00027  0.00062  35273.7
@   53   -5486.93602925  2.4D-04  0.00320  0.00089  0.00027  0.00064  35935.8
@   54   -5486.93603238 -3.1D-06  0.00322  0.00090  0.00146  0.00468  36319.2
@   55   -5486.93628712 -2.5D-04  0.00336  0.00095  0.00421  0.01213  36982.1
@   56   -5486.93628782 -7.0D-07  0.00336  0.00095  0.00035  0.00158  37644.9
@   57   -5486.93628806 -2.3D-07  0.00336  0.00095  0.00011  0.00034  38306.4
@   58   -5486.93628827 -2.1D-07  0.00336  0.00095  0.00010  0.00032  38968.4
@   59   -5486.93628847 -2.0D-07  0.00336  0.00095  0.00010  0.00031  39630.3
@   60   -5486.93628865 -1.9D-07  0.00336  0.00095  0.00009  0.00029  40294.1
@   61   -5486.93628882 -1.7D-07  0.00336  0.00095  0.00009  0.00028  40955.2
@   62   -5486.93628898 -1.6D-07  0.00336  0.00095  0.00008  0.00026  41616.2
@   63   -5486.93628913 -1.5D-07  0.00336  0.00095  0.00008  0.00025  42273.2
@   64   -5486.93627617  1.3D-05  0.00336  0.00095  0.00008  0.00024  42921.0
@   65   -5486.93627621 -4.1D-08  0.00336  0.00095  0.00002  0.00006  43561.8
@   66   -5486.93627699 -7.7D-07  0.00336  0.00097  0.00007  0.00020  44196.5
@   67   -5486.93627704 -5.0D-08  0.00336  0.00097  0.00004  0.00010  44832.4
@   68   -5486.93627710 -6.2D-08  0.00336  0.00097  0.00005  0.00012  45470.2
@   69   -5486.93627716 -6.5D-08  0.00336  0.00096  0.00005  0.00011  46108.3
@   70   -5486.93627722 -5.4D-08  0.00336  0.00096  0.00004  0.00011  46752.8
@   71   -5486.93627727 -5.2D-08  0.00336  0.00096  0.00004  0.00010  47393.7
@   72   -5486.93627732 -4.6D-08  0.00335  0.00096  0.00004  0.00009  48031.5
@   73   -5486.93627736 -4.5D-08  0.00335  0.00096  0.00004  0.00009  48666.4
@   74   -5486.93627740 -4.1D-08  0.00335  0.00096  0.00003  0.00008  49302.4
@   75   -5486.93627745 -4.3D-08  0.00335  0.00096  0.00003  0.00008  49937.2
@   76   -5486.93627748 -3.4D-08  0.00335  0.00096  0.00003  0.00008  50572.7
@   77   -5486.93627751 -3.3D-08  0.00335  0.00096  0.00003  0.00007  51209.5
@   78   -5486.93627755 -3.5D-08  0.00335  0.00096  0.00003  0.00007  51844.7
@   79   -5486.93627757 -2.5D-08  0.00335  0.00096  0.00003  0.00007  52478.4
@   80   -5486.93627760 -3.3D-08  0.00335  0.00096  0.00003  0.00006  53113.7
@   81   -5486.93627763 -2.8D-08  0.00335  0.00096  0.00002  0.00006  53749.8
@   82   -5486.93627766 -2.4D-08  0.00335  0.00096  0.00002  0.00006  54387.1
@   83   -5486.93627768 -2.8D-08  0.00335  0.00096  0.00002  0.00006  55024.2
@   84   -5486.93627771 -2.7D-08  0.00335  0.00096  0.00002  0.00005  55661.4
@   85   -5486.93627773 -1.7D-08  0.00335  0.00096  0.00002  0.00005  56296.9
@   86   -5486.93627775 -2.7D-08  0.00335  0.00096  0.00002  0.00005  56931.9
@   87   -5486.93627777 -1.8D-08  0.00335  0.00096  0.00002  0.00005  57562.9
@   88   -5486.93627779 -1.8D-08  0.00335  0.00096  0.00002  0.00005  58189.6
@   89   -5486.93627781 -2.3D-08  0.00335  0.00095  0.00002  0.00005  58816.0
@   90   -5486.93627783 -1.9D-08  0.00335  0.00095  0.00002  0.00004  59441.3
@   91   -5486.93627785 -1.6D-08  0.00334  0.00095  0.00002  0.00004  60066.2
@   92   -5486.93627787 -1.9D-08  0.00334  0.00095  0.00002  0.00004  60693.9
@   93   -5486.93627788 -1.6D-08  0.00334  0.00095  0.00002  0.00004  61321.4
@   94   -5486.93627790 -1.7D-08  0.00334  0.00095  0.00002  0.00004  61947.6
@   95   -5486.93627792 -1.9D-08  0.00334  0.00095  0.00001  0.00004  62572.8
@   96   -5486.93627793 -1.2D-08  0.00334  0.00095  0.00001  0.00004  63199.3
@   97   -5486.93627795 -1.6D-08  0.00334  0.00095  0.00001  0.00004  63823.8
@   98   -5486.93627796 -1.1D-08  0.00334  0.00095  0.00001  0.00003  64451.5
@   99   -5486.93627797 -1.6D-08  0.00334  0.00095  0.00001  0.00003  65078.2
@  100   -5486.93627799 -1.5D-08  0.00334  0.00095  0.00001  0.00003  65705.2
@  100   -5486.93627799 -1.5D-08  0.00334  0.00095  0.00001  0.00003  65705.2


I've seen similar behaviour in other jobs, where the displacement becomes very small while the gradient remains above the threshold, and after some time the displacement increases again. In the case of this job, I've restarted it, and in continues in pretty much the same way.