|if NSW=0 or 1||-1|
IBRION determines how the ions are updated and moved. For IBRION=0, a molecular dynamics is performed, whereas all other algorithms are destined for relaxations into a local energy minimum. For difficult relaxation problems it is recommended to used the conjugate gradient algorith (IBRION=2), which - at present - posses the most reliable backup routines. Damped molecular dynamics are often usefull, when starting from very bad initial guesses. Close to the local minimum the RMM-DIIS is usually the best choice.
Mind: At the moment only constant volume MD's are possible.
A RMM-DIIS quasi-Newton algorithm is used in which an approximation for the inverse Hessian matrix is build up by taking into account information from previous iterations. The initial Hessian matrix is diagonal and equal to POTIM. Old informations (which can lead to linear dependencies) are automatically removed from the iteration history. Usualy not more information must be kept in the iteration history than degrees of freedom. Naively the number of degrees of freedom is 3*(NIONS-1) or 3*(NIONS-2) for isoltated molecules. However symmetry, or constrained minimization can reduce the this number significantly. There are two algorithms build in to remove information from the iteration history. i) If NFREE is set in the INCAR file, only up to NFREE ionic steps are kept in the iteration history. ii) If NFREE is not specified, the criterion whether information is removed from the iteration history is based on the eigenvalue spectrum of the inverse Hessian matrix: if one eigenvalue of the inverse Hessian matrix is larger than 8, information from previous steps is discarded. For complex problems NFREE can usually be set to a rather large values (i.e. 10-20), however systems of low dimensionality require a carfull setting of NFREE (possibly even an exact counting of the number of degrees of freedom). To increase NFREE beyond 20 rarely improves convergence. If NFREE is set to too large numbers the RMM-DIIS algorithm might even blow up. It can also blow up if the algorithm is started far from the equilibrium position.
The choice of a reasonable POTIM is also important and can speed up calculations significantly, we recommend to find an optimal POTIM using IBRION=2 or performing a few test calculations (see below).
To summarize: In the first ionic step the forces are calculated for the initial configuration read from POSCAR, the second step is a trial (or predictor step), the third step is a corrector step. If the line minimization was sufficiently accurate, the cycle starts again, resulting in the following sequence:
|3||corrector step, i.e. positions corresponding to anticipated minimum|
where SMASS supplies the damping factor , and POTIM controls . In fact a simple velocity Verlet algorithm is used to integrate the equation, the discretized equation reads:
It is easy to see that for a simple steepest descent algorithm is obtained. Therefore corresponds to maximal damping, corresponds to no damping. The optimal damping factor depends on the Hessian matrix (second derivate matrix) of the ionic system. A reasonable first guess for is usually 0.4.
If SMASS is not set in the INCAR file (respectively SMASS<0), a velocity quench algorithm is used. In that case ions are updated according to a second order equation of motion using the Verlet algorithm (i.e. energy would be conserved), and whenever the force on one ion is anti-parallel to the current velocity, the velocities on that ion are zeroed.
Mind: For IBRION=3, a reasonable time step must be supplied by the POTIM parameter. Too large time steps will result in divergence, too small one will slow down the convergence. The stable time step is usually the twice the smallest line minimization step in the conjugate gradient algorithm.
For IBRION=1,2 and 3, the flag ISIF (see section 7.21) determines whether the ions and/or the cell shape is changed. No update of the cell shape is supported for molecular dynamics (IBRION=0).
Within all relaxation algorithms (IBRION=1,2 and 3) the parameter POTIM should be supplied in the INCAR file. It should be stressed that for IBRION>0, the forces are scaled internally before calling the minimization routine. Therefore for relaxations, POTIM has no physical meaning and serves only as a scaling factor. For many systems, the optimal POTIM is around 0.5.
Because the Quasi-Newton algorithm and the damped algorithms are sensible to the choice of this parameter, use IBRION=2 if you are not sure how large the optimal POTIM is. In that case the OUTCAR file and stdout will contain both a line indicating a reliable POTIM. For IBRION=2, the following lines will be written to stdout after each corrector step (usually each odd step):
trial: gam= .00000 g(F)= .152E+01 g(S)= .000E+00 ort = .000E+00 (trialstep = .82)The quantity gam is the conjugation parameter to the previous step, g(F) and g(S) are the norm of the force respectively the norm of the stress tensor. The quantity ort is an indicator whether this search direction is orthogonal to the last search direction (for an optimal step this quantity should be much smaller than (g(F) + g(S)). The quantity trialstep is the size of the current trialstep. This value is the average step size leading to a line minimization in previous ionic step. An optimal POTIM can be determined, by multiplying the current POTIM with the quantity trialstep.
After at the end of a trial step, the following lines are written to stdout:
trial-energy change: -1.153185 1.order -1.133 -1.527 -.739 step: 1.7275(harm= 2.0557) dis= .12277 next Energy= -1341.57 (dE= -.142E+01)The quantity trial-energy change is the change of the energy in the trial step. The first value after 1.order is the expected energy change calculated from the forces ( change of positions). The second and third value corresponds to change of positions and change of positions. The first value in the second line is the size of the step leading to a line minimization along the current search direction. It is calculated from a third order interpolation formula using data form the start and trial step (forces and energy change). harm is the optimal step using a second order (or harmonic) interpolation. Only information on the forces is used for the harmonic interpolation. Close to the minimum both values should be similar. dis is the maximum distance moved by the ions in fractional (direct) coordinates. next Energy gives an indication how large the next energy should be (i.e. the energy at the minimum of the line minimization), dE is the estimated energy change.
The OUTCAR file will contain the following lines, at the end of each trial step:
trial-energy change: -1.148928 1.order -1.126 -1.518 -.735 (g-gl).g = .152E+01 g.g = .152E+01 gl.gl = .000E+00 g(Force) = .152E+01 g(Stress)= .000E+00 ortho = .000E+00 gamma = .00000 opt step = 1.72745 (harmonic = 2.05575) max dist = .12277085 next E = -1341.577507 (d E = 1.42496)The line trial-energy change was already discussed. g(Force) corresponds to g(F), g(Stress) to g(S), ortho to ort, gamma to gam. The values after gamma correspond to the second line (step: ...) previously described.
For IBRION=1 less information is printed. IBRION=1 should be used only close to the minimum with an already known setting for POTIM (determined with a run with IBRION=2).