There are a variety of methods available for controlling the search for a stationary point on a potential energy surface. Each may be requested through appropriate keyword specification on the RUNTYPE directive, and in the following section we detail subsequent data requirements of each method. In most cases adequate control of the optimisation pathways is provided through a set of `built-in' parameters, and the user need only consider overriding these defaults in troublesome cases, through use of the directives described below. An introduction to the various methods and their usage has already been presented in Part 2, and should be used in conjunction with the notes below.
Three methods are available to search for a minimum on a potential Surface,
RUNTYPE OPTIMIZE
This method performs optimisation in internal coordinates,
and thus requires initial ZMATRIX and VARIABLES specification of the
molecular geometry, or ZMATRIX construction from a set
of cartesian coordinates supplied under control of the
GEOMETRY directive.
RUNTYPE OPTIMIZE JORGENSEN
RUNTYPE OPTXYZ
Will cause a check to be carried out as to whether the number of bonds within the molecule changes (defined as the distance between two bonded atoms changing by more than 15% over the course of the optimisation). If the number of bonds changes, then the optimisation will abort. This can often be useful to halt a geometry optimisation when a molecule appears to be dissociating.
Four directives are provided to control the OPTIMIZE search procedure, MINMAX, XTOL, STEPMAX and VALUE. The user should note that the present implementation is based on maintaining a history of the optimisation pathway, that will be worked through on each restart of the optimisation. This appears on the output as a sequence of both `old' and `new' calculations, with the history printed on each restart. This printing may be suppressed through use of the NOPRINT directive, with specification of the HISTORY keyword.
This directive may be used to control the number of energy evaluations and line-searches permitted in optimising a given structure, and consists of a single data line read to the variables TEXT, IVAL, LINE using format (A,2I).
MINMAX 60 60
Example
In some cases the user may wish to perform just the
initial point on the optimisation pathway to gauge the quality
of the starting geometry though the magnitude of the gradient at
that point. This may be achieved though use of MINMAX, as shown
below:
Start-up Job
TITLE\H2O DZ OPTIMIZATION STARTUP
ZMAT ANGSTROM\O\H 1 ROH\H 1 ROH 2 THETA
VARIABLES\ROH 0.956 HESSIAN 0.7\THETA 104.5 HESSIAN 0.2 \END
BASIS DZ
RUNTYPE OPTIMIZE\MINMAX 1 1
ENTER
Here we are using the MINMAX directive to terminate the
optimisation after the first point. This may then be restarted
as shown below, where the default MINMAX settings will apply.
Restart Job
RESTART OPTIMIZE
TITLE\H2O DZ OPTIMIZE
ZMAT ANGSTROM\O\H 1 ROH\H 1 ROH 2 THETA
VARIABLES\ROH 0.956 HESSIAN 0.7\THETA 104.5 HESSIAN 0.2 \END
BASIS DZ
RUNTYPE OPTIMIZ\ENTER
This directive may be used to define the convergence thresholds for the optimisation, and consists of a single data line read to the variables TEXT, TOL using format (A,F):
maximum change in variables < TOL
average change in variables < TOL * 2/3
maximum gradient < TOL * 1/4
average gradient < TOL * 1/6
XTOL 0.003
This directive may be used to define the the maximum allowed movement in any of the variables in a single step of the geometry optimisation. Note that the internal units of the variables are bohr for bond lengths and radians for angles. The directive consists of a single data line read to the variables TEXT, STEP using format (A,F):
STEPMAX 0.2
There is certainly at least one circumstance where changes to
the default setting will prove crucial in achieving controlled
convergence. If the starting geometry is known to be poor, or
if ZMATRIX specification is such that a specific bond is not
explicitly defined (as can happen for example with aromatic
compounds), then the first step taken on the optimisation
can cause the energy to go up and, at best, several extra points
will be required to recover from this effect. This effect
is fairly common if in addition the starting hessian is also poorly
defined. When this happens, the user should consider starting
the optimisation again, presenting a STEPMAX directive of the
form:
STEPMAX 0.1
An additional side effect of excessive steps in the optimisation
is a possible change of state in the SCF calculation, particularly
in closed-shell wavefunctions. If this happens, the subsequent
optimisation will almost certainly prove meaningless.
Presenting the LOCK directive in the closed-shell case may
act to minimise this occurrence.
This directive may be used to control the accuracy of the search for a turning point during a line search, and consists of a single data line read to the variables TEXT, TURN using format (A,F);
VALUE 0.6
In some cases the user may wish to modify the parameters controlling geometry optimisation, though XTOL, VALUE and STEPMAX specification, during the course of the optimisation. Note that these parameters may only be modified between line searches, and not between individual energy or gradient evaluations. The most straightforward example would be initialising the optimisation with stringent controls, then relaxing these controls as the optimisation proceeds in some subsequent restart job. The startup job may either be interrupted under control of the MINMAX directive, or through time specification on the TIME pre-directive (see Parts 12-16 of the manual).
Consider the example of Part 3 section 8.4 on the optimisation of HCN. The following data file requests termination after two line searches through the MINMAX specification, during which conservative settings of the optimisation parameters will apply:
TITLE
HCN DUNNING DZ + BOND(S,P)
ZMAT ANGSTROM
C
BQ 1 RCN2
X 2 1.0 1 90.0
N 2 RCN2 3 90.0 1 180.0
X 1 1.0 2 90.0 3 0.0
H 1 RCH 5 90.0 4 180.0
VARIABLES
RCN2 0.580
RCH 1.056
END
BASIS
DZ H
S BQ
1.0 1.0
P BQ
1.0 0.7
DZ C
DZ N
END
RUNTYPE OPTIMIZE
MINMAX 60 2
XTOL 0.005
STEPMAX 0.1
VALUE 0.3
ENTER
In the restart job shown below, the modified parameter settings will
apply from the third line search onwards.
RESTART OPTIMIZE
TITLE
HCN DUNNING DZ + BOND(S,P)
ZMAT ANGSTROM
C
BQ 1 RCN2
X 2 1.0 1 90.0
N 2 RCN2 3 90.0 1 180.0
X 1 1.0 2 90.0 3 0.0
H 1 RCH 5 90.0 4 180.0
VARIABLES
RCN2 0.580
RCH 1.056
END
BASIS
DZ H
S BQ
1.0 1.0
P BQ
1.0 0.7
DZ C
DZ N
END
RUNTYPE OPTIMIZE
XTOL 0.0005
STEPMAX 0.2
VALUE 0.6
ENTER
A somewhat more complex situation may arise when the user wishes to modify optimisation processing already performed in the startup job, either because
MINMAX REVISE 4
In the example below we consider the SCF geometry optimisation of
C4F4. In fact this optimisation proceeds smoothly,
converging to the default accuracy (XTOL = 0.003) on the
seventh line search using the data shown below.
TITLE
**** C4F4 3/21G ****
ZMAT ANGS
X
C 1 R1
C 1 R2 2 90.
C 1 R1 3 90. 2 180.
C 1 R2 4 90. 3 180.
X 2 1. 1 90. 3 0.
F 2 R3 6 90. 3 180.
X 4 1. 1 90. 3 0.
F 4 R3 8 90. 3 180.
X 3 1. 1 90. 4 0.
F 3 R3 10 90. 4 180.
X 5 1. 1 90. 4 0.
F 5 R3 12 90. 4 180.
VARIABLES
R1 1.2
R2 1.3
R3 1.313
END
RUNTYPE OPTIMIZE
LEVEL 2.0 40 1.0
ENTER
Now let us assume we wish to tighten the convergence threshold,
using an XTOL setting of 0.001. Merely presenting a revised XTOL
specification in a restart job will not have the desired effect, for
the job will merely work through the optimisation pathway, reaching
convergence before the revised XTOL setting will come into effect.
The user must inform the optimisation that the previous actions
on the seventh line search are to be ignored, and repeated with
the revised XTOL setting, by presenting the following data file:
RESTART OPTIMIZE
TITLE
**** C4F4 3/21G ****
ZMAT ANGS
X
C 1 R1
C 1 R2 2 90.
C 1 R1 3 90. 2 180.
C 1 R2 4 90. 3 180.
X 2 1. 1 90. 3 0.
F 2 R3 6 90. 3 180.
X 4 1. 1 90. 3 0.
F 4 R3 8 90. 3 180.
X 3 1. 1 90. 4 0.
F 3 R3 10 90. 4 180.
X 5 1. 1 90. 4 0.
F 5 R3 12 90. 4 180.
VARIABLES
R1 1.2
R2 1.3
R3 1.313
END
RUNTYPE OPTIMIZE
LEVEL 1.0
MINMAX REVISE 7
XTOL 0.001
ENTER
Three directives are provided to control the OPTXYZ search procedure, MINMAX, XTOL and STEPMAX. Note that directive specifications are similar, but not identical to, the descriptions above. Note also that algorithm employed only guarantees convergence to a stationary point, not necessarily to a minimum.
This directive may be used to control the number of energy evaluations and searches permitted in optimising a given structure, and consists of a single data line read to the variables TEXT, NPTS, NSERCH using format (A,2I):
MINMAX 60 60
Example
In some cases the user may wish to perform just the
initial point on the optimisation pathway to gauge the quality
of the starting geometry though the magnitude of the gradient at
that point. This may be achieved though use of MINMAX, as shown
below:
Start-up Job
TITLE\H2O DZ OPTIMIZATION STARTUP
ZMAT ANGSTROM\O\H 1 ROH\H 1 ROH 2 THETA
VARIABLES\ROH 0.956 HESSIAN 0.7\THETA 104.5 HESSIAN 0.2 \END
BASIS DZ
RUNTYPE OPTXYZ\MINMAX 1 1
ENTER
Here we are using the MINMAX directive to terminate the
optimisation after the first point. This may then be restarted
as shown below, where the default MINMAX settings will apply.
Restart Job
RESTART OPTXYZ
TITLE\H2O DZ OPTIMIZE
ZMAT ANGSTROM\O\H 1 ROH\H 1 ROH 2 THETA
VARIABLES\ROH 0.956 HESSIAN 0.7\THETA 104.5 HESSIAN 0.2 \END
BASIS DZ
RUNTYPE OPTXYZ
ENTER
This directive may be used to define the convergence threshold for the optimisation, and consists of a single data line read to the variables TEXT, TOL using format (A,F):
XTOL 0.001
This directive may be used to define the the maximum allowed movement in any of the cartesian coordinates in a single step of the geometry optimisation (in units of bohr). The directive consists of a single data line read to the variables TEXT, STEP using format (A,F):
STEPMAX 0.2
An extended discussion of the data requirements for use when invoking the Simons and Jorgensen algorithm is given in section 10. For completeness we include here the data file required in optimising the geometry of H2CO, noting that in most cases the default settings will prove satisfactory.
TITLE
H2CO - DZ BASIS - JORGENSEN OPTIMISATION
ZMATRIX ANGSTROM
C
O 1 CO
H 1 CH 2 HCO
H 1 CH 2 HCO 3 180.0
VARIABLES
CO 1.203
CH 1.099
HCO 121.8
END
BASIS DZ
RUNTYPE OPTIMIZE JORGENSEN
ENTER
Three methods are available to search for a transition state on a potential Surface, each driven through SADDLE specification on the RUNTYPE directive and each relying on internal coordinate specification through the ZMATRIX directive.
RUNTYPE SADDLE
This method performs optimisation in internal coordinates,
and thus requires initial ZMATRIX and VARIABLES specification of the
molecular geometry, or ZMATRIX construction from an initial set
of cartesian coordinates supplied under control of the
GEOMETRY directive. Note that the success of the method
is dependent on the quality of the initial Hessian, and
the user is reminded of the need to address this issue through
appropriate TYPE specifications on the VARIABLE definition lines
of the ZMATRIX (see Part 3 section 8).
RUNTYPE SADDLE JORGENSEN
The method is again reliant on a quality initial hessian
for success.
Four directives are provided to control the trust-region search procedure, MINMAX, XTOL, STEPMAX and VALUE, with specifications very similar to the corresponding directives described above for OPTIMIZE usage. The user should note that the implementation is also based on maintaining a history of the optimisation pathway, that will be worked through on each restart of the optimisation. This appears on the output as a sequence of both `old' and `new' calculations, with the history printed on each restart. This printing may be suppressed through use of the NOPRINT directive, with specification of the HISTORY keyword.
This directive may be used to control the number of energy evaluations and line-searches permitted in the location of the transition state, and consists of a single data line read to the variables TEXT, IVAL, LINE using format (A,2I).
MINMAX 60 60
Example
In some cases the user may wish to perform just the
initial point on the optimisation pathway to gauge the quality
of the starting geometry though the magnitude of the gradient at
that point. This may be achieved though use of MINMAX, as shown
below:
Start-up Job
TITLE\HCCH/CCH2 . RHF3-21G . START-UP JOB.
ZMAT ANGS\C\ C 1 L1\ H 2 L2 1 A1
X 2 1.0 1 90.0 3 180.0\ H 2 L3 4 A2 1 180.0
VARIABLES
L1 1.24054 TYPE 3
L2 1.65694 TYPE 3
L3 1.06318 TYPE 3
A1 60.3568 TYPE 3
A2 60.3568 TYPE 3
END
RUNTYPE SADDLE
XTOL 0.002\MINMAX 60 1
ENTER
Here we are using the MINMAX directive to terminate the
optimisation after the first line search. Note that using the
number of energy evaluations as the criterion may not
be productive, for this will cause termination at the first
point in the evaluation of the 2nd-derivative matrix requested through
the TYPE 3 specifications. This may then be restarted
as shown below, where the default MINMAX settings will apply.
Restart Job
RESTART SADDLE
TITLE\HCCH/CCH2 . RHF3-21G . START-UP JOB.
ZMAT ANGS\C\ C 1 L1\ H 2 L2 1 A1
X 2 1.0 1 90.0 3 180.0\ H 2 L3 4 A2 1 180.0
VARIABLES
L1 1.24054 TYPE 3
L2 1.65694 TYPE 3
L3 1.06318 TYPE 3
A1 60.3568 TYPE 3
A2 60.3568 TYPE 3
END
RUNTYPE SADDLE
XTOL 0.002
ENTER
This directive may be used to define the convergence thresholds for the optimisation, and consists of a single data line read to the variables TEXT, TOL using format (A,F):
maximum change in variables < TOL
average change in variables < TOL * 2/3
maximum gradient < TOL * 1/4
average gradient < TOL * 1/6
XTOL 0.001
This directive may be used to define the the maximum allowed movement in any of the variables in a single step of the transition state location. Note that the internal units of the variables are bohr for bond lengths and radians for angles. The directive consists of a single data line read to the variables TEXT, STEP using format (A,F);
STEPMAX 0.2
There is certainly at least one circumstance where changes to
the default setting may prove crucial in achieving controlled
convergence. If the starting geometry is known to be poor, or
if ZMATRIX specification is such that a specific bond is not
explicitly defined (as can happen for example with aromatic
compounds), then the first step taken on the optimisation
may prove both excessive and counter-productive; at best several
extra points
will be required to recover from this effect, at worst
a change of state may be induced in the SCF wavefunction. This effect
is fairly common if in addition the starting hessian is also poorly
defined. When this happens, the user should consider starting
the optimisation again, presenting a STEPMAX directive of the
form:
STEPMAX 0.1
This directive may be used to control the accuracy of the search for a turning point during a line search, and consists of a single data line read to the variables TEXT, TURN using format (A,F);
VALUE 0.3
The present implementation of the synchronous-transit method is driven under specification of the LSEARCH directive. Successful results from the method rely on the specification of not only a reasonable guess for the initial geometry, but on presenting the equilibrium geometries as data for the two minima involved on the potential surface. These minima are specified on the variable definition lines of the ZMATRIX, and require that the form of the ZMATRIX has been constructed in such a way as to yield VARIABLES that transform smoothly from one minima, though the transition state and onto the second minima. This is shown below for the transition state involved in the HCN to HNC isomerisation process.
TITLE
HCN SADDLE POINT - SYNCHRONOUS TRANSIT
ZMAT ANGS
C
X 1 1.0
N 1 CN 2 90.0
H 1 CH 2 90.0 3 HCN
VARIABLES
CN 1.1484 MINIMA 1.1371 1.1597
CH 1.5960 MINIMA 1.0502 2.1429
HCN 90.0 MINIMA 180.0 0.0
END
BASIS SV 4-31G
RUNTYPE SADDLE
LSEARCH 0 4
ENTER
The LSEARCH directive may be used to request and characterise the synchronous-transit method, overriding the default trust-region, and consists of a single data line read to the variables TEXT, LINE, IPOL using format (A,2I)
LSEARCH 0 4
which must be presented after the RUNTYPE directive.
Note that the default trust region method corresponds to the
specification
LSEARCH 0 5
The LSEARCH directive may also be used to influence OPTIMISE and OPTXYZ runs. For an OPTIMISE run, a LSEARCH 1 specification requests (as above) that function and gradient evaluations are used during a line search. For an OPTXYZ run, which usually tries to do a line search until the energy goes down, the LSEARCH 1 specification indicates that a gradient evaluation is requested and each point is used, even if the energy is higher. For OPTXYZ specifying the first parameter as 0 (function evaluations) and specifying the second variable allows one to override the standard maximum number of steps along a line (normally 3), before the hessian is reset and the program tries again. To try for 7 points in OPTXYZ one specifies
LSEARCH 0 7
The TOLMAX directive may be used to control how far a search for a minimum in the n-1 subspace [4] may proceed before another search for a maximum is performed. Smaller values will cause the program to search for a maximum more often. The default is
TOLMAX 0.1
The TOLSTEP directive is used to maintain `good' conjugate directions to the principal direction of negative curvature. If the step along this direction was too large in the previous iteration then the program takes a small step in order to estimate a better set of conjugate directions. The default is equivalent to
TOLSTEP 0.1
The TANSTEP directive may be used when the TOLSTEP test requires the conjugate directions to be recalculated. A step (TANSTEP*previous step length) is taken along the current tangent to the polynomial and the function and gradients are calculated at this point. The default is
TANSTEP 0.1
This directive may be used to control the number of energy evaluations and line-searches permitted in optimising a given structure. The default is
MINMAX 60 60
The first integer refers to the maximum number of energy evaluations allowed,
and the second to the maximum number of line searches.
Defines the four acceptance criteria for the convergence of the synchronous-transit algorithm. The criteria are:
maximum change in variables < xtol
average change in variables < xtol*2/3
maximum gradient < xtol*1/4
average gradient < xtol*1/6
The default corresponds to presenting the data line
XTOL 0.001
Defines the maximum allowed movement in any of the variables in a single step. The internal units of the variables are bohr for bond lengths and radians for angles. The default is equivalent to
STEPMAX 0.2
An FCM directive may be given to specify the Force Constant Matrix (Hessian) to be restored in an OPTIMISE or SADDLE calculation. Specifying FCM or a dumpfile name on a RUNTYPE OPTIMISE or RUNTYPE SADDLE directive is equivalent to providing a separate FCM directive. The directive consists of a single line containing
FCM DD IBLOCK TYPE
where DD is the name of the dumfile containing the Hessian and IBLOCK is its starting block.
TYPE is the type of Hessian requested and can be any of : MP2, SCF or OPTIMISE, where the
former denote analytical hessians generated using MP2 or SCF respectively and OPTIMISE
requests the Hessian produced during an OPTIMISE or SADDLE run. If the TYPE is omitted,
the dumpfile is searched for hessian sections in the order given above. The Dumpfile
specification may be omitted, in which case the current dumpfile is searched.
For example the next sets of input lines are equivalent, assuming the default dumpfile :
RUNTYPE OPTIMISE
FCM ED3 1
........
RUNTYPE OPTIMISE FCM
........
RUNTYPE OPTIMISE ED3 1
The FCM directive may also read
FCM UNIT7
in which case the Force Constant Matrix is read from the punchfile.