.. index:: pair: namespace; gpr::neb::oie .. _doxid-namespacegpr_1_1neb_1_1oie: namespace gpr::neb::oie ======================= .. toctree:: :hidden: enum_gpr_neb_oie_TpeObjective.rst struct_gpr_neb_oie_TpePickResult.rst class_gpr_neb_oie_AcquisitionPolicy.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace oie { // enums enum :ref:`TpeObjective`; // structs struct :ref:`TpePickResult`; // classes class :ref:`AcquisitionPolicy`; // global functions double :ref:`ucbBeta`(int outer_iter, int n_candidates); const char* :target:`tpeObjectiveName`(:ref:`TpeObjective` objective); const char* :target:`tpeObjectiveLogName`(bool evaluated, :ref:`TpeObjective` objective); :ref:`TpeObjective` :target:`tpeObjectiveForSaddleState`(bool ci_active, bool candidate_confident, bool chain_certificate_met); double :ref:`gaussianExceedanceProbability`(double reference_mean, double reference_variance, double challenger_mean, double challenger_variance); bool :ref:`saddleExists`(const std::vector& energies); bool :ref:`confidenceMet`(const std::vector& energies, const std::vector& posterior_energy_variance, int outer_iter); std::vector :ref:`oieUtility`(const std::vector& energies, const std::vector& posterior_energy_variance, const std::vector& force_norm, const std::vector& force_variance, int outer_iter, bool confident); std::vector :ref:`saddleIdentityUtility`(const std::vector& energies, const std::vector& posterior_energy_variance); int :ref:`tpePick`(const std::vector& interior_utility); :ref:`TpePickResult` :ref:`selectTpeOracleTarget`(const std::vector& energies, const std::vector& posterior_energy_variance, const std::vector& force_norm, const std::vector& force_variance, int outer_iter); Eigen::VectorXd :ref:`drawPosteriorObservationSample`(const Eigen::VectorXd& posterior_mean, const Eigen::MatrixXd& posterior_covariance, std::uint64_t seed = 0); } // namespace oie .. _details-namespacegpr_1_1neb_1_1oie: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; ucbBeta .. _doxid-namespacegpr_1_1neb_1_1oie_1a9bb7a2dc0f2723d9ae1d9ca003d38722: .. ref-code-block:: cpp :class: doxyrest-title-code-block double ucbBeta(int outer_iter, int n_candidates) GP-UCB exploration schedule sqrt(beta_t), Srinivas et al. 2010. beta_t = 2 log(cardinality(D) t^2 pi^2 / (6 delta)), delta = 1/t, for a finite decision set D at outer iteration t. Returns sqrt(beta_t). Self-scaling: grows with iteration and band size, no hand-set kappa. .. index:: pair: function; gaussianExceedanceProbability .. _doxid-namespacegpr_1_1neb_1_1oie_1a3ba874a2b283bcb9078d3312cef31c52: .. ref-code-block:: cpp :class: doxyrest-title-code-block double gaussianExceedanceProbability(double reference_mean, double reference_variance, double challenger_mean, double challenger_variance) Probability that a Gaussian challenger equals or exceeds a Gaussian reference under the independent-marginal difference approximation. .. index:: pair: function; saddleExists .. _doxid-namespacegpr_1_1neb_1_1oie_1ad762e132631d8bfa8970aea62109e014: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool saddleExists(const std::vector& energies) Strict interior maximum above BOTH endpoints (no single-hump assumption: any interior image above max(E0, E_last) qualifies). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - energies - Whole-band energies, indexed [0 .. n_images-1]. .. index:: pair: function; confidenceMet .. _doxid-namespacegpr_1_1neb_1_1oie_1acdd4f1d8ed9c2f424e1f054dac3aa8e1: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool confidenceMet(const std::vector& energies, const std::vector& posterior_energy_variance, int outer_iter) Global-confidence gate without a magic threshold. The band is confident when the worst-case UCB half-width on the energies, beta_t \* max interior std, has shrunk below the saddle PROMINENCE (interior max above the higher endpoint): posterior uncertainty no longer reaches across the barrier being resolved. The prominence, not the whole span, is the yardstick the span includes the reaction energy, which on an exothermic band dwarfs the barrier and fires confidence before the saddle is resolved. beta_t is the GP-UCB schedule; the prominence is data. Confidence implies saddleExists (prominence > 0). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - energies - Whole-band energies [0 .. n_images-1]. * - posterior_energy_variance - Whole-band posterior energy variance. * - outer_iter - Outer iteration t (1-based for the schedule). .. index:: pair: function; oieUtility .. _doxid-namespacegpr_1_1neb_1_1oie_1ab270818d7d3b702fd310eca782f5194e: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector oieUtility(const std::vector& energies, const std::vector& posterior_energy_variance, const std::vector& force_norm, const std::vector& force_variance, int outer_iter, bool confident) Per-interior-image standardized OIE utility (the TPE objective). Standardizes each channel (energy, force magnitude, VarE, VarF) across the interior images, then combines exploit (energy toward the saddle + residual NEB force accuracy via force posterior variance — not mean force magnitude) and explore (energy variance as PE coupling) weighted by the GP-UCB beta_t schedule. When the band is not yet globally confident the energy-exploit term is dropped so variance reduction dominates (explore-then-exploit ordering). All inputs are whole-band [0 .. n_images-1]; the returned vector has size n_images-2 (interior only). .. index:: pair: function; saddleIdentityUtility .. _doxid-namespacegpr_1_1neb_1_1oie_1a35b5f3fe69a1176855788ee8def93838: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector saddleIdentityUtility(const std::vector& energies, const std::vector& posterior_energy_variance) Per-image value of information for resolving the interior argmax. The current posterior-mean maximum and every challenger share the Gaussian probability that the challenger can change the maximum. Multiplying that probability by the queried image's posterior standard deviation directs measurements to the side of each unresolved comparison that can still reduce saddle-identity risk. .. index:: pair: function; tpePick .. _doxid-namespacegpr_1_1neb_1_1oie_1afc530686d52aa9dbeaa111ead159149f: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tpePick(const std::vector& interior_utility) TPE acquisition over the DISCRETE interior-image index axis. Splits interior indices into "good" (top gamma by utility) and "bad", fits Parzen l(x) on good and g(x) on bad, and returns argmax_x [log l(x) - log g(x)] over the exhaustive interior candidate set (Optuna's _compare specialized to the finite discrete space). Returns the interior index in [0 .. M-1]; map to a full-band index by adding 1. .. index:: pair: function; selectTpeOracleTarget .. _doxid-namespacegpr_1_1neb_1_1oie_1a7c9d2b1dbe50b56d68960930ca44afb4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`TpePickResult` selectTpeOracleTarget(const std::vector& energies, const std::vector& posterior_energy_variance, const std::vector& force_norm, const std::vector& force_variance, int outer_iter) Full OIE target decision with the strict-saddle CI constraint and every interior image eligible. Implements the control flow of the design doc: confident + saddle_exists -> the true interior energy maximum (CI candidate); otherwise the TPE density pick (explore-only utility when not confident, full utility when confident but no saddle). Inputs are whole-band [0 .. n_images-1]; force_variance may be empty (the explore arm then uses energy variance only). .. index:: pair: function; drawPosteriorObservationSample .. _doxid-namespacegpr_1_1neb_1_1oie_1abc5e0c2d6290bdc5fecf4b7b56c95f03: .. ref-code-block:: cpp :class: doxyrest-title-code-block Eigen::VectorXd drawPosteriorObservationSample(const Eigen::VectorXd& posterior_mean, const Eigen::MatrixXd& posterior_covariance, std::uint64_t seed = 0) Draw one joint posterior realization for action-level PS-BAX. The mean and covariance use the same channel ordering. A self-adjoint square root supports positive-semidefinite singular covariances. Invalid shapes, non-finite inputs, or a materially indefinite covariance return an empty vector. The draw is deterministic for a fixed seed.