Optimization Schemes

Contents

Overview: What are optimimization schemes, and why use them?

In a nutshell..

An optimization scheme is a series of optimization steps ("optsteps") that are to be performed in sequence on a structure. Each optimization step consists of a set of input file templates for the queuing system and optimizer to be used, and the structure is updated after each completes. So if an optimization scheme contains three optimization steps, a stucture's lifecycle is:

  1. Generation of initial structure
  2. Perform optstep 1 on initial structure
  3. Update structure from the results of optstep 1
  4. Perform optstep 2 on current structure (result of optstep 1)
  5. Update structure from the results of optstep 2
  6. Perform optstep 3 on current structure (result of optstep 2)
  7. Update structure from the results of optstep 3
  8. Current structure (result of optstep 3) is either accepted into the breeding pool or discarded, depending on its enthalpy relative to the other optimized structures.

More details

The efficiency of searching a potential energy surface for a global minimum can be significantly improved by moving each candidate structure to the nearest local minimum, i.e. performing a geometry optimization. The differences between searching with and without carrying out these local optimizations are explored in detail in Woodley SM, Catlow CRA. Comp. Mat. Sci. 2009;45(1):84-95 (Available at: http://linkinghub.elsevier.com/retrieve/pii/S0927025608003030 ).

Why not just perform a single geometry optimization on each structure? Stochastic search techniques, such as XtalOpt, will often need to perform geometry optimizations on structures that are far from a stationary point on the potential energy surface. For example, the randomly generated structures in the first generation of an evolutionary search are often highly disordered with unrealistic atomic separations. If these structures were to be optimized in a single step with accurately small convergence criteria, it would be quite expensive. Also, it is more than likely that most of the optimizations would not finish successfully before reaching the maximum number of geometry steps allowed by the optimizer or specified in the input. A second issue is that complex structures (periodic crystals, for example) often have so many degrees of freedom that convergence in a single step is difficult from a poor starting point (consider the effect on atomic coordinates when a unit cell's translation vector is modified).

The first problem (effectively optimizing to small convergence) can be solved by implementing an optimization scheme that optimizes to successively smaller convergence cutoffs.

The second problem can be addressed by reducing the degrees of freedom in the early optsteps and only optimizing everything once each component has individually converged to a reasonable parameterization. See Suggestions for optimization schemes for examples.

Optimization scheme user interface

optschemes-numberededitor.png

We will use the above screenshot as we describe the process of creating, saving, and loading optimization schemes. The numbers indicate:

  1. List of optimization steps
  2. Button to add new optimization step
  3. Button to remove current optimization step
  4. Template selection menu
  5. Template editor
  6. Button to save current optimization scheme to file
  7. Button to load optimization scheme from file

Optimization step list

This list shows the currently available optimization steps in the order that they will be performed. The optstep that is currently selected for editing is highlighted, and the editable optstep can be selected by clicking the appropriate entry.

Add new optimization step

Clicking this button will append a new optimization step to the optstep list. The new optstep's templates will be copies of the currently selected optstep's templates.

Remove current optimization step

Click this button to delete the currently selected optimization step.

Select template

This menu contains the filenames of the templates that are required by the currently selected queuing system (e.g. PBS, SGE, local...) and optimizer. The currently selected template is displayed in the template editor, and selecting a different template will update the editor.

Template editor

This text editor is used to view and edit the currently selected template for the current optstep.

Save scheme

This button will prompt for a location to save a .scheme file containing the current optimization step.

Resume scheme

This button will prompt for an existing .scheme file to load.

How to build an optimization scheme?

Creating a working scheme from scratch may take some time. We recommend checking the samples/ directory of the source code to obtain sample scheme for each optimizer (see How to load an optimization scheme?) and verifying that they are appropriate for the system under consideration before starting a search.

If there is not an appropriate sample, the following prescription may be used to generate your own:

  1. Generate a random structure of the system under consideration. This may be done by hand, or by running a search just long enough to create the first random generation and saving one of the structures.
  2. Create a starting optstep with the desired convergence criteria
  3. Manually submit the optimization
  4. If the optimization fails:
    1. First determine why -- if the maximum iterations were exceeded or the optimization was aborted due to a badly performing minimizer, try one of the ideas below. Other optimization problems are beyond the scope of this document.
    2. Reduce the convergence criteria of the current trial optstep
    3. Remove degrees of freedom, e.g. by fixing cell parameters, atomic positions, etc
    4. Reduce the accuracy of the calculation in other ways (use a courser integration grid, etc).
    5. Change the minimizer (e.g. tell the optimizer to use conjugate gradients rather than BFGS, etc)
  5. Once the optimization succeeds, create another set of input files with the desired convergence criteria for all degrees of freedom.
  6. Manually submit the new optimization step. If it fails, try the ideas above until it converges.
  7. Once the structure has converged to the desired level of accuracy, try to optimize another randomly generated structure using the optsteps that succeeded previously. Refine them if needed.
  8. Once you have successfully optimized enough random structures that you are confident in your method, gather all of the inputs used and write your scheme from them.

The scheme may be written by copying each input file into the template editor (with the appropriate optstep and template selected, of course) and replacing the structure-specific information with the appropriate keywords. Click the "Help" button for the complete list of keywords.

We have found that the optimization schemes are surprisingly transferable within an optimizer, so once you have a working optimization scheme for a given optimization code only minor tweaks (usually to the energy cutoffs, etc ) are necessary to use it on a different chemical system.

How to save an optimization scheme for later?

Once you have written your optimization scheme, you will want to save it for fast retrieval later (otherwise you will need to copy/paste and edit all of the templates again!). To save, simply click the "Save Opt Scheme" button and enter an appropriate filename with an extension of .scheme.

How to load an optimization scheme?

Loading an optimization is quite simple -- just click the "Load Opt Scheme" button and select the .scheme file you wish to load. This will also update the current queuing system and optimizer to those specified by the scheme.

What is saved?

The optimization scheme files contain more than just the templates for each optstep. They also store queue and optimizer specific settings. This is useful for storing configuration options for different clusters along with the scheme. Note that although XtalOpt will prompt for an SSH password if needed, it is NOT stored in the scheme file.

Suggestions for optimization schemes

Crystals (XtalOpt)

The following list describes the optimization steps used in the samples/vasp-xtalopt.scheme file distributed with the XtalOpt source code:

  1. Fix unit cell, only optimize atomic coordinates. A very loose convergence criterion is used, and the number of KPOINTs is kept small.
  2. The cell volume is fixed, but atomic positions and cell parameters are allowed to vary. The convergence criteria is the same as before, as is the KPOINT grid.
  3. All degrees of freedom are considered using the same convergence criteria as before, but with a finer KPOINT grid.
  4. Same as before, but with a stricter convergence criteria.
  5. Same as before, but with a stricter convergence criteria and more KPOINTs.
  6. Same as before, but with more KPOINTs.

This is only one of many possible optimization schemes that may work for crystals. It may need to be modified to work for your particular system.

 All Classes Functions Variables Enumerations Enumerator
Generated on Mon Jul 16 14:40:04 2012 for GlobalSearch by  doxygen 1.6.3