STFC
MPI für Kohlenforschung

University College London

Newopt : A Modular Optimisation Package

Introduction

Newopt is a set of general purpose optimisation routines. The design of the package is based on the idea that most popular optimisation algorithms can be broken into discreet steps (e.g. step calculation, hessian update, function evaluation etc.). If these steps are implemented as commands within an interpreted language it is possible to use this language to describe a number of geometry optimisation algorithms in terms of the same set of component steps. Once the algorithms are coded in this way, modifications to the algorithms (and new algorithms) can be generated and tested without recompilation.

Internally, the package is based on an object oriented structure, an optimiser object is generated by optimiser command, which allocates memory for all the matrices and vectors needed for the optimisation. Methods associated with this object can then be invoked to build up the geometry optimisation algorithm.

In addition to this low-level programming approach, a high level driver command (newopt) is provided which manages the optimiser object, allowing selection of one of a set of standard "black box" optimisation algorithms.

The target function to be minimised is provided as a set of Tcl procedures. In this way, the user is able to write Tcl wrappers to allow newopt to optimise any continuous function. A number of target functions are provided for molecular geometry optimisation, the most useful are zopt for Z-matrix (and mixed cartesian/zmatrix) optimisation and copt for pure cartesian optimisation.

The Newopt command

The newopt command performs any type of optimisation or transition state search as a black box procedure taking the following general arguments.

Command line arguments

Argument Argument type Mandatory Default To specify
function= name of the function yes none type of problem to be optimised
method= name of optimisation method no bfgs a standard algorithm for solving an optimisation problem
list_option= Output keyword no medium Level of output
maxstep= integer no 200 the maximum number of points to be allowed
toler= real no n/a convergence criterion for the trial step length; sets other convergence criteria as well
toler_rmsstep= real no 0.0002 convergence criterion for the rms step length
toler_maxstep= real no 0.001 convergence criterion for the step length
toler_rmsgrad= real no 0.0002 convergence criterion for the rms gradient
toler_maxgrad= real no 0.001 convergence criterion for the gradient
toler_energy= real no 1.0e-10 forced convergence criterion for the energy
list_variables= Boolean no no printflag for variables information during optimisation
step= real no 0.3 maximum trial step length
punchfile= filename no - name of a punchfile for output
input_hessian= matrix no - initial internal coordinate hessian
hessian_update= keyword no powell hessian update algorithm, see below
final_hessian= Matrix tag no - final internal coordinate hessian
restart= Boolean no - restart of previous optimisation run
hard_fail= Boolean no - return failure code to Tcl
commands= Tcl list no - Tcl commands to be executed (only with method=custom)
var_list= Tcl list of numbers no - list of variables to be operated on in conjunction with selected hessian updates
eig_list= Tcl list of numbers no - list of variables to be operated on in conjunction with searches along hessian eigenmodes
del= real no - displacement for finite-differencing

Some of these arguments may only required with certain algorithms. If not required, they need not be specified. If they are omitted, default options and values will be put into operation.

function=

The function argument specifies the type of function which the newopt command is to work on. It may require additional arguments which must be passed through to the appropriate codes using the colon (:) notation, as discussed in the ChemShell Basics section. E.g. for a standard pseudo-Newton geometry optimisation in internal coordinates using GAMESS-UK with a dzp basis set (for further details of GAMESS-UK options see the Quantum interfaces section

newopt function=zopt : {zmatrix=z theory=gamess: \
{basis=dzp listing=gamess.out} }

Optimisation Methods

The method argument specifies a standard algorithm, to be used as a black box, for solving an optimisation problem. Depending on the algorithm this may be a minimisation or a transition state (TS) search. Currently valid options are:

Method To do what
descent steepest-descent minimization. The actual step size is determined through the Shanno line-search algorithm.
bfgs pseudo-Newton minimisation with BFGS update of the inverse hessian. The actual step size is determined through the Shanno line-search algorithm. Further arguments
bfgs2 pseudo-Newton minimisation with BFGS update of the inverse hessian. The actual step size is determined through a function-only line-search algorithm. Further arguments
conmin conjugate gradient minimisation. The actual step size is determined through the Shanno line-search algorithm, with at least two trial point evaluations along the line. A conjugate gradient restart step is performed every ndim steps, with ndim the dimension of the optimisation problem. A restart step is also performed under certain conditions of line-search failure.
mineig line-search minimisation along selected hessian eigenmodes. The mode-indices to be minimised along are input through the eig_list argument.
scaneig potential energy scan along selected hessian eigenmodes with fixed step-lengths. The mode-indices to be scanned are input through the eig_list= argument. The step-length is input through the step= argument. The scan is stopped if the energy goes up if follow_mode=0
baker Baker's (partial) rational function optimisation (P)RFO algorithm, with the Powell update of the hessian. The actual step size is bounded by step. For a TS search, the follow_mode argument must be specified as non-zero. Mode-following is achieved through finding maximum overlap of the hessian eigenvectors with the mode to be followed. The mode to be followed may be kept fixed to the starting mode or updated each step to be the actual step direction. This is controlled through the update_mode argument (see below). The argument input_hessian argument is required with this algorithm. Further arguments
diis direct inversion in the iterative subspace algorithm. Further arguments
custom user-defined search. The search is performed through the Tcl-commands supplied in the commands= argument. See the newopt programming guide for information on custom programming.

The default of the method argument is bfgs.

The verbose argument may be used to set the level of output during an optimisation. Switching it on causes the eigenvectors of the hessian and the step-vector to be printed, amongst others. Valid options are boolean equivalents; the default value is off.

The list_variables argument specifies the printing of the current variables at each search-step. The default value is yes.

The maxstep argument specifies the maximum number of actual search steps in a search. Note that only the result of a line search counts as a step. The default value is 200.

The toler argument specifies the convergence criteria on the maximum step component. From it, the three other convergence criteria are derived as shown in the table below. If toler is left unspecified, the default values given in the same table are set if they are not specified separately.

Convergence tester Convergence criterion
  From toler default
maximum step component toler 0.001
rms of the step vector toler * 2/3 0.0002
maximum gradient component toler * 1/4 0.001
rms of the gradient toler * 1/6 0.0002

The toler_rmsstep, toler_maxstep, toler_rmsgrad, and toler_maxgrad arguments specify the convergence criteria for the rms-value of the step, maximum value of the step, rms-value of the gradient, and maximum value of the gradient, respectively. If any of these are specified, they override the values set by the toler argument, or the default values tabulated above.

All methods except bfgs, baker and diis are converged on all four criteria listed above.

The toler_energy argument specifies the convergence criterion on the energy. If in two consecutive steps the energy change is less than this criterion, convergence is forced, even if the criteria on gradient and step are not met. This option is currently valid only with method=bfgs, baker and diis. The default value is 1.e-10.

The bfgs and Baker algorithms are tested for convergence in the following manner: the toler_maxgrad criterion must always be satisfied and either the toler_maxstep or toler_energy criteria.

The step argument specifies the maximum allowed step length in the Baker algorithm. The default value is 0.3. It is also used to restrict step-lengths in other algorithms or set the step-length in the scanning along hessian eigenmodes.

The punchfile argument specifies the output of information on the structures during the optimisation to a punchfile. The output may be used to check the progress of an optimisation. The default is not to write to a punchfile.

The input_hessian argument specifies the name of the starting hessian, which may be calculated beforehand through the hessian command. It is required with the method=baker option.

The hessian_update argument specifies the method by which the hessian is updated. Currently valid options are listed in the table below.

Update options To do what
powell Powell update of the hessian
bfgs BFGS update of the hessian
mursar Murtagh-Sargent update of the hessian
hybrid hybrid ( i.e. weighted) combination of Powell and Murtagh-Sargent update
fde finite differencing of selected hessian eigenmodes. The eigenmodes are specified through the var_list argument (default "1 2 3")
fde2 two-point finite differencing of selected hessian eigenmodes. See also fde.
none hessian is not updated

This option is active only with method=mineig, scaneig, baker and diis. The default value is powell. With all other method= arguments, the hessian, if used, is updated with the BFGS scheme.

The final_hessian argument specifies the name of the final hessian, i.e. the hessian at the end of the optimisation. This argument is active with method=bfgs, bfgs2, and baker options.

The restart argument causes the optimisation to start from saved files (ending _restart), containing information about the point at which the previous run left off. Geometrical, function, gradient and hessian information is taken off those files. Options are boolean equivalents. The default is no.

The hard_fail argument routes any Tcl-error message to output for diagnostics. The default is yes.

The commands argument provides the Tcl-commands to be executed with method=custom. The default is an empty string.

The var_list argument is a string listing the variables or modes to be operated on by the eigenmode finite-difference hessian update (hessian_update=fde) or recomputation options (see below). The default is "1 2 3".

The eig_list argument is a string listing the variables or modes to be search along with method=mineig and scaneig. The default is undefined. The del argument specifies the displacement in finite-differencing steps, be it for hessian or gradient. The default is 0.001.

Target Functions

The target function for the optimiser is specified using the function= argument.
  • zopt Molecular geometry optimisation in Z-matrix and mixed cartesian coordinates
  • copt Molecular geometry optimisation in cartesian coordinates
  • Custom target functions It is possible to optimise any function that can be evaluated by a ChemShell command, provided the correct interface is adopted.




This manual was generated using htp, an HTML pre-processor Powered by htp