Atomic Global Minimum Locator: Particle swarm optimization input parameters


Menu

Previous Next

An example list of the parameters for the particle swarm optimization algorithm are given below.
20  Particle Swarm Optimization Parameters:
21  Start coordinate inertia (w): 0.95
22  End coordinate inertia (optional): 0.8
23  Reach end coordinate and angle inertias at iteration (optional): 10000
24  Coordinate individual minimum attraction (c2): 0.15
25  Coordinate population minimum attraction (c1): 0.15
26  Maximum Coordinate Velocity (Vmax, optional): 0.3
27  Start angle inertia (w): 0.95
28  End angle inertia (optional): 0.8
29  Angle individual minimum attraction (c2, deg): 15
30  Angle population minimum attraction (c1, deg): 15
31  Maximum Angle Velocity (Vmax, optional): 30
32  Starting RMS visibility distance (use 'auto' for automatic): auto
33  Increase the RMS visibility distance by this amount each iteration: 0.003
34  Switch to the repulsion phase when (1) diversity is below (optional): 0.15
35  And when (2) progress hasn't been made for this number of iterations (optional): 200
36  Switch to the attraction phase when diversity is above (optional): 0.2
37  Don't update individual best solutions within this RMS distance of the best seen by the population: 0.01
38  Maximum number of allowed iterations: 10000
39  Enforce minimum distance constraints on a copy of each structure rather than on the original: yes
40  Use energy value from local optimization: yes
With Particle Swarm Optimization (PSO), coordinates and angles have a velocity by which they are updated according to the formula:

    x = x + v

The velocity is updated according to the formula:

    v = wv + c1 r1 (bp - x) + c2 r2 (bi - x)

where
  • w is the inertia which is usually slightly less than 1
  • bp is the value of the given variable from the best solution seen by the entire swarm or by the the neighboring swarm
  • bi is the value of the given variable from the best solution seen by the particle (candidate solution)
  • c1 and c2 are constants indicating how much the particle is directed toward the best solution seen by the swarm and by the particle, respectively
  • r1 and r2 are random numbers in the range [0,1]
If the Vmax parameter is set, the velocity can't be larger than Vmax or less than -Vmax.

If you are new to particle swarm, you can start with the parameters above and adjust them as needed. Because ab initio calculations can take a long time, it is best to use the Lennard Jones potential to test the parameters you have chosen. Though this energy function behaves very differently, doing this will help you optimize parameters not strongly related to the energy function (i.e. visibility parameters). After the parameters seem to work well with the Lennard Jones potential, try them with your quantum chemistry package and check for differences in how the algorithm performs. While this may seem silly, it can save you from changing parameters in the middle of a run that can take weeks or months.

The parameters that most often need to be changed are c1, c2, and Vmax (lines 24-26 and 29-31). These affect how refined the search is. Decreasing Vmax or c1, or increasing c2 will favor a local rather than a global search. See the literature on the Internet or paper 3 above for more information.

Parameters on lines 32-36 control the progress of the algorithm in the long term and are important. Each particle or candidate structure is attracted toward two structures: (1) it's memory of the best structure it has ever seen and (2) the best structure remembered by other particles. If an RMS visibility distance is NOT set, each particle can see the best solutions known to all other particles. If an RMS visibility distance is set, each particle can only see the best solutions of other particles within the given distance. It's best to set the RMS visibility distance to a small value at the start of the run and have it increase slowly over time. This favors a more thorough search and helps prevent the search from getting getting stuck in a local minimum. The percentage visibility can be observed as the "Vis" value in the summary output displayed while the program runs. The percentage visibility should start low, i.e. 0-1% and increase slowly to 100%.

The program also has an automatic method of assigning the starting RMS visibility distance (line 32). If this option is turned on, the starting RMS visibility distance will be set to 80% of the smallest RMS distance between any two chemical structures in the population. The time when this distance is set can vary, and before it is set, the RMS visibility distance (and percentage visibility) is zero. The distance is set when one of three conditions is met:
  1. The best observed energy value hasn't changed for 70 iterations, and the average coordinate velocity (see summary output) is less than half of the maximum coordinate velocity (Vmax, line 26).
  2. Iteration 200 has been reached.
  3. The average velocity of coordinates is below 0.005.
Since the starting visibility distance can be hard to set, it is hoped that this automatic option will be helpful.

Once the visibility distance reaches 100%, the diversity in the population will likely be low. The degree of diversity in the population can be observed as "Div" in the summary output seen while the program runs. When this gets low (see parameters on lines 34 and 35), the algorithm will temporarily switch to the repulsion phase. When it switches back (see line 36), it will again start with a low visibility which will increase slowly to 100%. Also, the memory of each individual solution is erased by replacing it with a structure from the list of best structures (see line 42). For this reason, it is best to set line 42 to be equal to or larger than the total population size. It is also a good idea to set the distance between structures in the list of best structures (line 43) to be slightly larger than the starting visibility distance (line 32). Note that while entering the repulsion phase can reintroduce diversity, it is best if the algorithm can find a minimum without entering this phase (i.e. it should only be used as a backup).

The parameter on line 37 was designed to prevent the best structure seen by each individual from becoming too close to the best structure seen by the population. I usually don't change it.

The parameter on line 38 is a maximum number of iterations allowed. This is the only way the program is terminated automatically, though the program can be terminated manually at any time by pressing Control-C (or qdel if running on a Linux cluster).

The parameter on line 39 deals with an automatic function that the program has for enforcing minimum distance constraints (see paper 3 above). It could be said that enforcing the minimum distance constraints modifies the way the algorithm works. Line 39 specifies that the program should make a copy of each structure before enforcing the minimum distance constraints and calculating the energy, so the progress of the algorithm is not modified.

This algorithm can also be used with local optimization (see line 40). When local optimization is used, the energy of a structure is assigned to be the energy obtained through local optimization, but the positions of atoms and the progress of the PSO algorithm are not affected when this optimization is turned on. When using this option, a good approach is to limit the number of optimization steps rather that performing a full geometry optimization. If a full geometry optimization is desired, this may be performed on the list of best structures after the run completes.

Menu

Previous Next