========================= Saddle-point certificates ========================= A saddle search stops when a force is small. A small force marks a stationary point, and a stationary point can be a minimum, a first-order saddle, or a saddle of higher order. A first-order saddle can also join a pair of minima other than the reactant and the product that were asked for. A surrogate search adds one more worry: the force that stopped the search must have been measured, not predicted. ``gprn`` therefore reports a verdict, ``Certified: yes|no|unresolved``, that states which of these properties were measured on the true surface. This page says what each check claims, how the verdict is assembled, what the output records, and where the claims end. :doc:`Get an IRC certificate for a saddle <../howto/irc_certificate>` runs the checks. **Status:** implemented in ``gprn``. ``gprd`` has the force-stop and index certificates (``--force-stop-certificate``) and no IRC walk. The endpoint walk is part of every build, because rgmin is required. Three claims, three checks -------------------------- Each claim is checked by a separate procedure, and each procedure uses only oracle calls. The surrogate chooses where the oracle is called. It does not enter any certificate. .. table:: +------------------------------------------+------------------------------------------------------------------------------+----------------------------------------------------------+---------+--------------------------------------------------+ | Claim | Check | Switch | Default | Enters ``Certified:`` | +==========================================+==============================================================================+==========================================================+=========+==================================================+ | The returned geometry is stationary. | A measured oracle row at that geometry has a force norm below the tolerance. | ``--converged-force`` (eV/Angstrom) | 0.05 | Always | +------------------------------------------+------------------------------------------------------------------------------+----------------------------------------------------------+---------+--------------------------------------------------+ | It is a first-order saddle. | The vibrational Hessian has one negative eigenvalue and no unresolved one. | ``--ci-index-certificate``, ``--force-stop-certificate`` | off | Only when switched on | +------------------------------------------+------------------------------------------------------------------------------+----------------------------------------------------------+---------+--------------------------------------------------+ | It connects the reactant to the product. | Walks downhill from both sides end at the two relaxed endpoints. | ``--irc-certificate`` | on | A ``not connected`` result withdraws the verdict | +------------------------------------------+------------------------------------------------------------------------------+----------------------------------------------------------+---------+--------------------------------------------------+ Two path-level certificates are also available and are off by default. ``--band-midpoint-certificate`` relaxes the midpoint of each band segment and requires none to lie above the climbing image. ``--band-leak-bound`` and ``--band-certificate-force-scale`` require the chord-discretization leak of the band, or the perpendicular force at the climbing image's neighbours, to meet the force tolerance. They guard against a band too coarse to resolve the ridge, and they do not test the saddle itself. The force check --------------- The search stops when the true force at the climbing image, or at the best oracle-evaluated saddle candidate, is below ``--converged-force``. The test reads the oracle row stored at exactly those coordinates. A row for a neighbouring geometry does not count, because a stored gradient can belong to a step that was not returned. A candidate that is not the climbing image must also have an energy above both endpoints. The norm is ``--convergence-force-norm``, default ``auto``. The test runs before the next refit and before any further oracle call, so a predicted force cannot end the search. :doc:`The surrogate loop ` gives the limits of this claim. The index check --------------- A force below tolerance does not give the number of downhill directions. The index check measures the Hessian :math:`H` of the oracle by central differences of the gradient with step :math:`h` (0.01 Angstrom by default, ``--oracle-stencil-step``), which costs two gradient calls per Cartesian coordinate. It restricts :math:`H` to the vibrational complement of rigid translation and rotation, in mass-weighted coordinates. The resolution includes the asymmetry of the rigid columns. ``--vibrational-stencil vibrational`` displaces only that complement: :math:`2(3N-6)` calls for :math:`N` free atoms, :math:`2(3N-5)` for a linear molecule and :math:`2(3N-3)` in a periodic cell. Its resolution is the measured block and can call a borderline mode resolved where the full stencil leaves it unresolved. A stencil along every coordinate is still written as schema 1; the vibrational directions are schema 3. The finite-difference matrix is not exactly symmetric, and its asymmetry measures the error of the stencil. Let :math:`A=\tfrac12(\tilde H-\tilde H^\top)` be the antisymmetric part of the raw matrix and :math:`\varepsilon=\lVert A\rVert_2` its spectral norm. An eigenvalue :math:`\lambda` of the symmetrized matrix counts as negative when :math:`\lambda<-\varepsilon` and as unresolved when :math:`\lvert\lambda\rvert\le\varepsilon`. The saddle is first order when exactly one eigenvalue is negative and none is unresolved. A weak mode inside :math:`\varepsilon` is refined with a Richardson pair of stencils along it (four gradients: both signs of :math:`h` and of :math:`h/2`) before it is called unresolved (``gpr/optimization/StencilIndex.h``). Where the index is measured depends on the switches: - ``--force-stop-certificate true`` measures one Cartesian stencil once the true force is below tolerance, accepts a first-order point and, for a higher-order point, leaves along the extra negative mode and searches again. An inconclusive stencil gives ``Certified: unresolved``. ``--oracle-stencil FILE`` implies it and writes the measured rows. - ``--ci-index-certificate true`` measures the lowest curvatures at the converged climbing image and requires a verified first-order saddle. - The endpoint walk needs the saddle Hessian for its first direction. If the search did not store a stencil, the walk measures one and prints ``[irc] measured saddle hessian: negative``... first\_order=...= and a ``Vibrational index gate:`` line. These lines report the index. They do not change the verdict. A run with neither switch above can therefore print ``first_order=0`` and still end in ``Certified: yes``. ``[band] irc_saddle_hessian`` (``--irc-saddle-hessian``) chooses the walk's Hessian. ``measured``, the default, builds the stencil. ``model`` takes the direction from the mean Hessian of the fitted GP when no stencil is stored and keeps it only if one true central difference along it is negative. That test finds one downhill direction and says nothing about the other modes, so the log prints ``Saddle index: descent direction verified; index not measured``, the curvature printed is the directional one, and the record file ends with the same sentence. If the model direction fails the test, the stencil is measured as in the default. The endpoint walk ----------------- The walk starts at the highest-energy image of the returned band and asks whether the two downhill sides end at the two endpoints. It makes no use of the surrogate. Relax the endpoints ~~~~~~~~~~~~~~~~~~~ The first and last images of the band are the deposited endpoints. They need not be minima of the true surface. Each is relaxed with rgmin L-BFGS until the maximum atomic force is below the tolerance. An endpoint that is below tolerance and still has a negative vibrational mode is moved off that mode and relaxed again. Each relaxed endpoint gets its vibrational spectrum, and :math:`\lambda_{\min}`, the smallest positive vibrational eigenvalue in eV/Angstrom:math:`^2`, is kept. The relaxed endpoints are cached for later saddles of the same run. Leave the saddle ~~~~~~~~~~~~~~~~ The lowest mass-weighted curvature :math:`\lambda_s<0` at the saddle fixes a unit Cartesian direction, projected clear of rigid translation and rotation, with the sign of its largest component made positive so that a replay repeats. The two walks start at the saddle displaced by :math:`\pm\alpha` along it, with :math:`\alpha=\mathrm{tol}/\lvert\lambda_s\rvert`. The displacement is scaled down if its RMSD would exceed half the RMSD between the two relaxed endpoints. Walk downhill ~~~~~~~~~~~~~ Each walk is a steepest descent in mass-weighted Cartesian coordinates, direction :math:`-g_i/m_i`, with saddle modes removed that are both stiffer than the imaginary mode and stiffer than :math:`\mathrm{tol}/h`. The step is the Newton step of the curvature met along the direction, capped by the larger Cartesian distance from the saddle to a deposited endpoint. The descent stops when a step no longer lowers the energy, when the force is below tolerance, at a step cap :math:`\max\bigl(2\max(1,3N-6),\lceil d/h\rceil\bigr)` with :math:`d` that larger distance, or when the walk's wall clock runs out. L-BFGS then finishes on the true surface to a force below the tolerance. If a negative vibrational mode remains, the geometry is displaced along it toward the lower energy and relaxed again. A walk that still has a negative mode is ``ambiguous``. Decide ~~~~~~ Distances are Kabsch RMSDs in the order of the atoms in the file. Atoms are not re-paired, because the bond graph below uses the same indexing. The bond graph of a geometry has an edge between two atoms closer than 1.2 times the sum of their Cordero covalent radii (Cordero et al., Dalton Trans. 2008). Radii exist for H, C, N, O, F, Si, P, S, Cl and Br. An atom of another element has no edges. The relaxed endpoints give two graphs. The decision depends on whether they differ. - **Different graphs.** The walks are the endpoints when both ends are minima (force below tolerance), neither is ``ambiguous``, each end has the graph of exactly one relaxed endpoint, and the two ends have different ones. Geometry is a diagnostic here: a conformer of the same graph is accepted as that endpoint. - **Equal graphs.** The graphs cannot separate the endpoints, and the geometry decides. Each relaxed endpoint gets a match ball of radius .. math:: R=\min\!\left(\frac{2\,\mathrm{tol}}{\lambda_{\min}},\ \tfrac12\,d_{RP}\right), where :math:`d_{RP}` is the labelled RMSD between the two relaxed endpoints. The first term bounds how far a quadratic minimum moves under a residual force :math:`\mathrm{tol}` in the maximum atomic force, twice over, since both the walk end and the relaxed endpoint can sit one residual from the true minimum. The walks are the endpoints when both ends are minima, each end lies inside the ball of one endpoint and is nearer to it than to the other, and the two ends belong to different endpoints. When the graphs are equal and :math:`d_{RP}` does not exceed the first term of at least one endpoint, the two endpoints are one minimum counted twice and neither test applies. The log prints ``ball=na`` and ``Endpoint connectivity: not applicable``. The ball test can also be inapplicable when the graphs differ. The log then prints ``ball=na`` and the graph test alone decides. Labels, as the log prints them: .. table:: +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | Label | Meaning | +====================+===========================================================================================================================+ | ``connected`` | The decision above succeeded. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``not connected`` | The walks finished and the decision failed. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``ambiguous`` | A walk end still has a negative mode. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``unresolved`` | The walk's wall clock (``--max-wall-seconds``) ran out before it finished. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``not applicable`` | Neither the graph test nor the ball test separates the endpoints. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``unavailable`` | No walk was produced: an endpoint did not relax, the saddle has no resolved negative curvature, or an oracle call failed. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ | ``skipped`` | ``--irc-certificate false``. | +--------------------+---------------------------------------------------------------------------------------------------------------------------+ How the verdict is assembled ---------------------------- The search ends converged when the measured force criterion holds, the saddle was evaluated on the oracle, and no index check that was requested refused it. The verdict then adds the other requirements: .. math:: \text{certified}=\text{converged}\ \wedge\ \text{discretization ok}\ \wedge\ \neg\,\text{walk rejects}\ \wedge\ \text{midpoint ok}\ \wedge\ \text{CI index ok} The discretization term is true unless ``--band-leak-bound`` or ``--band-certificate-force-scale`` was given and the band failed it. The midpoint and CI-index terms are true unless their switches were given and the check failed. The walk rejects only for ``not connected``: every other label, including ``ambiguous``, ``unresolved``, ``not applicable``, ``unavailable`` and ``skipped``, leaves the verdict unchanged. When a force-stop stencil was measured and is inconclusive, the verdict is ``unresolved``, whatever the other terms say. The process still exits with status 0, and the label must not be read as a pass. When the verdict is ``no`` the log gives one reason in parentheses, the first that applies: ``not converged``, ``band under-resolved at the ridge``, ``endpoint walks are not the reactant and the product``, ``a segment midpoint tops the climbing image``, ``climbing image not index-1``. Output ------ The log prints the verdict and its evidence: - ``Endpoint connectivity:`` with the label, then a detail line. It holds ``separation_A``, the two ball radii in Angstrom, :math:`\lambda_{\min}` of each endpoint, the distances of each walk end to each relaxed endpoint and to each deposited endpoint, the end forces in eV/Angstrom, the step and oracle-call counts, the energies in eV, and ``ball=yes|no|na|unresolved graph=yes|no|na|unresolved``. Four more lines list the bond graphs as sorted ``i-j`` pairs. - ``IRC profile:`` splits the walk's oracle calls into endpoint relaxation, endpoint checks, saddle stencil, descent, polish, end checks and final energies. ``IRC time:`` is its wall time. The walk's oracle calls are not part of the ``Oracle calls:`` totals; they are the ``calls=`` field on the detail line. - ``Certified:`` with the parenthesized reason when it is ``no``. ``irc_certificate.txt`` is a plain-text record, written to the observation archive directory (the current directory when the archive is off). It holds, one key per line: the format tag ``irc-certificate 1``, ``n_atoms``, ``atomic_numbers``, ``kick`` (the displacement along the mode), for each side the energy, maximum atomic force, step count and oracle-call count, the reactant and product energies, and the rows ``saddle``, ``mode``, ``forward`` and ``reverse`` with Cartesian coordinates in Angstrom. The numbers are decimal with 17 significant digits, which round-trip a double. A walk whose index was not measured ends with ``descent direction verified; index not measured``. The record is exact so that a second walk from the saved saddle can be compared with the first. The walk sets Eigen and OpenBLAS to one thread for that reason. There is no command-line replay. The unit test ``ReplayFromWrittenSaddleMatchesBitwise`` in ``tests/gpr/optimization/EndpointConnectivityTest.cpp`` checks, on an analytic double well, that the record round-trips and that a second walk from the saved saddle reproduces both ends bit for bit. A measured force-stop stencil is written to ``oracle-stencil.json`` beside ``--output`` (or to the ``--oracle-stencil`` path): the central difference rows in eV and eV/Angstrom, and the refinement probes with their bounds. Limits and assumptions ---------------------- - **Local and finite-difference.** Every claim holds at the tolerance and the stencil resolution of one geometry. A first-order, connected saddle is not shown to be the lowest saddle between the endpoints, nor the only one. The notes in :doc:`Scope of variance fitting and dimer convergence claims ` state the same boundary for the dimer: acceptance rests on measured forces and a resolved Hessian index, and neither proves that a search reaches a saddle from every start. - **The walk is an approximation to an IRC.** It is a steepest descent with an adaptive step followed by L-BFGS. The L-BFGS stage relaxes to a minimum and does not follow the reaction path. The ends are the minima reached from the two sides of the saddle, which equal the IRC minima only when the descent has left the saddle region into the right valley. - **The bond graph is a heuristic.** The radii table covers ten elements. Metals such as Mg have a mass in the walk and no radius, so their bonds are invisible, and noble-gas clusters have empty graphs, as in the how-to example. Equal graphs hand the decision to the ball test. - **The ball is a quadratic estimate.** Its first term is exact only for a harmonic minimum. For a soft endpoint :math:`\lambda_{\min}` is small, and the half-separation term then sets the radius. - **Masses.** The walk takes masses from the atomic numbers, not from the file. An element outside H, C, N, O, F, Mg, Si, P, S, Cl and Br gets 1 amu. - **The index is not part of the default verdict.** See the index section for the switches that make it so. - **Not the Morokuma driver.** ``gpr/irc/IRCDriver.h`` is a separate mass-weighted IRC driver (Morokuma predictor-corrector) with its own tests (``tests/gpr/irc/IRCDriverTest.cpp``). The certificate walk does not call it (``gpr/optimization/EndpointConnectivity.h`` does not include it), and a certificate says nothing about a path that driver follows. - **Cost.** The walk costs oracle calls of its own. On the five-atom example of the how-to the walk's detail line reports ``calls=178`` beside 17 calls for the search, and most of them (101 of 178) are end checks of the minima. The cost is small only when the oracle is cheap. Rows the search already holds are reused, and each geometry costs at most one call. Related ------- - :doc:`Get an IRC certificate for a saddle <../howto/irc_certificate>`: run and read the check. - :doc:`IRC walk protocol <../reference/irc_protocol>`: the step rules in detail and the measurement session that motivated them. - :doc:`The surrogate loop `: why the surrogate never judges its own result. - :doc:`How GPRidge finds a saddle `: the search that precedes the walk.