.. index:: pair: namespace; gpr::neb .. _doxid-namespacegpr_1_1neb: namespace gpr::neb ================== .. toctree:: :hidden: namespace_gpr_neb_oie.rst enum_gpr_neb_AcquisitionType.rst enum_gpr_neb_AdaptiveSo3EvaluationMode.rst enum_gpr_neb_BandStallAction.rst enum_gpr_neb_GPNEBConvergenceStatus.rst enum_gpr_neb_GPNEBStopReason.rst enum_gpr_neb_IndexGateAction.rst enum_gpr_neb_MMFRejectKind.rst enum_gpr_neb_MMFStatus.rst enum_gpr_neb_MetatomicSO3Policy.rst enum_gpr_neb_MmfHandoffPolicy.rst enum_gpr_neb_NEBMode.rst enum_gpr_neb_ObservationRetention.rst enum_gpr_neb_PeriodicBandInitial.rst struct_gpr_neb_ActiveGpRgsaddleUser.rst struct_gpr_neb_ActiveLearningSession.rst struct_gpr_neb_BandForceStall.rst struct_gpr_neb_BandLayout.rst struct_gpr_neb_BandMidpointCertificate.rst struct_gpr_neb_CartesianOracleCenter.rst struct_gpr_neb_CartesianOracleStencil.rst struct_gpr_neb_CartesianStencilRefinement.rst struct_gpr_neb_ClimbingImageIndexCertificate.rst struct_gpr_neb_EndpointSymmetry.rst struct_gpr_neb_ForceStopHandoffStencil.rst struct_gpr_neb_GPNEBConfig.rst struct_gpr_neb_GPNEBResult.rst struct_gpr_neb_GprRgsaddleUser.rst struct_gpr_neb_Image.rst struct_gpr_neb_IndexEscapeResult.rst struct_gpr_neb_MMFRunResult.rst struct_gpr_neb_NEBOracleEvaluationContext.rst struct_gpr_neb_NEBOracleOptimizationOutcome.rst struct_gpr_neb_NEBOracleSessionCheckpoint.rst struct_gpr_neb_OCINEBConfig.rst struct_gpr_neb_OCINEBDiagnostics.rst struct_gpr_neb_OCINEBOracleCallSummary.rst struct_gpr_neb_OCINEBResult.rst struct_gpr_neb_ObservationVariance.rst struct_gpr_neb_OieBandTraceRecord.rst struct_gpr_neb_OieFixedImageLease.rst struct_gpr_neb_OracleSessionRestartRequested.rst struct_gpr_neb_OuterIterCompositionCertificates.rst struct_gpr_neb_OuterIterCompositionTraceRecord.rst struct_gpr_neb_PeriodicBandDefaults.rst struct_gpr_neb_PosteriorFactorizationCounts.rst struct_gpr_neb_SaddleCertificateReport.rst struct_gpr_neb_SaddlePolishResult.rst struct_gpr_neb_SharedParameterState.rst struct_gpr_neb_StagedDimerObservation.rst struct_gpr_neb_VibrationalIndexClass.rst struct_gpr_neb_VibrationalIndexDecision.rst struct_gpr_neb_VibrationalIndexMeasurement.rst class_gpr_neb_AdaptiveSo3Policy.rst class_gpr_neb_AdaptiveSo3SessionPolicy.rst class_gpr_neb_EonRelaxClient.rst class_gpr_neb_LocalCartesianGP.rst class_gpr_neb_NEBPath.rst class_gpr_neb_OCINEBController.rst class_gpr_neb_OCINEBOracleCallLedger.rst class_gpr_neb_OracleForceProgressTracker.rst class_gpr_neb_PairSplineModel.rst class_gpr_neb_PosteriorFactorizationScope.rst class_gpr_neb_RgMinMode.rst class_gpr_neb_RgSellaMin.rst class_gpr_neb_RgSellaSaddle.rst class_gpr_neb_RgsaddleClient.rst Overview ~~~~~~~~ The nudged elastic band: path, GP-NEB driver, configuration and result, acquisition, IDPP start. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace neb { // namespaces namespace :ref:`gpr::neb::oie`; // typedefs typedef std::function(const Eigen::VectorXd&positions)> :ref:`NEBOracle`; typedef std::function>(const std::vector&positions)> :ref:`NEBBatchOracle`; typedef std::function<:ref:`ObservationVariance`(const Eigen::VectorXd&positions)> :ref:`ObservationVarianceEstimator`; // enums enum :ref:`AcquisitionType`; enum :ref:`AdaptiveSo3EvaluationMode`; enum :ref:`BandStallAction`; enum :ref:`GPNEBConvergenceStatus`; enum :ref:`GPNEBStopReason`; enum :ref:`IndexGateAction`; enum :ref:`MMFRejectKind`; enum :ref:`MMFStatus`; enum :ref:`MetatomicSO3Policy`; enum :ref:`MmfHandoffPolicy`; enum :ref:`NEBMode`; enum :ref:`ObservationRetention`; enum :ref:`PeriodicBandInitial`; // structs struct :ref:`ActiveGpRgsaddleUser`; struct :ref:`ActiveLearningSession`; struct :ref:`BandForceStall`; struct :ref:`BandLayout`; struct :ref:`BandMidpointCertificate`; struct :ref:`CartesianOracleCenter`; struct :ref:`CartesianOracleStencil`; struct :ref:`CartesianStencilRefinement`; struct :ref:`ClimbingImageIndexCertificate`; struct :ref:`EndpointSymmetry`; struct :ref:`ForceStopHandoffStencil`; struct :ref:`GPNEBConfig`; struct :ref:`GPNEBResult`; struct :ref:`GprRgsaddleUser`; struct :ref:`Image`; struct :ref:`IndexEscapeResult`; struct :ref:`MMFRunResult`; struct :ref:`NEBOracleEvaluationContext`; struct :ref:`NEBOracleOptimizationOutcome`; struct :ref:`NEBOracleSessionCheckpoint`; struct :ref:`OCINEBConfig`; struct :ref:`OCINEBDiagnostics`; struct :ref:`OCINEBOracleCallSummary`; struct :ref:`OCINEBResult`; struct :ref:`ObservationVariance`; struct :ref:`OieBandTraceRecord`; struct :ref:`OieFixedImageLease`; struct :ref:`OracleSessionRestartRequested`; struct :ref:`OuterIterCompositionCertificates`; struct :ref:`OuterIterCompositionTraceRecord`; struct :ref:`PeriodicBandDefaults`; struct :ref:`PosteriorFactorizationCounts`; struct :ref:`SaddleCertificateReport`; struct :ref:`SaddlePolishResult`; struct :ref:`SharedParameterState`; struct :ref:`StagedDimerObservation`; struct :ref:`VibrationalIndexClass`; struct :ref:`VibrationalIndexDecision`; struct :ref:`VibrationalIndexMeasurement`; // classes class :ref:`AdaptiveSo3Policy`; class :ref:`AdaptiveSo3SessionPolicy`; class :ref:`EonRelaxClient`; class :ref:`LocalCartesianGP`; class :ref:`NEBPath`; class :ref:`OCINEBController`; class :ref:`OCINEBOracleCallLedger`; class :ref:`OracleForceProgressTracker`; class :ref:`PairSplineModel`; class :ref:`PosteriorFactorizationScope`; class :ref:`RgMinMode`; class :ref:`RgSellaMin`; class :ref:`RgSellaSaddle`; class :ref:`RgsaddleClient`; // global variables int :ref:`kMaxConsecutiveOracleFailures` = 8; int :ref:`kCompositionTraceFormatVersion` = 1; int :ref:`kPeriodicBandImages` = 8; double :ref:`kPeriodicBandFmax` = 0.05; int :ref:`kPeriodicBandSteps` = 1000; double :ref:`kPeriodicBandMaxMove` = 0.2; // global functions double :ref:`perpendicularSigma`(const Eigen::VectorXd& gradient_variance, const Eigen::VectorXd& tangent); int :ref:`selectNextImage`(const std::vector& neb_forces, const std::vector<:ref:`ObservationVariance`>& variances, const std::vector& tangents, const std::vector& evaluated, :ref:`AcquisitionType` strategy, double kappa = 1.0, std::mt19937* rng = nullptr); std::vector :ref:`expandToTriplet`(int center, int n_total); int :ref:`bandStallWindow`(int n_images, int polished_dofs); void :ref:`noteLowestCertifiedClimb`(:ref:`BandForceStall`& stall, const :ref:`NEBPath`& path, int image); :ref:`BandStallAction` :ref:`observeMaxBandForce`(:ref:`BandForceStall`& stall, double max_force, double force_tolerance, int window); void :ref:`restoreCertifiedClimb`(:ref:`NEBPath`& path, const :ref:`BandForceStall`& stall); :ref:`OieBandTraceRecord` :ref:`captureOieBandTrace`(const :ref:`NEBPath`& path, :ref:`GaussianProcessRegression`& gp, int outer, const std::vector& acquisition_variance, bool con_geometry, bool global_snapshot = true, int oracle_calls = -1); :ref:`EndpointSymmetry` :ref:`endpointSymmetryFromPermutation`(const std::vector& permutation, const Eigen::VectorXd& reactant, const Eigen::VectorXd& product, const std::vector& atomic_numbers); :ref:`EndpointSymmetry` :ref:`requireEndpointSymmetry`(const std::vector& permutation, const Eigen::VectorXd& reactant, const Eigen::VectorXd& product, const std::vector& atomic_numbers, double radius); int :ref:`gprMeanSurfaceCallback`(void* user, :ref:`eon_relax_surface_request_t`* req); double :ref:`forceComponentRmsForNorm`(double component_rms, Eigen::Index degrees_of_freedom, :ref:`ConvergenceNormType` norm); bool :target:`oracleContextRequestsAdaptiveSo3`(const :ref:`NEBOracleEvaluationContext`& context); static double :target:`bandPairCutoff`(const :ref:`GPNEBConfig`& config); void :ref:`applyConfigToGP`(const :ref:`GPNEBConfig`& config, :ref:`gpr::GaussianProcessRegression`& gp); :ref:`GPNEBResult` :target:`gpNEBUngated`(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& config, :ref:`ActiveLearningSession`* session); :ref:`GPNEBResult` :ref:`gpNEB`(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& config = {}, :ref:`ActiveLearningSession`* session = nullptr); :ref:`NEBOracle` :ref:`makeLazyPotentialOracle`(std::function<:ref:`pot::PotentialWrapper`()> potential_factory, std::vector atomic_numbers, std::array box, int& oracle_call_counter, double* oracle_seconds = nullptr, double* oracle_energy_noise_rms = nullptr, const bool* oracle_variance_updates_enabled = nullptr, double* oracle_force_noise_rms = nullptr, std::shared_ptr* state_out = nullptr, std::shared_ptr`> wall_clock_limit = nullptr); :ref:`NEBBatchOracle` :ref:`makeLazyPotentialBatchOracle`(std::shared_ptr state); :ref:`pot::PotentialWrapper` :ref:`makePotentialWrapperFromOracle`(:ref:`NEBOracle` oracle); double :ref:`saddleForceMagnitude`(const Eigen::VectorXd& gradient); double :ref:`testingHelpedModeCurvature`(); void :target:`runOciNebOuterIteration`(const std::shared_ptr<:ref:`OCINEBController`>& controller, :ref:`NEBOracle`& oracle, const :ref:`GPNEBConfig`& neb_config, int& total_oracle_calls, int& bursts_fired, int& dimer_saddle_image_idx, const std::shared_ptr& handoff_trap_state, const :ref:`GPNEBConfig::OuterIterHook`& caller_hook, :ref:`NEBPath`& path, int ci_image_idx, int outer_iter, :ref:`ActiveLearningSession`& sess, bool& converged, bool trap_detected); :ref:`OCINEBResult` :ref:`runOCINEB`(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session); :ref:`IndexEscapeResult` :ref:`runIndexEscapeGpDimer`(const :ref:`OCINEBConfig`& oci_config, const :ref:`GPNEBConfig`& neb_config, :ref:`ActiveLearningSession`& session, :ref:`NEBOracle`& oracle, const Eigen::VectorXd& x_seed, double e_seed, const Eigen::VectorXd& g_seed, const Eigen::VectorXd& mode_seed, double energy_ceiling); :ref:`OCINEBResult` :ref:`runOCINEBRefined`(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, :ref:`GPNEBConfig` neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session); void :ref:`certifyOCINEBResult`(:ref:`OCINEBResult`& result, :ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session); int :ref:`reduceOracleProviderCalls`(int local_calls); bool :ref:`ciIndexCertificateRefuted`(const :ref:`OCINEBResult`& result); bool :ref:`ocinebReportsConverged`(const :ref:`OCINEBResult`& result); template :ref:`CartesianOracleStencil` :ref:`evaluateCartesianOracleStencil`(const Eigen::VectorXd& center, double displacement, const Eigen::MatrixXd& directions, const Oracle& oracle, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0); template :ref:`CartesianOracleStencil` :ref:`evaluateCartesianOracleStencil`(const Eigen::VectorXd& center, double displacement, const Eigen::MatrixXd& directions, const Oracle& oracle, const :ref:`CartesianOracleCenter`& measured_center, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0); Eigen::MatrixXd :ref:`stencilDirectionalActions`(const :ref:`CartesianOracleStencil`& stencil); Eigen::MatrixXd :ref:`stencilHessianColumns`(const :ref:`CartesianOracleStencil`& stencil); std::string :ref:`oracleStencilDestination`(const std::string& requested, const std::string& anchor); :ref:`SaddleCertificateReport` :target:`saddleCertificateReport`(bool otherwise_certified, bool stencil_measured, bool force_stop_certified, bool inconclusive); const char* :target:`stencilIndexLabel`(bool first_order, bool higher_order); void :ref:`writeCartesianOracleStencil`(const std::string& path, const :ref:`CartesianOracleStencil`& stencil, const std::vector& atomic_numbers, const std::array& cell, int oracle_calls, const :ref:`CartesianStencilRefinement`* refinement = nullptr); std::string :ref:`formatCompositionTrace`(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& records); bool :target:`parseCompositionTrace`(const std::string& text, std::vector<:ref:`OuterIterCompositionTraceRecord`>& out, std::string* error); bool :target:`writeCompositionTraceFile`(const std::string& path, const std::vector<:ref:`OuterIterCompositionTraceRecord`>& records); bool :target:`readCompositionTraceFile`(const std::string& path, std::vector<:ref:`OuterIterCompositionTraceRecord`>& out, std::string* error); bool :ref:`compositionTracesTextuallyEqual`(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& a, const std::vector<:ref:`OuterIterCompositionTraceRecord`>& b); bool :ref:`compositionTracesNumericallyClose`(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& got, const std::vector<:ref:`OuterIterCompositionTraceRecord`>& expected, double rtol, double atol, std::string* mismatch = nullptr); :ref:`GPNEBConfig` :ref:`periodicBandConfig`(); rgsaddle_status_t :target:`activeGpRgsaddleSurface`(void* user, rgsaddle_surface_request_t* req); rgsaddle_status_t :target:`gprRgsaddleSurface`(void* user, rgsaddle_surface_request_t* req); :ref:`BandMidpointCertificate` :ref:`certifyBandMidpoints`(:ref:`ActiveLearningSession`& session, const :ref:`NEBPath`& path, double force_tol); :ref:`BandMidpointCertificate` :ref:`certifyBandMidpointsMeasured`(:ref:`ActiveLearningSession`& session, const :ref:`NEBPath`& path, double force_tol, :ref:`NEBOracle`& oracle, int max_measurements, int* oracle_calls); :ref:`ClimbingImageIndexCertificate` :ref:`certifyClimbingImageIndex`(const :ref:`NEBOracle`& oracle, :ref:`ActiveLearningSession`& session, const Eigen::VectorXd& x_ci, double e_ci, const Eigen::VectorXd& g_ci, double hessian_fd_step, double max_move, double force_tol, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0); :ref:`SaddlePolishResult` :ref:`polishSaddleOnSurrogate`(const :ref:`NEBOracle`& oracle, :ref:`ActiveLearningSession`& session, const Eigen::VectorXd& x0, double e0, const Eigen::VectorXd& g0, double force_tol, int max_steps, double max_move, double hessian_fd_step); Eigen::LLT :ref:`factorSubstrate`(const Eigen::MatrixXd& hessian); Eigen::VectorXd :ref:`substrateStep`(const Eigen::MatrixXd& hessian, const Eigen::VectorXd& force); int :ref:`rejectUntrustedStep`(:ref:`NEBPath`& path, const std::vector& accepted_positions, const :ref:`gpr::TrustRadius`& trust, double trust_threshold); Eigen::MatrixXd :ref:`oracleStencilDirections`(const Eigen::VectorXd& positions, const :ref:`gpr::AtomsConfiguration`* atoms, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`); :ref:`VibrationalIndexDecision` :ref:`decideVibrationalIndex`(const Eigen::VectorXd& positions, const Eigen::VectorXd& gradient, const :ref:`gpr::AtomsConfiguration`* atoms, :ref:`gpr::GaussianProcessRegression`* gp, double variance, double variance_threshold, double move, double stencil_step, const :ref:`NEBOracle`* oracle, const :ref:`NEBBatchOracle`* batch = nullptr, Eigen::Index batch_chunk = 0, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`); void :ref:`applyVibrationalIndexDecision`(:ref:`GPNEBResult`& result, const :ref:`VibrationalIndexDecision`& decision, int outer_budget); void :ref:`resetForceStopStencilCache`(); void :ref:`writeForceStopHandoff`(const std::string& archive_dir, const :ref:`GPNEBResult`& result); std::optional<:ref:`ForceStopHandoffStencil`> :target:`readForceStopHandoff`(const std::string& archive_dir, const Eigen::VectorXd& center); int :ref:`appendForceStopObservations`(:ref:`gpr::Observation`& observations, const :ref:`ForceStopHandoffStencil`& handoff); bool :ref:`seedDimerModeFromForceStop`(:ref:`gpr::Coord`& orient, const :ref:`ForceStopHandoffStencil`& handoff); void :ref:`certifyForceStoppedNeb`(:ref:`GPNEBResult`& result, :ref:`NEBOracle`& oracle, const :ref:`GPNEBConfig`& config, const :ref:`gpr::AtomsConfiguration`* atoms); int :ref:`vibrationalIndexOuterBudget`(const :ref:`GPNEBConfig`& config, int n_images); :ref:`IndexGateAction` :target:`decideIndexGate`(bool pass, bool cap_remains); :ref:`VibrationalIndexClass` :target:`classifyVibrationalIndex`(const Eigen::VectorXd& curvatures, double resolution); :ref:`VibrationalIndexMeasurement` :ref:`indexFromCartesianColumns`(const Eigen::MatrixXd& columns, const Eigen::VectorXd& positions, const Eigen::VectorXd& masses, double move, const Eigen::VectorXd* center_gradient = nullptr, const Eigen::VectorXi* frozen = nullptr, bool anchored = false, const Eigen::MatrixXd* measured = nullptr); template :ref:`VibrationalIndexMeasurement` :ref:`measureVibrationalIndex`(const Eigen::VectorXd& positions, const Eigen::VectorXd& masses, double step, double move, const Force& force, const Eigen::VectorXd* center_gradient = nullptr, const Eigen::VectorXi* frozen = nullptr, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`, bool periodic = false); double :ref:`indexGateVarianceToNoise`(); double :ref:`indexGateNoiseFloor`(); double :ref:`indexGateVarianceThreshold`(double noise_variance); } // namespace neb .. _details-namespacegpr_1_1neb: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ The nudged elastic band: path, GP-NEB driver, configuration and result, acquisition, IDPP start. Typedefs -------- .. index:: pair: typedef; NEBOracle .. _doxid-namespacegpr_1_1neb_1a25a9f6c1f56dcf250a60bed3b75c7a0d: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef std::function(const Eigen::VectorXd&positions)> NEBOracle Oracle function: positions -> (energy, gradient). .. index:: pair: typedef; NEBBatchOracle .. _doxid-namespacegpr_1_1neb_1a042c4ac9c42b0e792795176a9dda9d5d: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef std::function>(const std::vector&positions)> NEBBatchOracle Whole-band oracle: evaluates every geometry in one call (an AOTI band package runs one graph call per chunk). Same contract per element as ~NEBOracle~; falls back internally when the potential has no batch surface. .. index:: pair: typedef; ObservationVarianceEstimator .. _doxid-namespacegpr_1_1neb_1a5188c67429a3ab52114b552bbdc315cf: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef std::function<:ref:`ObservationVariance`(const Eigen::VectorXd&positions)> ObservationVarianceEstimator Posterior variance estimator for one joint oracle observation. The returned record contains the energy variance and every gradient variance. OIE acquisition projects that complete record onto the quantity resolved by each strategy. Global Variables ---------------- .. index:: pair: variable; kMaxConsecutiveOracleFailures .. _doxid-namespacegpr_1_1neb_1a51abbbb62717da9bc9be941d9405642f: .. ref-code-block:: cpp :class: doxyrest-title-code-block int kMaxConsecutiveOracleFailures = 8 Consecutive band geometries at which the oracle may fail (raise, or return a non-finite energy or force) before the search stops with an error. Each failure is a rejected trial: the image keeps its last measured state, no row is recorded, and the band step shrinks. .. index:: pair: variable; kCompositionTraceFormatVersion .. _doxid-namespacegpr_1_1neb_1a7058ab4553c0539aa78e633d20cc728e: .. ref-code-block:: cpp :class: doxyrest-title-code-block int kCompositionTraceFormatVersion = 1 Bump when the on-disk golden format changes incompatibly. .. index:: pair: variable; kPeriodicBandImages .. _doxid-namespacegpr_1_1neb_1a9ac426060580d1bbf206e56ef24101e5: .. ref-code-block:: cpp :class: doxyrest-title-code-block int kPeriodicBandImages = 8 Images between the endpoints. GPLocalBand's constructor default. .. index:: pair: variable; kPeriodicBandFmax .. _doxid-namespacegpr_1_1neb_1adc3c1a3f1e0188a8d799af70ea0d05fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block double kPeriodicBandFmax = 0.05 Force tolerance of GPLocalBand.run, eV/Angstrom. .. index:: pair: variable; kPeriodicBandSteps .. _doxid-namespacegpr_1_1neb_1a0d0ebe5f45aaebca59d1e098b3d648be: .. ref-code-block:: cpp :class: doxyrest-title-code-block int kPeriodicBandSteps = 1000 Outer-iteration budget of GPLocalBand.run. .. index:: pair: variable; kPeriodicBandMaxMove .. _doxid-namespacegpr_1_1neb_1a7c13cfe2809f3173a49cec2080c86ce5: .. ref-code-block:: cpp :class: doxyrest-title-code-block double kPeriodicBandMaxMove = 0.2 Largest per-atom step of one band move, Angstrom. GPLocalBand's constructor default, wider than the gprn L-BFGS cap. Global Functions ---------------- .. index:: pair: function; perpendicularSigma .. _doxid-namespacegpr_1_1neb_1ac4a8a3fdb9cae15b8f8c644273f593d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block double perpendicularSigma(const Eigen::VectorXd& gradient_variance, const Eigen::VectorXd& tangent) Compute perpendicular GP variance (variance orthogonal to path tangent). sigma_perp = sqrt(sum_d sigma_d^2 \* (1 - tau_d^2)) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - gradient_variance - Per-component gradient variance * - tangent - Unit tangent vector .. rubric:: Returns: Perpendicular standard deviation .. index:: pair: function; selectNextImage .. _doxid-namespacegpr_1_1neb_1a11594265b5018526e708f88c4cb9fea0: .. ref-code-block:: cpp :class: doxyrest-title-code-block int selectNextImage(const std::vector& neb_forces, const std::vector<:ref:`ObservationVariance`>& variances, const std::vector& tangents, const std::vector& evaluated, :ref:`AcquisitionType` strategy, double kappa = 1.0, std::mt19937* rng = nullptr) Select the next unevaluated intermediate image by a per-image score. This helper scores each image independently. It does not run the chain-level TPE, PS-BAX, or IMSPE selectors used by the GP-OIE outer loop. MaxVariance force-variance trace MaxForce ||F_NEB|| UCB ||F_NEB|| + kappa \* sigma_perp ThompsonSampling N(||F_NEB||, sigma_perp) if rng is set ExpectedImprovement energy variance IMSPE, TPE, PSBAX, PriorityCascade joint energy+gradient variance trace .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - neb_forces - NEB forces at each intermediate image * - variances - Joint energy-and-gradient variance at each intermediate image * - tangents - Unit tangent vectors at each intermediate image * - evaluated - Which images have been evaluated this iteration * - strategy - Acquisition strategy to use * - kappa - UCB exploration weight. Used only for :ref:`AcquisitionType::UCB `. * - rng - Random number generator (for Thompson sampling) .. rubric:: Returns: Index into the intermediate-image arrays (0-based), or -1 if every image is already evaluated .. index:: pair: function; expandToTriplet .. _doxid-namespacegpr_1_1neb_1abc81cc20479e0124752bd166eeda7189: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector expandToTriplet(int center, int n_total) Expand a single image index to a triplet {i-1, i, i+1}. :ref:`Triplet ` evaluation ensures the improved tangent at the center image uses ground-truth neighbors. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - center - Center image index * - n_total - Total number of images (including endpoints) .. rubric:: Returns: Vector of image indices to evaluate .. index:: pair: function; bandStallWindow .. _doxid-namespacegpr_1_1neb_1aee0eea5960a2d1170d46291d9f841d87: .. ref-code-block:: cpp :class: doxyrest-title-code-block int bandStallWindow(int n_images, int polished_dofs) Outers the max force may sit still before the climb is stalled. The window is the longer of two band sizes. Every ordered pair of images is one step, since the worst force can sit on any image and be handed to any other. A polished subspace that is longer than that waits one step per polished coordinate instead. .. index:: pair: function; noteLowestCertifiedClimb .. _doxid-namespacegpr_1_1neb_1a793810fdd5fa304350be7f0534c0bb6d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void noteLowestCertifiedClimb(:ref:`BandForceStall`& stall, const :ref:`NEBPath`& path, int image) Remember ``image`` when it is the highest on the band and lower than the climb already kept. The whole band is stored so a later restore climbs that image in the geometry that certified it. .. index:: pair: function; observeMaxBandForce .. _doxid-namespacegpr_1_1neb_1a388ca074a3175914f8b244020ae0e931: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`BandStallAction` observeMaxBandForce(:ref:`BandForceStall`& stall, double max_force, double force_tolerance, int window) ``max_force`` is the max NEB force on the band. Progress is a drop of one force tolerance. A quiet window with a certified climb restores it once; a second quiet window stops on that climb instead of wandering. Stop leaves the certified climb in place. When that climb's force is still above the tolerance the band driver sets the session stagnation handoff so the dimer, not another capped band step, continues it. .. index:: pair: function; restoreCertifiedClimb .. _doxid-namespacegpr_1_1neb_1a2807f30b14fcddd7569f01b0097306e0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void restoreCertifiedClimb(:ref:`NEBPath`& path, const :ref:`BandForceStall`& stall) Put the certified climb back and make it the climbing image. .. index:: pair: function; captureOieBandTrace .. _doxid-namespacegpr_1_1neb_1aa21567e56b5a8023915cc3189a0eb4e3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`OieBandTraceRecord` captureOieBandTrace(const :ref:`NEBPath`& path, :ref:`GaussianProcessRegression`& gp, int outer, const std::vector& acquisition_variance, bool con_geometry, bool global_snapshot = true, int oracle_calls = -1) Record what the outer iteration already holds (band energies, the measured mask, NEB force norms, the acquisition variance, hyperparameters, the oracle-call count). With ``global_snapshot`` the fitted global model is also queried at every image, without updating the band or refitting. .. index:: pair: function; endpointSymmetryFromPermutation .. _doxid-namespacegpr_1_1neb_1a7f59707f3ff5e336e0dc7c892f6b5a21: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`EndpointSymmetry` endpointSymmetryFromPermutation(const std::vector& permutation, const Eigen::VectorXd& reactant, const Eigen::VectorXd& product, const std::vector& atomic_numbers) The endpoint-exchanging symmetry with permutation ``permutation`` (slot a of the mapped geometry takes atom permutation[a]). Q and t are the orthogonal Procrustes fit of the permuted reactant onto the product, which is optimal over proper and improper rotations alike; the fit is exact for a degenerate reaction whose endpoints are symmetry images. Throws when the permutation is not a non-identity bijection of like atoms. .. index:: pair: function; requireEndpointSymmetry .. _doxid-namespacegpr_1_1neb_1a1e0d9c1971b608c62c44b41833ab092e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`EndpointSymmetry` requireEndpointSymmetry(const std::vector& permutation, const Eigen::VectorXd& reactant, const Eigen::VectorXd& product, const std::vector& atomic_numbers, double radius) endpointSymmetryFromPermutation, refused unless the operation carries each endpoint to within ``radius`` of the other: only then do the mirrored rows of one basin sit inside the trust region of the other's images. .. index:: pair: function; gprMeanSurfaceCallback .. _doxid-namespacegpr_1_1neb_1a5a30bf9163d02ebe5e5eced200837842: .. ref-code-block:: cpp :class: doxyrest-title-code-block int gprMeanSurfaceCallback(void* user, :ref:`eon_relax_surface_request_t`* req) Surface trampoline: the frozen-or-live GP surface behind the :ref:`eon_relax_surface_fn ` contract. user is a GprMeanPotential\*. Every image is evaluated through the cached-factor force path; the request's epoch_out carries surfaceEpoch() so eOn's Matter cache keys on the model generation. A request whose version major is unknown is refused. .. index:: pair: function; forceComponentRmsForNorm .. _doxid-namespacegpr_1_1neb_1aaa46fb181a80a3f8f5dc9af810367e52: .. ref-code-block:: cpp :class: doxyrest-title-code-block double forceComponentRmsForNorm(double component_rms, Eigen::Index degrees_of_freedom, :ref:`ConvergenceNormType` norm) Convert per-Cartesian-component force RMS to the selected force norm. .. index:: pair: function; applyConfigToGP .. _doxid-namespacegpr_1_1neb_1ace15c1adaac77f080707189331834f5c: .. ref-code-block:: cpp :class: doxyrest-title-code-block void applyConfigToGP(const :ref:`GPNEBConfig`& config, :ref:`gpr::GaussianProcessRegression`& gp) Push a :ref:`GPNEBConfig ` onto a GP: profile first, then the explicit objective and every switch keyed on the effective objective. .. index:: pair: function; gpNEB .. _doxid-namespacegpr_1_1neb_1a90ab277654a6316ec149970258b9bb69: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`GPNEBResult` gpNEB(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& config = {}, :ref:`ActiveLearningSession`* session = nullptr) Run GP-accelerated NEB. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - oracle - Energy/gradient evaluation function * - initial - Initial state positions (flat) * - final_state - Final state positions (flat) * - n_images - Number of intermediate images * - config - NEB configuration * - session - Optional active-learning session used to share observations and restore session state .. rubric:: Returns: :ref:`GPNEBResult ` .. index:: pair: function; makeLazyPotentialOracle .. _doxid-namespacegpr_1_1neb_1aafdfc681416b32cc3b08cd0e6d858e6d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`NEBOracle` makeLazyPotentialOracle(std::function<:ref:`pot::PotentialWrapper`()> potential_factory, std::vector atomic_numbers, std::array box, int& oracle_call_counter, double* oracle_seconds = nullptr, double* oracle_energy_noise_rms = nullptr, const bool* oracle_variance_updates_enabled = nullptr, double* oracle_force_noise_rms = nullptr, std::shared_ptr* state_out = nullptr, std::shared_ptr`> wall_clock_limit = nullptr) The single-point oracle of a run. The potential is built on the first call; ``state_out`` receives the shared state so that the whole-batch oracle of the same run (makeLazyPotentialBatchOracle) measures through the same instance and the same accounting. .. index:: pair: function; makeLazyPotentialBatchOracle .. _doxid-namespacegpr_1_1neb_1a8471423b04c9092c512442cac21225bd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`NEBBatchOracle` makeLazyPotentialBatchOracle(std::shared_ptr state) Whole-batch companion to ~makeLazyPotentialOracle~ over the same state: one potential call per batch when the wrapped source has a batch surface (a UMA band package runs one graph call per chunk), a per-point walk through the same wrapper otherwise. .. index:: pair: function; makePotentialWrapperFromOracle .. _doxid-namespacegpr_1_1neb_1a65e09577add8eb76836c79771a6f31c6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`pot::PotentialWrapper` makePotentialWrapperFromOracle(:ref:`NEBOracle` oracle) Build a ~pot::PotentialWrapper~ that calls through to a ~NEBOracle~ lambda. Drop the atomicNrs / box / variance arguments (the NEB oracle's backing potential already owns those). .. index:: pair: function; saddleForceMagnitude .. _doxid-namespacegpr_1_1neb_1aef503fd620a2731fb5fb8dc2c9975e55: .. ref-code-block:: cpp :class: doxyrest-title-code-block double saddleForceMagnitude(const Eigen::VectorXd& gradient) Maximum atomic force for Cartesian systems, Euclidean norm for toy PESs. .. index:: pair: function; testingHelpedModeCurvature .. _doxid-namespacegpr_1_1neb_1a0c2f11a0fd2748fd5ef5b0ffe5bde702: .. ref-code-block:: cpp :class: doxyrest-title-code-block double testingHelpedModeCurvature() Measured min-mode curvature of the latest helped burst in this process. Quiet NaN until a burst converges to a saddle. .. index:: pair: function; runOCINEB .. _doxid-namespacegpr_1_1neb_1a4c2a1d999c94359548552bfc76defaa2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`OCINEBResult` runOCINEB(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session) Entry point. Builds a stateful ~OCINEBController~, installs its run-method as the NEB's per-outer-iter hook, then calls ~gpNEB~ with the session. The hook fires after every NEB outer iter once CI is active, drives MMF bursts via the controller, and writes results back into the chain. .. index:: pair: function; runIndexEscapeGpDimer .. _doxid-namespacegpr_1_1neb_1ad58f39a0fc7cd6774495b543229b2f6c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`IndexEscapeResult` runIndexEscapeGpDimer(const :ref:`OCINEBConfig`& oci_config, const :ref:`GPNEBConfig`& neb_config, :ref:`ActiveLearningSession`& session, :ref:`NEBOracle`& oracle, const Eigen::VectorXd& x_seed, double e_seed, const Eigen::VectorXd& g_seed, const Eigen::VectorXd& mode_seed, double energy_ceiling) Run the standalone GP dimer from the measured seed ~x_seed~, ~e_seed~, ~g_seed~ in the shared session, oriented along ~mode_seed~. A finite ~energy_ceiling~ requests a downhill recovery from a verified higher-index point. A minimum escape uses infinity to allow an uphill search. The dimer checks measured forces and rotation before stopping; its caller certifies the complete Hessian index. A measured interatomic distance below ratio_at_limit times the seed's minimum aborts the search. .. index:: pair: function; runOCINEBRefined .. _doxid-namespacegpr_1_1neb_1aec64d550c9c5fa93539038e389da1456: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`OCINEBResult` runOCINEBRefined(:ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, :ref:`GPNEBConfig` neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session) runOCINEB with certificate-driven band refinement (:ref:`GPNEBConfig ` :: band_refinement_max, band_certificate_force_scale, first_attempt_wall_seconds). The first attempt uses ``session``; each refinement doubles the image count and runs on a fresh session rebuilt from neb_config.gp_setup, since the per-image models are indexed to the image count. With band_refinement_max == 0 this is exactly runOCINEB. Shared by the gprn CLI and the Python bindings so both get the same acceptance behaviour. .. index:: pair: function; certifyOCINEBResult .. _doxid-namespacegpr_1_1neb_1a0aaee1b4aa3cd7f135609266431a383a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void certifyOCINEBResult(:ref:`OCINEBResult`& result, :ref:`NEBOracle` oracle, const Eigen::VectorXd& initial, const Eigen::VectorXd& final_state, int n_images, const :ref:`GPNEBConfig`& neb_config, const :ref:`OCINEBConfig`& oci_config, :ref:`ActiveLearningSession`& session) Measure the returned band's certificates and recover an invalid saddle through the shared GP and oracle. The result retains every certificate measurement and recovery call. .. index:: pair: function; reduceOracleProviderCalls .. _doxid-namespacegpr_1_1neb_1a0a07cc3a0d248ee2d280831a585d722d: .. ref-code-block:: cpp :class: doxyrest-title-code-block int reduceOracleProviderCalls(int local_calls) Aggregates completed OCINEB attempts while the provider counter remains authoritative for calls made by aborted oracle-surface sessions. provider_calls must be the communicator-wide count. parallelEvaluate shards the PES (point i on rank i % nprocs), so a rank-local increment is a slice of the ledger and fails the invariant below. .. index:: pair: function; ciIndexCertificateRefuted .. _doxid-namespacegpr_1_1neb_1a61654d65c4440c55e3db116984674fc9: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool ciIndexCertificateRefuted(const :ref:`OCINEBResult`& result) The opt-in climbing-image index certificate measured this point and refused it. An unevaluated or unverified certificate is not a refutation: the curvature was not established. .. index:: pair: function; ocinebReportsConverged .. _doxid-namespacegpr_1_1neb_1a8a4c36b5cb33c6d412e8ebda32b0e0a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool ocinebReportsConverged(const :ref:`OCINEBResult`& result) Whether a finished OCINEB attempt may be called converged. A refuted index certificate is not a saddle, and neither is a vibrational-index refusal. The band or dimer flag alone does not settle the run. .. index:: pair: function; evaluateCartesianOracleStencil .. _doxid-namespacegpr_1_1neb_1ab687e4cd89bb84127b2fd82d4f7d4720: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`CartesianOracleStencil` evaluateCartesianOracleStencil(const Eigen::VectorXd& center, double displacement, const Eigen::MatrixXd& directions, const Oracle& oracle, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0) Every displacement of the stencil is one point of one oracle step: the points are shared out over the ranks and each rank's points go through ``batch_oracle`` in one call when one is given. ``directions`` are the stencil's orthonormal Cartesian directions, normally :ref:`gpr::optim::vibrationalStencilDirections ` at ``center``. .. index:: pair: function; evaluateCartesianOracleStencil .. _doxid-namespacegpr_1_1neb_1abbf9c6a05c0192c7a89113822c81a8c2: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`CartesianOracleStencil` evaluateCartesianOracleStencil(const Eigen::VectorXd& center, double displacement, const Eigen::MatrixXd& directions, const Oracle& oracle, const :ref:`CartesianOracleCenter`& measured_center, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0) Reuse rank zero's exact measured center, retaining all 2\*K+1 rows and their original owners. An invalid, stale or partial root measurement falls back to measuring the full stencil. Other ranks need not supply a measurement. .. index:: pair: function; stencilDirectionalActions .. _doxid-namespacegpr_1_1neb_1a85dc47cae030a4c7c642e581521fb10d: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::MatrixXd stencilDirectionalActions(const :ref:`CartesianOracleStencil`& stencil) Central differences of the gradient along each stencil direction, one column per direction. Empty for an incomplete stencil. .. index:: pair: function; stencilHessianColumns .. _doxid-namespacegpr_1_1neb_1acb1a434f88751a4cf09f74ccb7421b50: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::MatrixXd stencilHessianColumns(const :ref:`CartesianOracleStencil`& stencil) The stencil's Cartesian Hessian columns, column j the action along coordinate j (:ref:`gpr::optim::hessianColumnsFromDirections ` about the measured center gradient). Empty for an incomplete stencil. .. index:: pair: function; oracleStencilDestination .. _doxid-namespacegpr_1_1neb_1ad10b110c29df33099b93897b628c22b6: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string oracleStencilDestination(const std::string& requested, const std::string& anchor) Explicit oracle-stencil path, or oracle-stencil.json beside the run's output (the HDF5 path for a band, the geometry for a dimer). The parent directory is created by the writer, so a search persists the stencil without a directory prepared ahead of time. .. index:: pair: function; writeCartesianOracleStencil .. _doxid-namespacegpr_1_1neb_1a26c81f6ef87b302c370e5c0d95ab0c3a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void writeCartesianOracleStencil(const std::string& path, const :ref:`CartesianOracleStencil`& stencil, const std::vector& atomic_numbers, const std::array& cell, int oracle_calls, const :ref:`CartesianStencilRefinement`* refinement = nullptr) Write measured gradients in eV/A without Hessian projection or mass weighting. Schema 1 is the central-difference stencil along the Cartesian axes. Schema 2 is that stencil plus the refinement probes and the bounds they support, so a later reader can reach the same index without another oracle call. Schema 3 adds ``directions``, one row per stencil direction (rows 2k+1 and 2k+2 of the positions displace along row k), and may carry the schema 2 refinement block; it is written whenever the directions are not the Cartesian axes. Parent directories of ``path`` are created. .. index:: pair: function; formatCompositionTrace .. _doxid-namespacegpr_1_1neb_1a98556351668e6e53cd255acd0e48a5f2: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string formatCompositionTrace(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& records) Canonical text serialization used by golden files and exact-match asserts. .. index:: pair: function; compositionTracesTextuallyEqual .. _doxid-namespacegpr_1_1neb_1a8847cc70befce24ce767abd07d6d30ca: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool compositionTracesTextuallyEqual(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& a, const std::vector<:ref:`OuterIterCompositionTraceRecord`>& b) True when canonical serializations are identical (golden check). .. index:: pair: function; compositionTracesNumericallyClose .. _doxid-namespacegpr_1_1neb_1a6d942e23a21d2d28becf0cfdb3a82daa: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool compositionTracesNumericallyClose(const std::vector<:ref:`OuterIterCompositionTraceRecord`>& got, const std::vector<:ref:`OuterIterCompositionTraceRecord`>& expected, double rtol, double atol, std::string* mismatch = nullptr) Golden check tolerant to last-ULP floating-point drift. The structural and decision fields (indices, counts, ci_active, every certificate flag, and the theta length) must match exactly; the continuous fields (barrier_estimate, max_oracle_force, each theta value) match within atol plus rtol times the magnitude of the expected value. Exact string equality is too strict for a trace that carries 17-significant-figure reductions whose ordering drifts (e.g. a cuSOLVER GPU/CPU-fallback path), where a decision-identical run differs only in the trailing digits. ``mismatch``, when non-null, receives a human-readable description of the first divergence. .. index:: pair: function; periodicBandConfig .. _doxid-namespacegpr_1_1neb_1aa8c00ba41fb4ca10ec66d1dc31f44eb3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`GPNEBConfig` periodicBandConfig() :ref:`GPNEBConfig ` of a periodic local band before the geometry is attached. .. index:: pair: function; certifyBandMidpoints .. _doxid-namespacegpr_1_1neb_1a8c7465c8f1660aef4198d829cf1cd527: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`BandMidpointCertificate` certifyBandMidpoints(:ref:`ActiveLearningSession`& session, const :ref:`NEBPath`& path, double force_tol) The chord midpoint of every segment is relaxed on the surrogate in the hyperplane perpendicular to the chord (no oracle call) until its in-plane force is below force_tol, and that valley-floor energy upper bound must not exceed the climbing image. force_tol <= 0 checks raw chord midpoints. .. index:: pair: function; certifyBandMidpointsMeasured .. _doxid-namespacegpr_1_1neb_1ac470cf4beab1b4cef9b66631fb4e8e34: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`BandMidpointCertificate` certifyBandMidpointsMeasured(:ref:`ActiveLearningSession`& session, const :ref:`NEBPath`& path, double force_tol, :ref:`NEBOracle`& oracle, int max_measurements, int* oracle_calls) The surrogate certificate, with a refused midpoint measured before it is believed: a refusal rests on the surrogate at a point no row has sampled (16_h2po4_anion: chord midpoints of a proton-transfer band sit where the ZBL prior mean rises 0.13 to 0.56 eV above the climbing image, and each refusal bought a refinement pass of 100+ rows). One oracle row at the relaxed midpoint either corrects the surrogate, and the certificate is re-run, or confirms a ridge above the climbing image (true_ridge), which is the refusal the refinement is for. A hump the relaxation slid off into an unsampled valley is verified the same way (17_claisen: the chord between two images crossed 1.16 eV, the relaxed midpoint sat in a surrogate valley no row had seen, and the band kept a 0.28 eV conformational saddle for the 1.3 eV rearrangement). At most max_measurements rows; oracle_calls counts them when non-null. .. index:: pair: function; certifyClimbingImageIndex .. _doxid-namespacegpr_1_1neb_1a96658c635e3d06d3a94f0450f7b96e50: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`ClimbingImageIndexCertificate` certifyClimbingImageIndex(const :ref:`NEBOracle`& oracle, :ref:`ActiveLearningSession`& session, const Eigen::VectorXd& x_ci, double e_ci, const Eigen::VectorXd& g_ci, double hessian_fd_step, double max_move, double force_tol, const :ref:`NEBBatchOracle`* batch_oracle = nullptr, Eigen::Index batch_chunk = 0) The stencil and the refinement pairs are oracle steps whose points are shared out over the ranks; a rank's points go through ``batch_oracle`` in one call when one is given (:ref:`GPNEBConfig::batch_oracle ` and :ref:`GPNEBConfig::oracle_batch_chunk `). .. index:: pair: function; polishSaddleOnSurrogate .. _doxid-namespacegpr_1_1neb_1a21119f3da1a548a29bd69ba2bb2b8ced: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`SaddlePolishResult` polishSaddleOnSurrogate(const :ref:`NEBOracle`& oracle, :ref:`ActiveLearningSession`& session, const Eigen::VectorXd& x0, double e0, const Eigen::VectorXd& g0, double force_tol, int max_steps, double max_move, double hessian_fd_step) Newton polish driven by measured gradients and the surrogate Hessian. Each step solves d = -H^+ g on the allowed coordinate subspace, keeping fixed atoms immobile and removing only rigid motions that are symmetries of the system. Cartesian components are capped at max_move. Acceptance and convergence use the maximum per-atom norm of the true gradient projected into the allowed step space. A rejected trial is halved once; every measured row joins the session. The result retains component infinity norms as additional diagnostics. Termination occurs at force_tol, a failed halving, or max_steps accepted steps. The returned gradient is measured at the returned positions. .. index:: pair: function; factorSubstrate .. _doxid-namespacegpr_1_1neb_1acd1b9dc2297801dd702b8620df791d29: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::LLT factorSubstrate(const Eigen::MatrixXd& hessian) Cholesky factor of a substrate Hessian. The factor is double. A float factor rounds every entry onto a boundary a one-ulp force can cross, and the quasi-Newton step then leaves the basin. .. index:: pair: function; substrateStep .. _doxid-namespacegpr_1_1neb_1a39ed712dba4a6a55a66fba7a7f242b39: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::VectorXd substrateStep(const Eigen::MatrixXd& hessian, const Eigen::VectorXd& force) One substrate step, H^{-1} force, from that factor. .. index:: pair: function; rejectUntrustedStep .. _doxid-namespacegpr_1_1neb_1a0c60c11bb07bf11603b54d8f828fbf05: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rejectUntrustedStep(:ref:`NEBPath`& path, const std::vector& accepted_positions, const :ref:`gpr::TrustRadius`& trust, double trust_threshold) Reject a simultaneous inner-loop NEB step outside the GP trust set. .. rubric:: Returns: First offending image index, or -1 when all intermediate images remain within the trust threshold. .. index:: pair: function; oracleStencilDirections .. _doxid-namespacegpr_1_1neb_1afff002b467b2ca2504811213127a4271: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::MatrixXd oracleStencilDirections(const Eigen::VectorXd& positions, const :ref:`gpr::AtomsConfiguration`* atoms, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`) :ref:`Directions ` of a true-oracle Hessian stencil of a band geometry in the frame of ``atoms`` (masses, frozen atoms, cell), the same frame decideVibrationalIndex and certifyForceStoppedNeb measure in. Null ``atoms`` is a free molecule with unit masses. Full is every coordinate. .. index:: pair: function; decideVibrationalIndex .. _doxid-namespacegpr_1_1neb_1a24bf664128eb6aad31a0693c0b182349: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`VibrationalIndexDecision` decideVibrationalIndex(const Eigen::VectorXd& positions, const Eigen::VectorXd& gradient, const :ref:`gpr::AtomsConfiguration`* atoms, :ref:`gpr::GaussianProcessRegression`* gp, double variance, double variance_threshold, double move, double stencil_step, const :ref:`NEBOracle`* oracle, const :ref:`NEBBatchOracle`* batch = nullptr, Eigen::Index batch_chunk = 0, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`) One index decision for a climbing image. The GP mean Hessian is read first and costs no true call. Posterior energy variance is compared with ``variance_threshold`` (indexGateVarianceThreshold of the fitted noise). A resolved index-1 surrogate accepts. The true stencil runs only when that variance is above the threshold or the surrogate reports three or more negative modes. Full, the default, is two force evaluations per Cartesian coordinate and a resolution that includes the rigid columns. Vibrational displaces only the complement; its resolution is the measured block and can call a borderline mode resolved where full leaves it unresolved. A resolved surrogate with fewer negatives than that does not spend true calls and does not refuse: the mean Hessian on the hollow adatom reports two negatives, or none, at a true index-1 saddle. .. index:: pair: function; applyVibrationalIndexDecision .. _doxid-namespacegpr_1_1neb_1ae9e2c6a29346dd10b599df5e35f5cb50: .. ref-code-block:: cpp :class: doxyrest-title-code-block void applyVibrationalIndexDecision(:ref:`GPNEBResult`& result, const :ref:`VibrationalIndexDecision`& decision, int outer_budget) Apply ``decision`` to a force-converged result. A refusal with outer iterations still below ``outer_budget`` steps the climbing image and asks the caller to resume. A refusal with the budget spent clears convergence and sets ``index_refused``. .. index:: pair: function; resetForceStopStencilCache .. _doxid-namespacegpr_1_1neb_1ae8094d6a0374292c4932a73b131d652d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void resetForceStopStencilCache() Drop the in-process stencil cache. Tests use this so a previous geometry cannot satisfy a later count. .. index:: pair: function; writeForceStopHandoff .. _doxid-namespacegpr_1_1neb_1a27ba2c8cd05f2d23473d6cde9819ca3a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void writeForceStopHandoff(const std::string& archive_dir, const :ref:`GPNEBResult`& result) Write the handed stencil where a following saddle reads it: the observation archive the saddle opens as its seed archive. .. index:: pair: function; appendForceStopObservations .. _doxid-namespacegpr_1_1neb_1a27d98de763a472c2bf14dea260000c55: .. ref-code-block:: cpp :class: doxyrest-title-code-block int appendForceStopObservations(:ref:`gpr::Observation`& observations, const :ref:`ForceStopHandoffStencil`& handoff) Append stencil rows the saddle has not already stored. Returns the number of rows added. An empty observation takes its width from the handoff. .. index:: pair: function; seedDimerModeFromForceStop .. _doxid-namespacegpr_1_1neb_1a2663ef28cd23c9cec5ecdf599d67555f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool seedDimerModeFromForceStop(:ref:`gpr::Coord`& orient, const :ref:`ForceStopHandoffStencil`& handoff) Replace ``orient`` 's single row with the lowest handed mode when that mode matches the row length. Returns false when there is no mode. .. index:: pair: function; certifyForceStoppedNeb .. _doxid-namespacegpr_1_1neb_1aed2a47360d68f99e35dd6bdbafc298b8: .. ref-code-block:: cpp :class: doxyrest-title-code-block void certifyForceStoppedNeb(:ref:`GPNEBResult`& result, :ref:`NEBOracle`& oracle, const :ref:`GPNEBConfig`& config, const :ref:`gpr::AtomsConfiguration`* atoms) The force loop has already stopped. Measure one Cartesian stencil, certify a first-order saddle, and refine only along a soft mode when the stencil has more than one negative mode. Does not resume the band. .. index:: pair: function; vibrationalIndexOuterBudget .. _doxid-namespacegpr_1_1neb_1a1ab7f1bdac8e6acba12a85cccf9c3cbc: .. ref-code-block:: cpp :class: doxyrest-title-code-block int vibrationalIndexOuterBudget(const :ref:`GPNEBConfig`& config, int n_images) Outer-iteration cap, including the per-image reading. .. index:: pair: function; indexFromCartesianColumns .. _doxid-namespacegpr_1_1neb_1ac61d679763f82629fe03726dc342b9e4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`VibrationalIndexMeasurement` indexFromCartesianColumns(const Eigen::MatrixXd& columns, const Eigen::VectorXd& positions, const Eigen::VectorXd& masses, double move, const Eigen::VectorXd* center_gradient = nullptr, const Eigen::VectorXi* frozen = nullptr, bool anchored = false, const Eigen::MatrixXd* measured = nullptr) Classify a float64 Cartesian central-difference Hessian. Column j of ``columns`` is (g(x + h e_j) - g(x - h e_j)) / (2h). With no frozen atoms the spectrum is the mass-weighted vibrational complement from analyzeStencilIndex, and the resolution is that stencil's resolution. Frozen atoms fix the frame: the spectrum is the mass-weighted moving block, and rigid motion is not removed again. ``frozen`` is one flag per atom, nonzero when that atom is frozen. ``measured`` names the stencil directions when the other columns were rebuilt (:ref:`gpr::optim::analyzeStencilIndex `). .. index:: pair: function; measureVibrationalIndex .. _doxid-namespacegpr_1_1neb_1a4bea2d6b76ab89637efc989ca4ce3f6d: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`VibrationalIndexMeasurement` measureVibrationalIndex(const Eigen::VectorXd& positions, const Eigen::VectorXd& masses, double step, double move, const Force& force, const Eigen::VectorXd* center_gradient = nullptr, const Eigen::VectorXi* frozen = nullptr, :ref:`gpr::optim::VibrationalStencil` stencil = :ref:`gpr::optim::VibrationalStencil::Full`, bool periodic = false) Float64 central differences of ``force`` at ``positions``. ``force`` maps a Cartesian geometry to its Cartesian gradient. Two evaluations per stencil direction, and one at the center when the directions are not the coordinate axes and ``center_gradient`` is not supplied: the removed rigid columns are rebuilt about it. Full measures all 3 coordinates for N=1, and measureVibrationalIndex(frozen, Full) probes all 3N. Vibrational uses :ref:`gpr::optim::vibrationalStencilDirections ` : frozen atoms, when flagged, are not displaced. ``periodic`` keeps the rotations, which are not symmetries of a cell: a free molecule measures 3N-6 directions (3N-5 when linear) and a periodic cell measures 3N-3. .. index:: pair: function; indexGateVarianceToNoise .. _doxid-namespacegpr_1_1neb_1a7d6a1c07d7d2604ca6da10c969239345: .. ref-code-block:: cpp :class: doxyrest-title-code-block double indexGateVarianceToNoise() Ratio of posterior energy variance to fitted noise variance above which the surrogate index of a climbing image is not trusted. .. index:: pair: function; indexGateNoiseFloor .. _doxid-namespacegpr_1_1neb_1aaa1c5eb30e7107833428f30eea356c44: .. ref-code-block:: cpp :class: doxyrest-title-code-block double indexGateNoiseFloor() Noise variance a noise-free fit is credited with in that comparison. .. index:: pair: function; indexGateVarianceThreshold .. _doxid-namespacegpr_1_1neb_1ac93bc30c8e179dc40d1714d03b682880: .. ref-code-block:: cpp :class: doxyrest-title-code-block double indexGateVarianceThreshold(double noise_variance) Posterior energy variance above which decideVibrationalIndex measures the true stencil: an order of magnitude over the fitted noise.