Atomic dimer. More...
#include <gpr/AtomicDimer.h>
Classes | |
| struct | DimerPhaseRecord |
| One entry of the dimer trajectory history – the midpoint configuration and dimer curvature estimate at the end of one relaxation phase. More... | |
| struct | VarianceGateConfig |
Public Member Functions | |
| AtomicDimer () | |
| Default constructor. | |
| virtual | ~AtomicDimer () |
| void | initialize (const gpr::InputParameters ¶meters, const gpr::Observation &initial_data, const gpr::Observation &middle_point, const gpr::Coord &initial_orientation, const gpr::AtomsConfiguration &init_atom_config) |
| Initilalize with initial data. | |
| void | setAtomsConfiguration (const gpr::AtomsConfiguration &_atoms_config) |
| Set configuration of the atoms. | |
| void | execute (pot::PotentialWrapper &general_potential) |
| This function uses the atomic GP-dimer method to converge to a saddle point, starting from somewhere inside the convergence area. | |
| void | setSecantHessianConfig (const gpr::optim::SecantHessianConfig &config) |
| Replace the true-force secant and drop its history. | |
| void | setSecantOrientationSeed (bool enabled) noexcept |
| const gpr::optim::SecantHessian & | secantHessian () const noexcept |
| gpr::optim::SecantCurvatureCounts | secantCounts () const |
| gpr::optim::SecantCurvatureCounts | secantLedger () const noexcept |
| Pair, probe and rejection counts, without the GP's quadratic-mean uses. | |
| void | setMaxWallSeconds (double seconds) |
| Set a wall-clock cap measured from this call. Non-positive disables. | |
| void | setWallClockLimit (std::shared_ptr< const gpr::WallClockLimit > limit) |
| Share an enclosing deadline (used by OCI-NEB and deterministic tests). | |
| void | setTrainingPolicy (const gpr::policy::TrainingPolicy *policy) |
| Not owned. The pointer must outlive execute(). Null is the engine. | |
| void | setTrainingPolicy (std::shared_ptr< const gpr::policy::TrainingPolicy > policy) |
| Keeps a Python adapter alive for execute(), which releases the GIL. | |
| bool | wallClockLimitReached () const |
| void | stopForWallClockLimit () |
| bool | certifyStoppedForce (pot::PotentialWrapper &potential, double step, int &calls) |
| void | setForceStopCertificateStep (double step) noexcept |
| void | setVibrationalStencil (gpr::optim::VibrationalStencil mode) noexcept |
| gpr::optim::VibrationalStencil | vibrationalStencil () const noexcept |
| double | forceStopCertificateStep () const noexcept |
| bool | getForceStopCertified () const noexcept |
| Whether the last execute() certified its force stop as index one. | |
| int | getForceStopCertificateCalls () const noexcept |
| bool | hasValidAtomsConfiguration () |
| Whether the atoms configuration holds the moving-atom set that execute() needs. | |
| double | getFinalRotationAngle () const noexcept |
| Min-mode rotational angle omega (radians) at the converged midpoint, or NaN if no converged phase recorded it. A small omega means the dimer axis is aligned with the true lowest-curvature eigenvector, so the caller can certify a flat saddle on angle + negative curvature rather than force alone. | |
| double | getLatestModeCurvature () const noexcept |
| Latest min-mode curvature from a dimer rotation. The force-stop stencil records the returned curvature separately in getFinalCurvature(). | |
| const gpr::Observation & | finalMidpoint () const noexcept |
| Midpoint recorded at the end of execute(). | |
| bool | isMinModeAngleCertified () const noexcept |
| True iff the converged min-mode is angle-certified: a converged phase recorded a finite rotation omega within the dimer's own true-PES rotation tolerance (stop_citeria_dimer.angle_rotation) AND the converged curvature is negative (a real saddle direction). Uses the tolerance the dimer already rotated to – no new constant. | |
| double | getFinalRotationResidual () const noexcept |
| bool | measuredModeIsCertified () const noexcept |
| bool | terminalModeIsReady () const noexcept |
| void | refineMeasuredModeCurvature (const gpr::Observation &midpoint, const gpr::Coord &orientation, pot::PotentialWrapper &potential, double surrogate_curvature) |
| Eigen::VectorXd | getFinalGradientAtMidPoint () const |
| Return the final gradient dE/dR at the middle point. | |
| Eigen::VectorXd | getFinalForceAtMidPoint () const |
| Deprecated alias of getFinalGradientAtMidPoint(). | |
| double | getFinalForceNormForConvergence () const |
| Return final force in the configured convergence norm. | |
| Eigen::VectorXd | getFinalCoordOfMidPoint () const |
| Return final coordinates of the middle point. | |
| bool | restartFromHigherOrderPoint (const Eigen::MatrixXd &cartesian_hessian, const Eigen::VectorXd &kick, const gpr::Observation &measured_rows, pot::PotentialWrapper &potential) |
| bool | refineSaddleFromMeasuredHessian (const Eigen::MatrixXd &cartesian_hessian, pot::PotentialWrapper &potential, double resolution=0.0) |
| bool | refineSaddleFromMeasuredHessian (const Eigen::MatrixXd &cartesian_hessian, pot::PotentialWrapper &potential, gpr::Observation *raw_candidate, double resolution=0.0, bool complete_stencil=false) |
| bool | commitExternallyCertifiedRefinement (const gpr::Observation &raw_center, const Eigen::MatrixXd &certified_cartesian_hessian, const Eigen::MatrixXd &certified_mass_weighted_basis, bool first_order_certificate) |
| bool | hasUnconditionedObservations () const noexcept |
| bool | restartAlongWeakMode (const Eigen::VectorXd &direction, double length, const gpr::Observation &measured_rows, pot::PotentialWrapper &potential) |
| bool | restartAlongWeakMode (const Eigen::VectorXd &direction, double length, const gpr::Observation &measured_rows, pot::PotentialWrapper &potential, const Eigen::MatrixXd &cartesian_hessian) |
| gpr::Index_t | getTotalForceCalls () const |
| Return the total number of force calls. | |
| bool | measureCurvatureProbes (const gpr::Coord &positions, pot::PotentialWrapper &potential, gpr::Observation &raw) |
| gpr::Index_t | getTotalGPRForceCalls () const |
| Return the total number of force calls. | |
| gpr::Index_t | getIterations () const |
| Return the total number of cycles. | |
| double | getFinalEnergy () const |
| Return final energy. | |
| double | getFinalCurvature () const |
| Return final curvature. | |
| bool | getConverged () const |
| Return true when the final force convergence criterion is met. | |
| double | getMaxStepLength () const |
| The bound of one translation step in Cartesian length (Angstrom). | |
| double | getConvergenceForce () const noexcept |
| Force norm below which the dimer search is converged. | |
| void | setConvergenceForce (double force) |
| Replace the configured true-PES force criterion and the live stop. | |
| double | convergenceForceNorm (const Eigen::Ref< const Eigen::RowVectorXd > &positions, const Eigen::Ref< const Eigen::RowVectorXd > &gradient) const |
| gradient in the norm the convergence test applies at positions. | |
| const gpr::Coord & | getFinalOrientation () const |
| Return final orientation of the dimer. | |
| const std::vector< DimerPhaseRecord > & | getPhaseHistory () const noexcept |
| Return the per-phase dimer trajectory history. | |
| DimerRelaxationTerminationReason | getRelaxationTerminationReason () const noexcept |
| Eigen::MatrixXd | getMeasuredIndexZeroHessian () const |
| double | getMeasuredIndexZeroResolution () const |
| Eigen::MatrixXd | gpMeanHessianAtMidpoint () |
| DimerSurrogateActionCertificate | previewFirstSurrogateAction (const gpr::Observation &oracle_middle_point, const gpr::Coord &initial_orientation) |
| const DimerSurrogateActionCertificate & | getFirstSurrogateActionCertificate () const noexcept |
| gpr::Coord & | getMidPointCoordForAllObservationPointsRef () |
| Return gpr::Coordinates of all observed points. | |
| gpr::FieldMatrixd & | getEnergyForAllObservationPointsRef () |
| Return energies for all observed points. | |
| gpr::Coord & | getGradientForAllObservationPointsRef () |
| Return gradients for all observed points. | |
| gpr::GaussianProcessRegression * | getGPRModel () |
| Get GPR model. | |
| void | preserveSeedKernel () noexcept |
| Retain an imported kernel's parameters and absolute energy origin. | |
| void | attachExternalGP (gpr::GaussianProcessRegression *external_gp) noexcept |
| Attach an externally-owned GPR model. Must be called BEFORE ~initialize~. The dimer will use this GP for all predict, refit, Cholesky and variance calls, and will NOT call its ~initialize(parameters, atoms_config)~ entry (the external owner has already done that). The dimer takes no ownership: the GP is not deleted in the destructor. Use case: ~OCINEBController~ shares the long-lived ~ActiveLearningSession::gp~ across NEB outer iters and MMF bursts so the singleton ~DistributedState~ distributed factor stays coherent across phases. | |
| gpr::Index_t | getNumNewObservations () const |
| Number of accurate (general-potential) observations the dimer accumulated during ~execute~. Equals ~all_obs.E.rows() - N_obs_init~. The caller can pair this with ~getMidPointCoordForAllObservationPointsRef~ / ~getEnergyForAllObservationPointsRef~ / ~getGradientForAllObservationPointsRef~ to harvest the new rows back into a shared ~session.training_obs~ buffer. Energies are relative to ~getEnergyZeroLevel()~ as documented above. | |
| gpr::Index_t | getInitialObservationCount () const |
| Index of the first row in ~all_obs~ that the dimer appended during ~execute~. Pair with ~getNumNewObservations~ for harvest bookkeeping. | |
| gpr::FieldMatrixd | getEnergyZeroLevel () const |
| Internal E_zero_level used by the dimer's cutOffEnergy bookkeeping. The energies returned by ~getEnergyForAllObservationPointsRef~ and ~getFinalEnergy~ are relative to this value, not absolute PES energies. Add E_zero_level back to recover the absolute energy. | |
| void | callGeneralPotentialFromEON (const gpr::vector3_reg(&cell_dimensions)[3], gpr::Observation &mid_point, pot::PotentialWrapper &potential) |
| Call for a potential defined in a Matter object. | |
| bool | isFinalConvergenceReached (const gpr::Observation &middle_point, const double stop_criteria) |
| Final convergence test for force. | |
| bool | isRotationalConvergenceReached (const gpr::Coord &orient, gpr::Observation &middle_point) |
| Rotational convergence test. | |
| bool | isApproximateRotationalConvergenceReached (const gpr::Coord &orient, const gpr::Observation &approx_obs, const double stop_criteria) |
| GP-stencil rotational convergence test. | |
| bool | rotateDimer (const double stop_criteria, gpr::Coord &orient, gpr::LBFGSInfo &rot_info, gpr::Observation &middle_point, gpr::Observation &approx_obs) |
| Rotate the dimer. | |
| void | translateDimer (const gpr::Observation &middle_point, const gpr::Coord &orient, const gpr::Observation &approx_obs, const double curvature, gpr::LBFGSInfo &trans_info, gpr::Coord &R_new) |
| Translate the dimer. | |
| bool | updateActiveFrozenAtoms (const gpr::Coord &R_new, gpr::LBFGSInfo &rot_info, gpr::LBFGSInfo &trans_info) |
| Update active frozen atoms. | |
| void | setVarianceGateConfig (const VarianceGateConfig &cfg) noexcept |
| const VarianceGateConfig & | getVarianceGateConfig () const noexcept |
| void | setVarianceAcceptTau (double tau) noexcept |
| void | writeTraceFrame (const gpr::Observation &obs, const std::string &phase, size_t idx) |
| void | archiveObservations (const gpr::Observation &obs) noexcept |
| double | getVarianceAcceptTau () const noexcept |
| void | setVarianceAcceptTauRelative (double tau_relative) noexcept |
| double | getVarianceAcceptTauRelative () const noexcept |
| gpr::Index_t | getVarianceSkippedAccurateCalls () const noexcept |
| gpr::Index_t | getImspeSoftSkippedCalls () const noexcept |
| gpr::Index_t | getImspeFixedThetaRefreshCalls () const noexcept |
| gpr::Index_t | getFixedThetaRefreshCalls () const noexcept |
| gpr::Index_t | getImspeAdmittedNearDuplicateObservations () const noexcept |
| gpr::Index_t | getDedupRejectedObservations () const noexcept |
| void | setAlignmentAbortTol (double tol) noexcept |
| void | setAbortOnDegenerateProbes (bool enabled) noexcept |
| void | setMaxOracleCalls (gpr::Index_t calls) noexcept |
| gpr::Index_t | maxOracleCalls () const noexcept |
| void | setIndexFrequencyResolution (double wavenumber) noexcept |
| double | indexFrequencyResolution () const noexcept |
| void | setRejectHigherIndexSurrogateConvergence (bool enabled) noexcept |
| See want_second_negative_mode_. | |
| bool | measuredIndexRecoveryEnabled () const noexcept |
| void | setExternalTerminalCertificate (bool enabled) noexcept |
| Eigen::Index | lastNegativeModeCount () const noexcept |
| void | setMeasuredEnergyCeiling (double ceiling) noexcept |
| void | setSaddleEnergyFloor (double floor) noexcept |
| bool | lastRefinementReachedIndexOne () const noexcept |
| void | setAbortOnInteratomicCollapse (bool enabled) noexcept |
| void | setPreserveInitialAlignmentReference (bool enabled) noexcept |
| void | setLikelihoodNoiseFloorSigma2 (double floor_sigma2) noexcept |
| void | setSelfOwnedModelProfile (gpr::GPModelProfile profile) noexcept |
| void | setSelfOwnedUseZblPriorMean (bool use) noexcept |
| void | setSelfOwnedUseFfPriorMean (bool use) noexcept |
| double | getAlignmentAbortTol () const noexcept |
| void | setLeashRelaxWhenClose (bool enabled) noexcept |
| bool | getLeashRelaxWhenClose () const noexcept |
| void | setEvaluateImage1EachPhase (bool enabled) noexcept |
| bool | getEvaluateImage1EachPhase () const noexcept |
| void | setConvergenceForceNorm (int norm_type) noexcept |
| void | setProjectRigidModesForConvergence (bool enabled) noexcept |
| void | setOracleBatchChunk (Eigen::Index chunk) noexcept |
| Eigen::Index | getOracleBatchChunk () const noexcept |
| void | setProfilePhaseTiming (bool enabled) noexcept |
| bool | getProfilePhaseTiming () const noexcept |
| void | setProfileDimerTimes (bool enabled) noexcept |
| bool | getProfileDimerTimes () const noexcept |
| void | setUseHssvdAnalyticCurvature (bool enabled) noexcept |
| bool | getUseHssvdAnalyticCurvature () const noexcept |
| void | setHssvdModeSelectionPolicy (HssvdModeSelectionPolicy policy) noexcept |
| gpr::Index_t | activeSetChangeCount () const noexcept |
| gpr::Index_t | activeFrozenCount () const noexcept |
| void | setHdf5TracePath (const std::string &path) |
| void | setUncertaintyAwareRotation (bool enabled) noexcept |
| void | setProjectMeasuredRotations (bool enabled) noexcept |
| void | setKappaDimer (double beta) |
| double | kappaDimerBeta () const noexcept |
| const std::string & | getHdf5TracePath () const noexcept |
| void | setHdf5TraceEnabled (bool enabled) |
| bool | hdf5TraceEnabled () const noexcept |
Public Attributes | |
| gpr::AtomsConfiguration | atoms_config |
Friends | |
| gpr::PublicLayoutBytes | gpr::libraryPublicLayout () |
| gpr::PublicLayoutBytes | gpr::consumerPublicLayout () |
Atomic dimer.
Definition at line 656 of file AtomicDimer.h.
| atmd::AtomicDimer::AtomicDimer | ( | ) |
Default constructor.
Definition at line 560 of file AtomicDimer.cpp.
|
virtual |
Definition at line 590 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2510 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2506 of file AtomicDimer.h.
|
inlinenoexcept |
Persist every row of obs to the observation archive when one is attached; a no-op otherwise. Never gates the science path.
Definition at line 2223 of file AtomicDimer.h.
|
noexcept |
Attach an externally-owned GPR model. Must be called BEFORE ~initialize~. The dimer will use this GP for all predict, refit, Cholesky and variance calls, and will NOT call its ~initialize(parameters, atoms_config)~ entry (the external owner has already done that). The dimer takes no ownership: the GP is not deleted in the destructor. Use case: ~OCINEBController~ shares the long-lived ~ActiveLearningSession::gp~ across NEB outer iters and MMF bursts so the singleton ~DistributedState~ distributed factor stays coherent across phases.
Idempotent: passing nullptr restores the legacy self-owned path (which ~initialize~ will then lazily allocate).
Definition at line 597 of file AtomicDimer.cpp.
| void atmd::AtomicDimer::callGeneralPotentialFromEON | ( | const gpr::vector3_reg(&) | cell_dimensions[3], |
| gpr::Observation & | mid_point, | ||
| pot::PotentialWrapper & | potential ) |
Call for a potential defined in a Matter object.
| cell_dimensions | Dimensions of the cell in EON 9 element format |
| mid_point | The point on which to obtain the potential |
| potential | The potential wrapper used for the evaluation |
Definition at line 6448 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::certifyStoppedForce | ( | pot::PotentialWrapper & | potential, |
| double | step, | ||
| int & | calls ) |
One Cartesian stencil after the force loop has stopped, then a min-mode escape when that stencil is higher-order. calls counts those evaluations, which go through the search's counted and budgeted oracle path. True only when a measured stencil certifies a first-order saddle; an unmeasured stop is uncertified.
Definition at line 6502 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::commitExternallyCertifiedRefinement | ( | const gpr::Observation & | raw_center, |
| const Eigen::MatrixXd & | certified_cartesian_hessian, | ||
| const Eigen::MatrixXd & | certified_mass_weighted_basis, | ||
| bool | first_order_certificate ) |
Commit the same endpoint under the caller's complete first-order certificate and mass-weighted physical frame. The caller establishes matching oracle, cell, atom order and complete allowed coordinate space. The frame may be nonorthonormal; its mass-weighted Gram matrix selects the mode, which is reported as a Cartesian unit direction and Rayleigh curvature. This performs no evaluation, archive write, training admission or posterior fit. Raw energies are absolute and must roundtrip exactly through the retained energy gauge; the retained endpoint remains unconditioned in the GP. With initialized MPI this is collective: one rank's refusal prevents every rank's commit.
Definition at line 3470 of file AtomicDimer.cpp.
|
inlinenodiscard |
gradient in the norm the convergence test applies at positions.
Definition at line 1072 of file AtomicDimer.h.
| void atmd::AtomicDimer::execute | ( | pot::PotentialWrapper & | general_potential | ) |
This function uses the atomic GP-dimer method to converge to a saddle point, starting from somewhere inside the convergence area.
The relaxation of the dimer on the approximated energy surface is done according to a dimer method, where a rotation step rotates the dimer (a pair of images) towards its minimum energy orientation to find the lowest curvature mode of the potential energy and translation step moves the dimer towards the saddle point by inverting the force component in the direction of the dimer. After each relaxation phase, the energy and gradient are acquired at the middle point of the dimer, and the GP hyperparameters are reoptimized.
| general_potential | Reference to a class of general potential or to the object of Matter class (in a case of coupling with EON) |
Definition at line 8950 of file AtomicDimer.cpp.
|
inlinenoexcept |
Midpoint recorded at the end of execute().
Definition at line 845 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 790 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2427 of file AtomicDimer.h.
|
inlinenodiscard |
Return true when the final force convergence criterion is met.
Definition at line 136 of file AtomicDimer.inl.
|
inlinenodiscardnoexcept |
Force norm below which the dimer search is converged.
Definition at line 1060 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Number of freshly oracled rows the dimer rejected as EMD near-duplicates of an existing observation during ~execute~. A degenerate probe carries no conditioning information; a run of them is what the early-handback criterion watches.
Definition at line 2281 of file AtomicDimer.h.
|
inline |
Return energies for all observed points.
Return energies for all observation points.
Definition at line 155 of file AtomicDimer.inl.
|
inlinenodiscard |
Internal E_zero_level used by the dimer's cutOffEnergy bookkeeping. The energies returned by ~getEnergyForAllObservationPointsRef~ and ~getFinalEnergy~ are relative to this value, not absolute PES energies. Add E_zero_level back to recover the absolute energy.
Required by the OCINEB controller when harvesting the dimer's all_obs into a shared training_obs that the NEB expects to hold absolute PES energies.
Definition at line 1243 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2452 of file AtomicDimer.h.
|
inlinenodiscard |
Return final coordinates of the middle point.
Definition at line 98 of file AtomicDimer.inl.
|
inlinenodiscard |
Return final curvature.
Definition at line 131 of file AtomicDimer.inl.
|
inlinenodiscard |
Return final energy.
Definition at line 126 of file AtomicDimer.inl.
|
inlinenodiscard |
Deprecated alias of getFinalGradientAtMidPoint().
Despite the name it returns the gradient, not the force. Kept so existing callers keep their values; use the gradient name, or negate the result for the force.
Definition at line 88 of file AtomicDimer.inl.
|
inlinenodiscard |
Return final force in the configured convergence norm.
Definition at line 93 of file AtomicDimer.inl.
|
inlinenodiscard |
Return the final gradient dE/dR at the middle point.
The dimer stores gradients, so this is the negative of the force.
Definition at line 78 of file AtomicDimer.inl.
|
inlinenodiscard |
Return final orientation of the dimer.
Definition at line 141 of file AtomicDimer.inl.
|
inlinenoexcept |
Min-mode rotational angle omega (radians) at the converged midpoint, or NaN if no converged phase recorded it. A small omega means the dimer axis is aligned with the true lowest-curvature eigenvector, so the caller can certify a flat saddle on angle + negative curvature rather than force alone.
Definition at line 829 of file AtomicDimer.h.
|
inlinenoexcept |
Measured eigen-residual of the terminal mode in the convergence force norm: the gradient difference across the dimer after removing its component along the mode. Infinite until a converged phase records it.
Definition at line 865 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 1158 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2268 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Oracle evaluations the last execute() spent on its force-stop certificate, including escapes. They are part of getNumEvaluations().
Definition at line 801 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Whether the last execute() certified its force stop as index one.
Definition at line 795 of file AtomicDimer.h.
|
inline |
|
inline |
Return gradients for all observed points.
Return gradients for all observation points.
Definition at line 164 of file AtomicDimer.inl.
|
inlinenodiscardnoexcept |
Definition at line 2542 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2272 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2264 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2260 of file AtomicDimer.h.
|
inlinenodiscard |
Index of the first row in ~all_obs~ that the dimer appended during ~execute~. Pair with ~getNumNewObservations~ for harvest bookkeeping.
Definition at line 1227 of file AtomicDimer.h.
|
inlinenodiscard |
Return the total number of cycles.
This is essentially the number of relaxation phases
Definition at line 121 of file AtomicDimer.inl.
|
inlinenoexcept |
Latest min-mode curvature from a dimer rotation. The force-stop stencil records the returned curvature separately in getFinalCurvature().
Definition at line 839 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2444 of file AtomicDimer.h.
|
inlinenodiscard |
The bound of one translation step in Cartesian length (Angstrom).
Definition at line 1055 of file AtomicDimer.h.
|
inlinenodiscard |
Cartesian Hessian of the complete measured expansion at the midpoint a MeasuredIndexZero relaxation stopped on, rigid directions zero. Empty after any other termination.
Definition at line 1125 of file AtomicDimer.h.
|
inlinenodiscard |
Empirical resolution in the mass-weighted physical space of the walk (eV/(A^2 amu)); zero after any other termination.
Definition at line 1136 of file AtomicDimer.h.
|
inline |
Return gpr::Coordinates of all observed points.
Definition at line 146 of file AtomicDimer.inl.
|
inlinenodiscard |
Number of accurate (general-potential) observations the dimer accumulated during ~execute~. Equals ~all_obs.E.rows() - N_obs_init~. The caller can pair this with ~getMidPointCoordForAllObservationPointsRef~ / ~getEnergyForAllObservationPointsRef~ / ~getGradientForAllObservationPointsRef~ to harvest the new rows back into a shared ~session.training_obs~ buffer. Energies are relative to ~getEnergyZeroLevel()~ as documented above.
Definition at line 1215 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2472 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Return the per-phase dimer trajectory history.
Definition at line 1110 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2489 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2481 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 1117 of file AtomicDimer.h.
|
inlinenodiscard |
Return the total number of force calls.
Definition at line 108 of file AtomicDimer.inl.
|
inlinenodiscard |
Return the total number of force calls.
Definition at line 113 of file AtomicDimer.inl.
|
inlinenodiscardnoexcept |
Definition at line 2497 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2238 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2252 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2180 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2256 of file AtomicDimer.h.
|
nodiscard |
Hessian of the fitted posterior mean at the final midpoint, on all 3N Cartesian coordinates (eV/A^2), symmetrized; empty without a fitted model or a midpoint. No oracle call: the surrogate's own curvature, which proposes where a measurement should look.
Definition at line 2927 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Retained measurements require conditioning before a posterior can represent the current observed data. The raw model accessor exposes its existing fitted state independently of the measured final point.
Definition at line 991 of file AtomicDimer.h.
|
inlinenodiscard |
Whether the atoms configuration holds the moving-atom set that execute() needs.
execute() returns without searching when this is false; callers that bind the dimer to another language use it to report that as an error.
Definition at line 813 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2554 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2326 of file AtomicDimer.h.
| void atmd::AtomicDimer::initialize | ( | const gpr::InputParameters & | parameters, |
| const gpr::Observation & | initial_data, | ||
| const gpr::Observation & | middle_point, | ||
| const gpr::Coord & | initial_orientation, | ||
| const gpr::AtomsConfiguration & | init_atom_config ) |
Initilalize with initial data.
| parameters | Structure of parameters from the input file |
| initial_data | Initial observation (energy, gradients, positions) |
| middle_point | Initial observation at the middle point (energy, gradients, positions) |
| initial_orientation | Initial orientation of the dimer |
| init_atom_config | Structure with initial configuration of atoms |
Definition at line 25 of file AtomicDimerInit.cpp.
| bool atmd::AtomicDimer::isApproximateRotationalConvergenceReached | ( | const gpr::Coord & | orient, |
| const gpr::Observation & | approx_obs, | ||
| const double | stop_criteria ) |
GP-stencil rotational convergence test.
Evaluates the same finite-dimer angle equation used by the rotation optimizer on an approximate midpoint/image-1 stencil.
Definition at line 4148 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::isFinalConvergenceReached | ( | const gpr::Observation & | middle_point, |
| const double | stop_criteria ) |
Final convergence test for force.
Compares forceNormForConvergence of the midpoint gradient to stop_criteria (T_dimer). The default norm is L2 of the full gradient vector (ConvergenceNormType::L2_NORM). Linf and per-atom max are selectable; they are not the default.
| middle_point | The current mid-point of the configuration |
| stop_criteria | The final convergence threshold |
Definition at line 1577 of file AtomicDimer.cpp.
|
inlinenoexcept |
True iff the converged min-mode is angle-certified: a converged phase recorded a finite rotation omega within the dimer's own true-PES rotation tolerance (stop_citeria_dimer.angle_rotation) AND the converged curvature is negative (a real saddle direction). Uses the tolerance the dimer already rotated to – no new constant.
Definition at line 857 of file AtomicDimer.h.
| bool atmd::AtomicDimer::isRotationalConvergenceReached | ( | const gpr::Coord & | orient, |
| gpr::Observation & | middle_point ) |
Rotational convergence test.
| orient | Current dimer orientation |
| middle_point | Current midpoint observation, including its gradient |
Definition at line 4124 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2537 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2347 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Whether the last measured partitioned-RFO refinement ended on an index-one model inside the force tolerance.
Definition at line 2371 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Definition at line 2313 of file AtomicDimer.h.
| bool atmd::AtomicDimer::measureCurvatureProbes | ( | const gpr::Coord & | positions, |
| pot::PotentialWrapper & | potential, | ||
| gpr::Observation & | raw ) |
Measure an all-moving Cartesian probe batch, one geometry per row. Every rank participates; the root supplies the positions and each point has one owner. Scalar engine calls preserve pointwise values. A batch that exceeds the remaining oracle budget makes no calls. Successful raw rows retain absolute energies and physical gradients in the archive without entering the GP training set. Refusal or an owner failure clears raw; every attempted point is still counted.
Definition at line 7521 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2335 of file AtomicDimer.h.
|
noexcept |
The recorded terminal mode has negative curvature and either its rotation angle is within the angle tolerance or the measured rotation sequence at its midpoint stopped lowering the residual.
Definition at line 1652 of file AtomicDimer.cpp.
|
inlinenoexcept |
Retain an imported kernel's parameters and absolute energy origin.
Definition at line 1184 of file AtomicDimer.h.
|
nodiscard |
Evaluate exactly one GP-surrogate relaxation action without invoking the accurate potential. The initialized dimer parameters, model, observation set, force norm, and trust/globalization policy are all reused.
Definition at line 5728 of file AtomicDimer.cpp.
| void atmd::AtomicDimer::refineMeasuredModeCurvature | ( | const gpr::Observation & | midpoint, |
| const gpr::Coord & | orientation, | ||
| pot::PotentialWrapper & | potential, | ||
| double | surrogate_curvature ) |
Refine the measured mode curvature with a second image at twice the dimer separation when the single forward difference is within the surrogate's disagreement with it; one oracle call.
Definition at line 1680 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::refineSaddleFromMeasuredHessian | ( | const Eigen::MatrixXd & | cartesian_hessian, |
| pot::PotentialWrapper & | potential, | ||
| double | resolution = 0.0 ) |
From a converged midpoint whose complete stencil shows a soft second negative mode (a weak mode resolved by the refinement, or a coarse curvature within twice the resolution): the force along it stays below the convergence threshold over displacements far longer than a dimer step, so a force-driven search stops anywhere on that ridge. Starting from the measured cartesian_hessian (eV/A^2), partitioned rational-function steps on the oracle maximize along the lowest mode and minimize along all others, with a Bofill update of a mass-weighted model from each measured gradient, rigid motion projected at the current geometry, and a Cartesian trust radius that starts at the translation limit. The two-sided defect of the modelled energy change over the clamped step, beyond the energy a force at the convergence threshold makes over the step in the configured norm, scores each step under the scale-free trust-region thresholds: a low score rejects the step and halves the radius, a high score after a clamped step restores it. The translation limit bounds the whole step on an inferred model. With complete_stencil, for a Hessian measured on every coordinate, it bounds the largest atomic displacement of the step, so the radius may reach the length at which the most displaced atom moves by the limit. After a rejected step, and before an index-one model ends the walk, the model's two lowest modes, and every further mode whose curvature lies within resolution (eV/(A^2 amu), the empirical resolution of the measurement that produced the Hessian) of zero, are measured by one Hessian action each at the dimer separation. With a positive resolution the walk was seeded by a complete stencil and ends at one, so an index-one model is then tested by the stencil's own four-point difference along the two steering modes (eight calls): a second curvature that is negative beyond its truncation error keeps the walk going. The walk takes the dimer's outer-iteration limit and oracle budget. It stops once the measured model has index one and the force is inside the tolerance, when the radius falls below coordinate resolution, or at the saddle energy floor; the floor and a walk without a step return false and leave the midpoint to the order-one restart, every other end hands the end point to the next search. One oracle call per step; the probes stay out of the training set, the end point becomes its only new row, and the next execute starts from it along the model's lowest mode.
Definition at line 2940 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::refineSaddleFromMeasuredHessian | ( | const Eigen::MatrixXd & | cartesian_hessian, |
| pot::PotentialWrapper & | potential, | ||
| gpr::Observation * | raw_candidate, | ||
| double | resolution = 0.0, | ||
| bool | complete_stencil = false ) |
Return the exact raw oracle endpoint in packed moving coordinates when an index-one refinement ends strictly inside the force tolerance. This measurement carries no physical-frame or terminal certificate; the two-argument overload retains the same walk and handoff behavior.
Definition at line 2948 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::restartAlongWeakMode | ( | const Eigen::VectorXd & | direction, |
| double | length, | ||
| const gpr::Observation & | measured_rows, | ||
| pot::PotentialWrapper & | potential ) |
The complete stencil cannot certify the weak modes of the converged midpoint positive. The curvature of the softest weak mode changes along the flat valley it spans; the search continues from the point length along the unit Cartesian direction, signed so that the curvature rises. The refinement rows become training rows, the moved point is measured, and the next execute starts from it. A supplied Cartesian Hessian carries a measured negative subspace into fresh index probes before the search returns for a complete stencil.
Definition at line 3659 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::restartAlongWeakMode | ( | const Eigen::VectorXd & | direction, |
| double | length, | ||
| const gpr::Observation & | measured_rows, | ||
| pot::PotentialWrapper & | potential, | ||
| const Eigen::MatrixXd & | cartesian_hessian ) |
Definition at line 3668 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::restartFromHigherOrderPoint | ( | const Eigen::MatrixXd & | cartesian_hessian, |
| const Eigen::VectorXd & | kick, | ||
| const gpr::Observation & | measured_rows, | ||
| pot::PotentialWrapper & | potential ) |
From a converged midpoint the complete stencil shows to be a higher-order saddle: retain the measured rows along its weak negative mode, refit, and run the order-one search on the surrogate from the stencil Hessian (Cartesian, eV/A^2), started one stencil separation along kick on the side the surrogate ranks lower. The returned point is measured, and the next execute starts from it.
Definition at line 2813 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::rotateDimer | ( | const double | stop_criteria, |
| gpr::Coord & | orient, | ||
| gpr::LBFGSInfo & | rot_info, | ||
| gpr::Observation & | middle_point, | ||
| gpr::Observation & | approx_obs ) |
Rotate the dimer.
Definition at line 4168 of file AtomicDimer.cpp.
|
nodiscard |
Definition at line 840 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Definition at line 724 of file AtomicDimer.h.
|
inlinenodiscardnoexcept |
Pair, probe and rejection counts, without the GP's quadratic-mean uses.
Definition at line 731 of file AtomicDimer.h.
|
inlinenoexcept |
Abort the search after ~kMaxConsecutiveDegenerateProbes~ EMD near-duplicate probes even without an alignment reference. The burst gets this through its alignment tolerance; a standalone search (the index-certificate escape) has no reference axis but the same degenerate-probe loop: the surrogate reports convergence at a point whose row it already holds, the oracle disagrees, and every re-measurement coalesces into that row.
Definition at line 2301 of file AtomicDimer.h.
|
inlinenoexcept |
Abort the search when a measured midpoint's shortest interatomic distance drops below ~ratio_at_limit~ times the seed's: the canonical gprd bound on interatomic distances, applied to the measured trajectory. A standalone search on a surrogate that does not hold its rows can slide into a repulsive wall phase after phase (10_tetrazine: 300 phases to 336 eV/A); the bound ends it at the first measured collapse.
Definition at line 2382 of file AtomicDimer.h.
|
inlinenoexcept |
Alignment-governed termination tolerance alpha_tol. When > 0, each outer dimer phase computes alpha = abs(dot(d, tau)) between the current dimer axis and the axis that initialized the burst. The burst terminates when alpha drops below this tolerance. <= 0 disables the check.
Definition at line 2290 of file AtomicDimer.h.
|
inline |
Set configuration of the atoms.
| _atoms_config | A reference configuration |
Definition at line 178 of file AtomicDimer.inl.
|
inline |
Replace the configured true-PES force criterion and the live stop.
Definition at line 1065 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2456 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2448 of file AtomicDimer.h.
|
inlinenoexcept |
Hand a force-converged point with a measured negative direction to the caller's complete-Hessian certificate without rotating its mode. The caller must resolve the index before accepting the saddle.
Definition at line 2343 of file AtomicDimer.h.
|
inlinenoexcept |
Displacement of the index stencil execute() measures at a force stop before it reports convergence. Defaults to defaultStencilStep(). Zero, or setExternalTerminalCertificate(true), hands the certificate to the caller: execute() then reports the force stop, and the caller must certify it before claiming a saddle.
Definition at line 774 of file AtomicDimer.h.
|
inline |
Definition at line 2550 of file AtomicDimer.h.
|
inline |
Definition at line 2514 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2501 of file AtomicDimer.h.
|
inlinenoexcept |
Wavenumber (cm^-1) below which a mode counts as flat in the in-search index test: a measured curvature softer than this displacement's curvature at that wavenumber neither refuses the midpoint nor is followed. The independent validation reports such modes as unresolved at the same value.
Definition at line 2322 of file AtomicDimer.h.
| void atmd::AtomicDimer::setKappaDimer | ( | double | beta | ) |
Xiao contour force at nonnegative dimer curvature; the ordinary dimer force once the curvature along the dimer is negative.
Definition at line 4335 of file AtomicDimer.cpp.
|
inlinenoexcept |
When set, the band-tangent alignment-abort leash is suspended once the dimer is close to its force criterion (largest force component under twice the dimer convergence force). The controller enables this only for bursts where the band tangent is an unreliable saddle-mode seed – the GP is over-confident-but-inaccurate at the CI, or the CI has reached the adaptive acceptance threshold. Far from the saddle the leash still holds, so a burst cannot wander onto a wrong saddle while the force is large; near the saddle the dimer is free to rotate onto the true local mode (which legitimately diverges from the coarse chain tangent).
Definition at line 2440 of file AtomicDimer.h.
|
inlinenoexcept |
Likelihood noise floor (sigma_n^2, energy units squared) applied after every internal hyperparameter refit. The dimer's rows come from the same oracle as the caller's session GP, so its likelihood must carry the same reported-noise floor; the refit re-seeds sigma2 from data statistics and would otherwise fit near-duplicate dimer steps against a vanishing nugget (near-singular local covariance, garbage min-mode curvature). NaN or non-positive disables.
Definition at line 2403 of file AtomicDimer.h.
|
inlinenoexcept |
Caller's budget of true potential evaluations. No oracle call is started that would exceed it; the search then stops with DimerRelaxationTerminationReason::OracleBudget, unconverged. Zero or less leaves the search unbounded by calls.
Definition at line 2309 of file AtomicDimer.h.
|
inline |
Set a wall-clock cap measured from this call. Non-positive disables.
Definition at line 737 of file AtomicDimer.h.
|
inlinenoexcept |
A converged midpoint whose measured (absolute) energy lies above ~ceiling~ is not accepted as converged. The escape from a refused index certificate looks for the saddle downhill of the refused point along its offending mode, so the saddle it may return lies below that point; a surrogate overshoot above it during the search is corrected by its own row and is not an abort. NaN disables.
Definition at line 2357 of file AtomicDimer.h.
|
inlinenoexcept |
pot::OracleBatchLayout::chunk of every true-potential call: 0 shares the images out one by one and evaluates a rank's images in one call, K cuts a call into contiguous chunks of K images.
Definition at line 2468 of file AtomicDimer.h.
|
inlinenoexcept |
Keep the caller-supplied dimer axis as the alignment reference when analytic HS-SVD installs a minimum mode. OCI-NEB enables this because its supplied axis is the reaction-path tangent: a minimum mode that rotates away from it belongs to a different channel. Standalone dimer searches may instead track the first certified HS-SVD mode.
Definition at line 2391 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2485 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2477 of file AtomicDimer.h.
|
inlinenoexcept |
Exclude molecular rigid rotations from measured orientation searches. Translations, frozen coordinates and index certification keep their physical constraints independently of this search-space choice.
Definition at line 2529 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2460 of file AtomicDimer.h.
|
inlinenoexcept |
See want_second_negative_mode_.
Definition at line 2331 of file AtomicDimer.h.
|
inlinenoexcept |
Absolute energy below which no first-order saddle between the search endpoints can lie (the higher endpoint energy). A measured partitioned-RFO refinement that steps below it is abandoned. NaN disables.
Definition at line 2365 of file AtomicDimer.h.
| void atmd::AtomicDimer::setSecantHessianConfig | ( | const gpr::optim::SecantHessianConfig & | config | ) |
Replace the true-force secant and drop its history.
Definition at line 809 of file AtomicDimer.cpp.
|
inlinenoexcept |
A caller that already seeded the orientation from a secant of its own turns this off, so the dimer's secant, replayed from whatever rows it was handed, does not replace that seed. The Hessian seeds are kept.
Definition at line 720 of file AtomicDimer.h.
|
inlinenoexcept |
Model profile for the SELF-OWNED surrogate built by ~initialize~ from ~empty_obs~. An attached external GP keeps its owner's profile; the fresh-bootstrap burst must run the same coherent model family (classic CHEMGP/GPRD_ZBL vs EXTENDED) as the session it rescues.
Definition at line 2412 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2423 of file AtomicDimer.h.
|
inlinenoexcept |
ZBL residual prior mean for the self-owned surrogate; keeps the fresh-bootstrap burst on the same compression wall as the session model that hands off to it.
Definition at line 2419 of file AtomicDimer.h.
| void atmd::AtomicDimer::setTrainingPolicy | ( | const gpr::policy::TrainingPolicy * | policy | ) |
Not owned. The pointer must outlive execute(). Null is the engine.
Definition at line 1050 of file AtomicDimer.cpp.
| void atmd::AtomicDimer::setTrainingPolicy | ( | std::shared_ptr< const gpr::policy::TrainingPolicy > | policy | ) |
Keeps a Python adapter alive for execute(), which releases the GIL.
Definition at line 1056 of file AtomicDimer.cpp.
|
inlinenoexcept |
Enable the UA-Dimer rotational projection (DOI 10.48550/arxiv.2605.24401).
Definition at line 2521 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2493 of file AtomicDimer.h.
|
inlinenoexcept |
Convenience setter for the absolute accept_tau alone; other fields of the default-constructed VarianceGateConfig are preserved.
Definition at line 2189 of file AtomicDimer.h.
|
inlinenoexcept |
Convenience setter for the relative accept_tau alone. The effective absolute threshold is recomputed on every gate call from the current magnSigma2, so this setter need not be re-invoked when SCG re-fits the hyperparameters between outer iterations.
Definition at line 2248 of file AtomicDimer.h.
|
inlinenoexcept |
Definition at line 2176 of file AtomicDimer.h.
|
inlinenoexcept |
Full measures every coordinate of the force-stop stencil. Vibrational measures vibrationalStencilDirections. Both displace every coordinate of a lone atom.
Definition at line 781 of file AtomicDimer.h.
|
inline |
Share an enclosing deadline (used by OCI-NEB and deterministic tests).
Definition at line 744 of file AtomicDimer.h.
| void atmd::AtomicDimer::stopForWallClockLimit | ( | ) |
Mark a deadline raised by certificate/refinement work outside execute(). Restores the latest measured midpoint when one is available.
Definition at line 9162 of file AtomicDimer.cpp.
|
noexcept |
A resolved negative direction suffices for handback when the caller certifies the complete Hessian. Standalone searches require the measured mode's rotation certificate.
Definition at line 1672 of file AtomicDimer.cpp.
| void atmd::AtomicDimer::translateDimer | ( | const gpr::Observation & | middle_point, |
| const gpr::Coord & | orient, | ||
| const gpr::Observation & | approx_obs, | ||
| const double | curvature, | ||
| gpr::LBFGSInfo & | trans_info, | ||
| gpr::Coord & | R_new ) |
Translate the dimer.
Definition at line 4365 of file AtomicDimer.cpp.
| bool atmd::AtomicDimer::updateActiveFrozenAtoms | ( | const gpr::Coord & | R_new, |
| gpr::LBFGSInfo & | rot_info, | ||
| gpr::LBFGSInfo & | trans_info ) |
Update active frozen atoms.
Definition at line 4484 of file AtomicDimer.cpp.
|
inlinenodiscardnoexcept |
Definition at line 785 of file AtomicDimer.h.
|
inlinenodiscard |
Definition at line 755 of file AtomicDimer.h.
| void atmd::AtomicDimer::writeTraceFrame | ( | const gpr::Observation & | obs, |
| const std::string & | phase, | ||
| size_t | idx ) |
Record one dimer-trace frame. With a corpus attached, writes a one-frame CON (energy, frame_index, phase in prebox1) onto the phase trajectory (1=outer_loop, 2=inner_loop, 3=initial_rotations). With no corpus, falls through to writeHDF5 when WITH_HDF5.
Definition at line 5828 of file AtomicDimer.cpp.
|
friend |
|
friend |
| gpr::AtomsConfiguration atmd::AtomicDimer::atoms_config |
Configuration of atoms
Definition at line 1323 of file AtomicDimer.h.