ISEARCH: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
Line 10: Line 10:
{{NB|mind|{{TAG|ISEARCH|0}} should only be used for backward compatibility or benchmarking against legacy behavior.}}
{{NB|mind|{{TAG|ISEARCH|0}} should only be used for backward compatibility or benchmarking against legacy behavior.}}


== Improved line-search algorithm ==
== Improved line-search algorithm (ISEARCH = 1) ==


The improved algorithm ({{TAG|ISEARCH|1}}) introduces several enhancements over the legacy implementation:
The improved algorithm introduces several technical enhancements over the legacy implementation to ensure more robust convergence:
*'''Absolute reference''' - each line search step starts from the origin of the search direction rather than progressing incrementally. This improves energy consistency.
 
*'''Efficient slot system''' - all trial steps are stored in slots, reducing redundant energy evaluations.
* '''Absolute Reference''': Each line search step is calculated from the origin of the search direction rather than progressing incrementally. This maintains energy consistency and reduces cumulative rounding errors.
*'''Minimum-acceptance criterion''' - the final energy minimum of the line search is accepted only if its neighboring slots have also been evaluated (first principles energies are known), ensuring reliable interpolation.
* '''Intelligent Slot System''': Trial steps are managed through a "slot-in" mechanism. This system avoids redundant evaluations and strategically places new probes near the predicted minimum to provide the curvature data needed for higher-order fits.
*'''Polynomial and spline fitting'''
* '''Adaptive Fitting Logic''': The algorithm scales complexity based on the data density:
**If ≤ 5 data points are available, an up to 4th-order polynomial fit is used to determine the minimum.
** ''Low density (≤ 5 points)'': Uses a combined Harmonic (2nd-order) and 4th-order polynomial fit. The 4th-order result is only accepted if it is consistent with the harmonic direction.
**If > 5 data points are available, a spline interpolation is used instead, offering greater robustness than higher-order polynomials.
** ''High density (> 5 points)'': Employs Cubic Spline interpolation, which is more robust against the oscillations often found in high-order polynomials.
*'''Gradient correction''' - the line search typically relies on total energy evaluations only, which is faster than computing gradients. If the new gradient is not sufficiently orthogonal to the search direction from the previous step, a correction is applied using all available data points (via polynomial or spline fit).
* '''Hybrid Gradient-Energy Correction''': While primarily using energy, the algorithm monitors the slope. If the slope at the new point suggests the minimum was missed, it applies a Harmonic Correction to rescale the step length before attempting a polynomial fit.
* '''Concave Safety Descent''': If the second derivative of the fit is negative (indicating a "hill" rather than a "valley"), the algorithm ignores the fit and automatically reverts to the step that yielded the lowest energy evaluation recorded in the current search.


== Related tags and articles ==
== Related tags and articles ==

Latest revision as of 07:33, 5 March 2026

ISEARCH = 0 | 1
Default: ISEARCH = 0 

Description: Controls the line-search algorithm used during the direct minimization of the electronic structure (ALGO = All).


  • ISEARCH = 0: Legacy line-search algorithm.
  • ISEARCH = 1: Improved line-search algorithm.

The line search determines the optimal step size along the conjugate gradient search direction. ISEARCH = 0 performs incremental steps along the search direction. It may lead to inconsistencies in total energy evaluations and slower convergence. ISEARCH = 1 introduces a more robust and consistent method for determining the optimal step size, leading to improved convergence behavior and more reliable energy minimization.

Important: We recommend ISEARCH = 1 when performing electronic minimizations with ALGO = All, as it generally improves convergence stability and reduces the total number of required SCF steps.
Mind: ISEARCH = 0 should only be used for backward compatibility or benchmarking against legacy behavior.

Improved line-search algorithm (ISEARCH = 1)

The improved algorithm introduces several technical enhancements over the legacy implementation to ensure more robust convergence:

  • Absolute Reference: Each line search step is calculated from the origin of the search direction rather than progressing incrementally. This maintains energy consistency and reduces cumulative rounding errors.
  • Intelligent Slot System: Trial steps are managed through a "slot-in" mechanism. This system avoids redundant evaluations and strategically places new probes near the predicted minimum to provide the curvature data needed for higher-order fits.
  • Adaptive Fitting Logic: The algorithm scales complexity based on the data density:
    • Low density (≤ 5 points): Uses a combined Harmonic (2nd-order) and 4th-order polynomial fit. The 4th-order result is only accepted if it is consistent with the harmonic direction.
    • High density (> 5 points): Employs Cubic Spline interpolation, which is more robust against the oscillations often found in high-order polynomials.
  • Hybrid Gradient-Energy Correction: While primarily using energy, the algorithm monitors the slope. If the slope at the new point suggests the minimum was missed, it applies a Harmonic Correction to rescale the step length before attempting a polynomial fit.
  • Concave Safety Descent: If the second derivative of the fit is negative (indicating a "hill" rather than a "valley"), the algorithm ignores the fit and automatically reverts to the step that yielded the lowest energy evaluation recorded in the current search.

Related tags and articles

ALGO