CCL:G: Maximum number of cycles in Gaussian



 Sent to CCL by: Hugo Alejandro Jimenez Vazquez [hjimenez[*]woodward.encb.ipn.mx]
 Hi,
 
In addition to Cory's comments there are a couple of things to think about when you run out of optimization cycles.
 
For a "typical" molecule of 30 or so atoms, the number of optimization cycles that Gaussian assigns, should be more than enough to reach a minimum. If it doesn't then you should consider one of several possible scenarios:
 
1. Your starting geometry is way off the minimum. If this is indeed the case, you could take the final geometry of the failed optimization and submit it to a new optimization.
 
2. Your optimization is oscillating. In this case it is likely that the optimization will not reach a minimum. Why the optimizer oscillates in some cases but not in others I don't know. You can detect it by using something like Molden, which allows you to follow the optimization step by step. It also allows you to plot energy vs. step. (If you don't have Molden you can "grep" the energy of each optimization step in the output file and analyze the corresponding values.) If the optimization is oscillating you will see that the energy goes up and down in the plot, never falling to a minimum. If this happens, there are a number of things you can try to get to the minimum:
 - Calculate the force constans at the beginning of the optimization.
 - Carry out the optimization in internal coordinates.
 - Carry out the optimization in cartesian coordinates.
 - Use a different optimization algorithm.
 
- Some DFT methods (M06-2X combined with diffuse functions, for example) also tend to cause the optimizer to oscillate and then you have to use additional options such as INT(GRID=ULTRAFINE,ACC2E=11) and SCF(TIGHT,NOVARACC,NOINCFOCK). Or just choose another functional. I did...
 Regards,
 ---
 Hugo A. Jimenez Vazquez
 hjimenez#%#woodward.encb.ipn.mx
 Departamento de Quimica Organica
 ENCB-IPN
 Mexico
 On Mon, 23 May 2022, Andrew DeYoung andrewdaviddeyoung . gmail.com wrote:
 
 Hi,
 I'm running Gaussian 16.  Could someone please help me understand how
 "number of steps" and MaxCycles work in Gaussian?  I have a molecule
 whose
 geometry I want to optimize to a local minimum, at the B3LYP/6-31G(d,p)
 level.  I tried this method section in my input:
 # Opt(MaxCycles=300) B3LYP/6-31G(d,p)
 In the documentation for the Opt keyword (
 https://gaussian.com/opt/?tabid=1#Opt_keyword__MaxCycles_option
 ), it says
 that "MaxCycles=N sets the maximum number of optimization steps to N. The
 default is the maximum of 20 and twice the number of redundant internal
 coordinates in use (for the default procedure) or twice the number of
 variables to be optimized (for other procedures)."
 I'm not sure what it means by "redundant internal coordinates."  I did
 not
 explicitly specify redundant coordinates (as I think one might do for a
 Scan calculation).  My Z-matrix has 31 lines (31 atoms).  On the other
 hand, my variables section contains 87 lines: 30 bonds (B1-B30), 29 bond
 angles (A1-A29), and 28 dihedral angles (D1-D28).
 When I run my optimization, Gaussian terminates after a few hours with a
 Link 9999 error; the end of the log file reads, "Error termination request
 processed by link 9999."  I think this usually means the optimization has
 failed to converge, and if I scroll up a bit in the log file, I see that is
 the case.  In the final "GradGrad..." section, it reads:
 Optimization stopped.
    -- Number of steps exceeded,  NStep= 186
    -- Flag reset to prevent archiving.
 Why specifically did optimization stop after 186 steps -- what am I missing
 here?  Are "number of steps" and MaxCycles the same?  If so, why
 didn't
 optimization continue until NStep=300 was reached or until the calculation
 converged?  If not, how are they different?
 I was able to reach convergence by running a new optimization -- with the
 last geometry of the previous run as the starting configuration -- but in
 the future, how can I increase the maximum number of allowed steps?
 (By the way, if I remember correctly, the default number of cycles is 128
 if MaxCycles is not specified.  Also, I believe the notation used in older
 versions of Gaussian was, for example, 'OptCyc=300' but I believe it's now
 'Opt(MaxCyc=300)' for Gaussian 16.  See, for example,
 https://gaussian.com/obsolete/  I think that 'MaxCyc' is
 just an allowed
 abbreviation of 'MaxCycles'.)
 Thank you very much for your time!
 Best,
 Andrew
 Andrew DeYoung, PhD
 Department of Chemistry
 Carnegie Mellon University