ISEARCH: Difference between revisions

From VASP Wiki
m (Csheldon moved page Construction:ISEARCH to ISEARCH)
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TAGDEF|ISEARCH|0 {{!}} 1|0}}
{{TAGDEF|ISEARCH|0 {{!}} 1|0}}


Description: {{TAG|ISEARCH}} controls the line search algorithm used during the direct minimization of the electronic structure (when {{TAG|ALGO}} = A).
Description: Controls the line-search algorithm used during the direct minimization of the electronic structure ({{TAG|ALGO|All}}).
----
----
*{{TAG|ISEARCH}} = 0: Legacy line search algorithm.
*{{TAG|ISEARCH|0}}: Legacy line-search algorithm.
*{{TAG|ISEARCH}} = 1: Improved line search algorithm.
*{{TAG|ISEARCH|1}}: Improved line-search algorithm.


The line search determines the optimal step size along the conjugate gradient search direction. <code>{{TAGO|ISEARCH}} = 0</code> performs incremental steps along the search direction. It may lead to inconsistencies in total energy evaluations and slower convergence. <code>{{TAGO|ISEARCH}} = 1</code> introduces a more robust and consistent method for determining the optimal step size, resulting in better convergence behavior and more reliable energy minimization.
The line search determines the optimal step size along the conjugate gradient search direction. {{TAG|ISEARCH|0}} performs incremental steps along the search direction. It may lead to inconsistencies in total energy evaluations and slower convergence. {{TAG|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.
{{NB|important|We recommend {{TAG|ISEARCH|1}} when performing electronic minimizations with <code>{{TAG|ALGO}} {{=}} All</code>, as it generally improves convergence stability and reduces the total number of required SCF steps.}}
{{NB|mind|{{TAG|ISEARCH|0}} should only be used for backward compatibility or benchmarking against legacy behavior.}}


== Description of the Improved Algorithm ==
== Improved line-search algorithm (ISEARCH = 1) ==


The improved algorithm (enabled with <code>{{TAGO|ISEARCH}} = 1</code>) 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.
*'''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.
*'''Polynomial and spline fitting'''
**If ≤ 5 data points are available, an up to 4th-order polynomial fit is used to determine the minimum.
**If > 5 data points are available, a spline interpolation is used instead, offering greater robustness than higher-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).


== Recommendations ==
* '''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.
It is recommended to use <code>{{TAGO|ISEARCH}} = 1</code> when performing electronic minimizations with <code>{{TAGO|ALGO}} = A</code>, as it generally improves convergence stability and reduces the total number of required SCF steps. <code>{{TAGO|ISEARCH}} = 0</code> should only be used for backward compatibility or benchmarking against legacy behavior.
* '''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:
== Example ==
** ''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.
  ALGO = A
* '''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.
  ISEARCH = 1
* '''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 ==
{{TAG|ALGO}}
{{TAG|ALGO}}
{{sc|ISEARCH|Examples|Examples that use this tag}}


[[Category:INCAR tag]][[Category:Electronic minimization]]
[[Category:INCAR tag]][[Category:Electronic minimization]]

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