An example list of the simulated annealing parameters are given below.
20 Simulated Annealing Parameters: 21 Search only for non-fragmented structures: yes 22 Use energy value from local optimization(basin hopping): no 23 Search for transition states (random search with every perturbation accepted): no 24 Starting temperature or desired starting percentage of accepted transitions(use %): 85% 25 Boltzmann constant: 3.1669e-6 26 Minimum number of iterations before decreasing the temperature (N): 200 27 Decrease the temperature when the percentage of accepted transitions for the past N iterations is below: 100 28 Quenching factor(use 1 for basin hopping): 0.9995 29 Don't stop while the temperature is above this value: 400.0 30 Stop if the percentage of accepted transitions for the past N iterations is below: 1.0 31 Maximum number of allowed iterations: 100000 32 Starting number of perturbations per iteration: 3 33 Starting coordinate perturbation (angstroms): 0.25 34 Minimum coordinate perturbation (angstroms): 0.05 35 Starting angle perturbation (deg): 25 36 Minimum angle perturbation (deg): 3This simulated annealing algorithm has the ability to perform non-fragmented searches, or in other words it can enforce minimum and maximum distance constraints through the course of the entire run. This enables faster, more relevant searches. To enable this feature, place yes on line 21. Putting Yes for line 22, and setting the Quenching factor to 1 turns on Basin Hopping. Basin hopping is very similar to simulated annealing except the temperature (line 24), number of perturbations to perform at a time (line 32), and perturbation amounts (33-36) do not change. Also, when performing basin hopping, the energy value is obtained by making a copy of the original structure, performing optimization to the nearest local minimum, and assigning that energy value to the original structure. By tradition, simulated annealing and basin hopping use only one structure and do not use a population of candidate structures, though this application will allow populations of solutions. A population of solutions with these two algorithms is essentially a set of independent runs. Using a population of solutions with these algorithms greatly increases the probability of finding the correct minimum and is highly recommended.
At each step, simulated annealing makes a number of random perturbations. Each perturbation can move the center-of-mass for a group of atoms, a molecule, or a "unit" along a random vector the length of which is specified on lines 33 and 34. Alternatively a perturbation can rotate one of three angles in a molecule or unit by a random amount (see lines 35 and 36). Once a perturbation has been made, the energy is recalculated. If the energy value is better, the perturbation is accepted. If it is worse, the perturbation is accepted with a certain probability defined as:
p = e-ΔE/kT
where ΔE is the change in energy in atomic units (hartrees), k is the Boltzmann constant in units of hartrees per kelvin (line 25), and T is the temperature in units of kelvin (line 24). At the start of a run, the temperature and the probability of accepting a bad perturbation are very high. The temperature T, the number of perturbations P, the coordinate perturbation amount C, and the angle perturbation amount A decrease as follows:
T = T x quenching factor (line 28)
P = P x SquareRoot(quenching factor)
C = C x SquareRoot(quenching factor)
A = A x SquareRoot(quenching factor)
At the end, the temperature and the probability of accepting bad perturbations are very low. Essentially, the algorithm is a slow transition between a random search and a downhill search.
Since the starting temperature (line 24) is sometimes time consuming to set optimally, this program now has an automatic method for setting this. Instead, of specifying a starting temperature, you may specify a starting percentage of accepted transitions (see summary output displayed while the program is running). Typical values range from 70-90%, and 85% works for many applications. Note that if the percentage of accepted transitions is higher than 90%, it may take a long time for it to come down.
The quenching factor (line 28) controls the length of the run and is also important. Set this so that the run will last long enough to produce good results but short enough to be reasonable. Keep in mind the relationship: starting temperature * (quenching factor ^ number of iterations) = final temperature. Typical values are between 0.999 and 0.99999. I typically use 0.9995.
There are two ways a run can be terminated automatically. The first is if the run exceeds a maximum number of iterations (line 31). The second is if the percentage of accepted transitions is below a specified value (line 30) and if the temperature has dropped below a specified minimum value (line 29). Generally, it is best if the percentage of accepted transition and the temperature are low toward the end of a run, though you may stop a run at any time.
Theoretically simulated annealing is guaranteed to find the global minimum if cooling proceeds slowly enough, though there is no guarantee that it can be done within a reasonable amount of time. Because of the expensive nature of ab initio calculations, large numbers of calculations are sometimes not practical, though the theoretical guarantee is a plus. Using a population of solutions is also very helpful in finding global minima.
It is often best to use the Lennard Jones potential for testing the parameters until they are in the ball park. Though this energy function behaves very differently, doing this will help you find obvious errors in the input parameters and give you a rough idea of how the algorithm will proceed before you start using expensive ab initio calculations. After the parameters seem to work well with the Lennard Jones potential, try them with your quantum package. Check for differences in how the algorithm performs and make adjustments. This is particularly important if you are performing runs that take several weeks.