struct gpr::neb::GPNEBConfig

Overview

Configuration for GP-NEB. More…

#include <gpr/neb/GPNEB.h>
 
struct GPNEBConfig {
    // typedefs
 
    typedef std::function<void(NEBPath&path, int ci_image_idx, int outer_iter, ActiveLearningSession&session, bool&converged, bool trap_detected)> OuterIterHook;
    typedef std::function<void(const NEBPath&path, int ci_image_idx, int outer_iter, ActiveLearningSession&session)> OuterIterHookReject;
    typedef std::function<bool(const NEBPath&path, int ci_image_idx, int outer_iter, double ci_force)> CurrentCiOraclePriority;
    typedef std::function<bool(const NEBPath&path, int ci_image_idx, int outer_iter, double ci_force, double max_chain_energy_variance, double posterior_variance_threshold, bool current_chain_certificate, bool planned_current_chain_or_ci, const ActiveLearningSession*session)> OieInnerHandoffPriority;
    typedef std::function<int(const NEBPath&path, int ci_image_idx, int outer_iter)> OieFixedImage;
    typedef std::function<OieFixedImageLease(const NEBPath&path, int ci_image_idx, int outer_iter)> OieFixedImageLeaseProvider;
 
    // enums
 
    enum BandEngineKind;
 
    // fields
 
    NEBMode mode = NEBMode::GP_OIE;
    NEBBatchOracle batch_oracle;
    Eigen::Index oracle_batch_chunk = 0;
    double conv_tol = 0.05;
    std::optional<ConvergenceNormType> convergence_force_norm;
    const double* oracle_energy_noise_rms = nullptr;
    const double* oracle_force_noise_rms = nullptr;
    const double* oracle_noise_rms = nullptr;
    bool* oracle_noise_updates_enabled = nullptr;
    std::function<void(const NEBOracleEvaluationContext&)> oracle_evaluation_context;
    std::function<void(const NEBOracleOptimizationOutcome&)> oracle_optimization_outcome;
    std::function<bool()> oracle_session_restart_requested;
    std::function<void(const NEBOracleSessionCheckpoint&)> oracle_session_path_checkpoint;
    int max_outer_iter = 200;
    bool outer_budget_per_image = false;
    double variance_spread_factor = 0.0;
    int max_inner_iter = 100;
    double inner_step_size = 0.01;
    double spring_constant = 5.0;
    double spring_constant_min = -1.0;
    bool climbing_image = true;
    bool climbing_image_converged_only = true;
    bool kernel_support_freezes_band = true;
    double ci_activation_tol = 0.5;
    double ci_activation_factor = 0.8;
    double unc_convergence = 0.05;
    bool restricted_variance_acquisition = false;
    int n_atoms = 0;
    bool remove_molecular_rigid_motion = false;
    std::vector<int> atomic_numbers;
    Eigen::VectorXd frozen_positions;
    std::vector<int> frozen_atomic_numbers;
    bool use_idpp = false;
    bool use_sidpp = true;
    double sidpp_alpha = 0.33;
    bool sidpp_geodesic = false;
    bool geodesic_retraction = false;
    bool use_relative_neighborhood_graph = false;
    bool use_geodesic_image_prior = false;
    std::vector<char> moving_atoms;
    std::array<double, 9> cell {};
    double pair_cutoff = 0.0;
    double pair_cutoff_width = 0.0;
    bool use_geometric_spring = false;
    bool uncertainty_aware_projection = false;
    AcquisitionType acquisition = AcquisitionType::TPE;
    bool use_three_phase_picker = true;
    double imspe_refit_skip_relative_tol = 0.0;
    bool seed_full_chain = false;
    double ucb_kappa = 1.0;
    int acquisition_seed_offset = 0;
    double attempt_wall_seconds = 0.0;
    std::shared_ptr<const gpr::WallClockLimit> wall_clock_limit;
    int band_refinement_max = 0;
    double band_certificate_force_scale = 0.0;
    bool attach_manifold_chart = false;
    double first_attempt_wall_seconds = 0.0;
    int evals_per_iter = 1;
    bool use_triplet = false;
    unsigned int seed = 42;
    bool verbose = true;
    bool record_band_trace = false;
    bool record_band_trace_snapshot = true;
    bool record_band_trace_geometry = false;
    bool record_composition_trace = false;
    bool dimer_use_global_gp = true;
    std::optional<bool> dimer_analytic_curvature;
    gpr::optim::SecantHessianConfig secant_hessian;
    bool has_initial_path = false;
    EigenMatrix initial_path;
    std::vector<double> initial_rest_lengths;
    int oracle_transition_focal_image = -1;
    gpr::UncertaintyMode uncertainty_mode = gpr::UncertaintyMode::MAP;
    gpr::GaussianProcessRegression::VarianceConvention variance_convention                                                                    = gpr::GaussianProcessRegression::VarianceConvention::Latent;
    bool use_psis_laplace = false;
    bool use_psis_deterministic = true;
    bool use_delta_method = false;
    bool disable_output_normalization = false;
    bool output_scale_floor = false;
    bool use_zbl_prior_mean = false;
    bool use_ff_prior_mean = false;
    bool learn_likelihood_noise = false;
    double robust_nu = 0.0;
    bool fit_step_stop = true;
    bool use_virtual_observations = false;
    double virtual_obs_noise = 0.04;
    bool use_drift_budget = true;
    bool channel_survey = false;
    bool use_geodesic_prior = false;
    bool use_adaptive_prune = true;
    int adaptive_prune_growth = 5;
    int adaptive_prune_max_observations = 0;
    bool use_resolution_dedup = true;
    std::vector<int> symmetry_permutation;
    int refit_training_revisions = 5;
    bool use_chem_factorized_hyper = false;
    GPModelProfile model_profile = GPModelProfile::EXTENDED;
    bool active_posterior_refits = false;
    bool environment_residuals = false;
    bool atomic_environments = false;
    bool additive_pair_residuals = false;
    PriorMeanStatistic prior_mean_statistic = PriorMeanStatistic::Mean;
    std::string rgsaddle_library;
    bool rgsaddle_refine = false;
    bool use_ls_prior = true;
    bool use_lognormal_magn_prior = false;
    std::string gp_population_prior;
    bool ls_seed_chemical_floor = false;
    bool principled_nugget = true;
    bool use_rigid_null_deflation = false;
    bool subset_failure_escalation = true;
    double rgmin_initial_log_move = 1.0;
    bool rgmin_initial_log_move_whole_session = true;
    bool rgmin_warm_start = false;
    bool skip_unchanged_subset_fit = false;
    bool evidence_refit_trigger = false;
    double kappa_max = 0.0;
    int rff_features = 0;
    double rff_force_tol_fraction = 0.0;
    int hutch_num_probes = 0;
    bool use_hssvd_solver = true;
    bool use_hssvd_objective_contractions = true;
    double hssvd_dual_chop_tol = 1e-6;
    int hssvd_dual_randomized_sketch = 0;
    bool hssvd_dual_lapack_rrr = true;
    int hssvd_local_active_set_size = 0;
    int hssvd_local_posterior_active_set_size = 0;
    bool local_tier_classic = false;
    int per_image_min_train = 3;
    int per_image_knn = 10;
    int scalapack_block_size = 0;
    int scalapack_nprow = 0;
    gpr::linalg::DistributedFactorization linalg_mode                                               = gpr::linalg::DistributedFactorization::Reproducible;
    bool stable_posterior_variance = false;
    double theta_shift_skip_tol = 0.0;
    bool theta_shift_skip_auto = false;
    int rgmin_method = 3;
    bool rgmin_method_set = false;
    gpr::HyperparameterOptimizationMode hyperparameter_mode                                                     = gpr::HyperparameterOptimizationMode::SCG;
    gpr::HyperparameterObjectiveMode hyperparameter_objective                                                       = gpr::HyperparameterObjectiveMode::NLML;
    bool hyperparameter_objective_explicit = false;
    int gp_fps_history = 10;
    bool gp_anneal_stage = false;
    int gp_anneal_budget = 0;
    int gp_anneal_replicas = 4;
    int gp_anneal_every = 0;
    int gp_variance_subset = 0;
    int max_inner_iter_gp = 0;
    bool oie_fixed_point_measured_step                                = true;
    bool oie_fixed_point_reparam                          = true;
    bool oie_hook_reparam                   = true;
    bool ci_index_certificate = false;
    bool force_stop_certificate = false;
    gpr::optim::VibrationalStencil vibrational_stencil                                                = gpr::optim::VibrationalStencil::Full;
    double ci_stencil_step = gpr::optim::defaultStencilStep();
    bool saddle_stage_follows = false;
    bool band_midpoint_certificate = false;
    bool hold_refined_spacing = true;
    bool band_leak_bound = false;
    bool band_stall = true;
    double gp_local_fraction = 0.1;
    double gp_local_radius = 0.0;
    int gp_local_window = 16;
    double gp_local_trust = 0.3;
    int gp_local_inner_max = 20;
    int gp_local_refit_iters = 0;
    double gp_local_inner_tol_factor = 0.5;
    bool gp_local_phase = true;
    int gp_local_refit_every = 4;
    double gp_local_noise = 1e-3;
    double gp_local_pair_cutoff = 9.5;
    double gp_local_pair_spacing = 0.0;
    double gp_local_far_trust = 0.5;
    double gp_local_far_refresh = 0.05;
    bool gp_local_initial_sweep = true;
    int gp_local_batch = 1;
    int gp_local_batch_growth = 8;
    int gp_local_batch_max = 3;
    int gp_local_sweep_images = 0;
    bool gp_local_jacobi = false;
    double gp_local_grow_radius = 3.0;
    bool gp_local_safeguard = true;
    bool gp_local_keep_memory = true;
    bool gp_local_residual = true;
    double gp_local_pair_split = 7.0;
    double gp_local_pair_tail_refresh = 0.0;
    int gp_local_cycles = 2;
    bool gp_local_sweep = false;
    bool gp_local_carry_springs = false;
    double lbfgs_max_move = 0.1;
    int lbfgs_memory = 20;
    BandEngineKind band_engine = BandEngineKind::RgLbfgs;
    double lbfgs_inverse_curvature = 0.01;
    double lbfgs_finite_difference = 1e-6;
    bool lbfgs_auto_scale = true;
    bool lbfgs_angle_reset = true;
    bool lbfgs_distance_reset = true;
    double lbfgs_newton_agreement = kDefaultLbfgsNewtonAgreement;
    int lbfgs_sketch_history = 0;
    uint64_t lbfgs_sketch_seed = 1;
    int lbfgs_sketch_h0_rank = 0;
    double lbfgs_sketch_h0_eps = 1e-3;
    int reparam_period = 0;
    double reparam_tol = -1.0;
    bool eon_inner_mode = false;
    double inner_conv_tol = 0.05;
    double gp_tol_divisor = 10.0;
    double inner_unc_relative = 0.0;
    int num_bigiter_initparam = 1;
    DistanceMetricType trust_metric = DistanceMetricType::EMD;
    bool use_adaptive_trust = false;
    bool rho_trust = false;
    double trust_radius = 0.5;
    double trust_adaptive_A = 1.3;
    double trust_adaptive_floor = 0.25;
    double trust_t_min = 0.15;
    double trust_delta_explore = 0.35;
    int trust_half_life = 50;
    double trust_ratio_at_limit = 0.4;
    bool scalefree_trust = false;
    double scalefree_tau = 0.5;
    std::function<void(gpr::InputParameters&, gpr::AtomsConfiguration&)> gp_setup;
    ObservationVarianceEstimator observation_variance_estimator;
    OuterIterHook outer_iter_hook;
    OuterIterHookReject outer_iter_hook_reject;
    CurrentCiOraclePriority current_ci_oracle_priority;
    OieInnerHandoffPriority oie_inner_handoff_priority;
    OieFixedImage oie_fixed_image;
    OieFixedImageLeaseProvider oie_fixed_image_lease;
    const policy::TrainingPolicy* training_policy = nullptr;
    policy::SearchKind training_search_kind = policy::SearchKind::Neb;
    static double kDefaultLbfgsNewtonAgreement = 2.0;
 
    // methods
 
    static bool isRgsaddleEngine(BandEngineKind kind);
    static void requireLbfgsNewtonAgreement(double value);
    static bool parseBandEngineKind(const std::string& name, BandEngineKind& out);
};

Detailed Documentation

Configuration for GP-NEB.

Typedefs

typedef std::function<void(NEBPath&path, int ci_image_idx, int outer_iter, ActiveLearningSession&session, bool&converged, bool trap_detected)> OuterIterHook

Per-outer-iter hook fired AFTER the climbing-image marker is (re)assigned. The hook can mutate ~path.image(ci_idx)~ (move the CI image position to a dimer-refined location, update its energy and gradient) and append observations to the session. Setting ~converged~ to true breaks the outer loop.

The OCINEB controller uses this hook to run short MMF bursts on the CI image while the NEB outer loop is still iterating, so the dimer’s translated position feeds back into the next NEB inner relaxation rather than being dropped at the end of the run.

typedef std::function<void(const NEBPath&path, int ci_image_idx, int outer_iter, ActiveLearningSession&session)> OuterIterHookReject

Optional feedback fired when an outer hook reports convergence but the GP-NEB on-path certificate rejects it. OCINEB uses this to back off deterministic MMF replays until OIE adds information to the surrogate.

typedef std::function<bool(const NEBPath&path, int ci_image_idx, int outer_iter, double ci_force)> CurrentCiOraclePriority

Optional pre-oracle request for hooks that require a true climbing-image force before they can run. The callback sees the current GP-relaxed climbing-image force and returns true only when the hook is eligible to consume a current true CI oracle.

typedef std::function<bool(const NEBPath&path, int ci_image_idx, int outer_iter, double ci_force, double max_chain_energy_variance, double posterior_variance_threshold, bool current_chain_certificate, bool planned_current_chain_or_ci, const ActiveLearningSession*session)> OieInnerHandoffPriority

Optional pre-inner request for OCI handoff controllers. It may bypass the GP-OIE inner relaxation only when GPNEB has already verified a current-chain certificate and the caller confirms a quiet handoff state.

typedef std::function<int(const NEBPath&path, int ci_image_idx, int outer_iter)> OieFixedImage

Optional block-coordinate ownership for one interior image during an OIE inner relaxation. The provider is evaluated once per outer step; an invalid or endpoint index leaves the full band mobile.

typedef std::function<OieFixedImageLease(const NEBPath&path, int ci_image_idx, int outer_iter)> OieFixedImageLeaseProvider

Extended fixed-image ownership for controllers that must preserve the climbing marker while requesting one posterior-growth acquisition.

Fields

NEBBatchOracle batch_oracle

Optional whole-batch oracle: when set, the points a rank owns of every oracle step (band images, stencil displacements, probes) go through one batched call instead of one oracle call per point. Not used while ~oracle_evaluation_context~ is set, since that hook acts per point.

Eigen::Index oracle_batch_chunk = 0

pot::OracleBatchLayout::chunk for every oracle step: 0 shares the points out one by one and evaluates a rank’s points in one call; K cuts a step into contiguous chunks of K points, so an engine whose batched forward depends on the batch composition gives the same values at every rank count.

std::optional<ConvergenceNormType> convergence_force_norm

Explicit norm shared by measured forces, surrogate forces and refits. Omission preserves the physical-atom and whole-band defaults.

bool remove_molecular_rigid_motion = false

Remove whole-molecule translation and rotation from path geometry and trial steps. This requires an isolated molecule with every atom free; periodic cells and fixed atoms retain their physical frame. Generic Cartesian objectives opt in explicitly.

bool uncertainty_aware_projection = false

UA-NEB: remove the tangent component of the band force in the Sigma^{-1} metric built from the surrogate’s per-degree-of-freedom force variance, rather than the Euclidean one (Yu and Wang, DOI 10.48550/arxiv.2605.24401). A direction the model has not resolved then steers the band less than one it has. Off by default: with it off the projection arithmetic is untouched.

int acquisition_seed_offset = 0

Acquisition seed offset for independent restarts: added to the outer counter wherever a deterministic acquisition seed is derived (TPE round, PS-BAX sampler), so restart k explores a different deterministic trajectory than restart k-1 while a single run stays bitwise reproducible.

double attempt_wall_seconds = 0.0

Per-attempt wall budget in seconds. The outer loop exits honestly (unconverged, verdict printed) when its own elapsed time exceeds this, so a grinding attempt yields the remaining budget to the caller’s restart loop instead of being killed verdict-less from outside. Non-positive disables.

std::shared_ptr<const gpr::WallClockLimit> wall_clock_limit

Absolute deadline shared by the driver, nested hyperparameter fits, surrogate relaxation, certificates, and oracle entry points.

int band_refinement_max = 0

Certificate-driven band refinement (runOCINEBRefined). A converged band whose CI-adjacent perpendicular true force exceeds band_certificate_force_scale is under-resolved at the ridge and is searched again at double the image count, up to band_refinement_max times. Zero refinements retains plain runOCINEB behaviour. A positive force scale requests an additional path-force criterion in eV/A; a non-positive value leaves convergence to the selected CI/path mode.

bool attach_manifold_chart = false

Optional molecular chart. Cartesian pair descriptors retain their chemical length scales when no chart is attached.

double first_attempt_wall_seconds = 0.0

Wall budget for the first (coarsest) refinement attempt so a band that cannot converge at the requested resolution yields to refinement instead of consuming the whole cell. Non-positive uses attempt_wall_seconds unchanged.

std::optional<bool> dimer_analytic_curvature

Select analytic GP curvature independently of the covariance solver. An unset override retains the solver-based selection.

True-force secant curvature shared by the NEB, dimer and saddle handoff. All consumers are disabled by default.

std::vector<double> initial_rest_lengths

Spring rest lengths (one per segment of initial_path) a warm-started band holds for its whole attempt; empty keeps the zero-rest-length energy-weighted spring.

double robust_nu = 0.0

Student-t degrees of freedom of the robust row model; 0 keeps the Gaussian likelihood.

bool fit_step_stop = true

Stop each hyperparameter fit at the stationarity scale of the auto skip test (the model turns this on with that mode).

std::vector<int> symmetry_permutation

Endpoint-exchange symmetry of a degenerate rearrangement: slot a of the mapped geometry takes atom symmetry_permutation[a]. The orthogonal map and translation are fitted to the band’s own endpoints (~requireEndpointSymmetry~), which must each land within trust_radius of the other. Every oracle row then also trains the session at its symmetry image, an exact second observation for a potential invariant under relabelling like atoms and rigid (including improper) motion. Needs a session, mode GP_OIE or GP_AIE, an isolated molecule and every atom moving. Empty, the default, leaves the training set untouched. gp-endpoint-symmetry.

bool rgsaddle_refine = false

Refine the converged band maximum with order-1 P-RFO on the true surface. The linked rgsaddle library runs it.

bool use_lognormal_magn_prior = false

Opt-in log-normal prior on the positive signal variance magnSigma2 (PriorLogNormal). Off keeps the half-Student-t (classic profiles) or half-Cauchy (MAP) magnitude prior. gp-lognormal-magn-prior.

std::string gp_population_prior

Population prior table (gpr/prior/PopulationPrior.h); empty is none.

bool local_tier_classic = false

Run the per-image local tier under the classic joint [E,F] profiles too: each interior image predicts from its own model of its k nearest rows once it has per_image_min_train of them, and the single global posterior is promoted to a random-feature regulariser (prior-mean aware) once every interior image is local. The exact global model then stops growing with the training set.

bool hyperparameter_objective_explicit = false

True when the objective was named on the command line. A model profile (gprd_zbl, chemgp) carries its own default objective; an explicit request outranks that default instead of being silently replaced by it.

bool ci_index_certificate = false

Optional first-order-saddle certificate on the converged climbing image: the true-PES curvature along the two lowest surrogate modes must satisfy c1 < 0 <= c2; otherwise the image is displaced along the offending mode and the band is warm-started again (bounded by 3N attempts).

bool force_stop_certificate = false

Optional certificate of a stopped search. With true, a climbing image whose true force is under tolerance is certified by one Cartesian stencil, a convergence claim the force did not make is gated on the vibrational index, and a higher-order point is left along its extra negative mode. With false the search returns at the force stop and spends no further evaluation there; the index of the returned geometry is then a separate validation.

Coordinates the true-oracle Hessian stencils displace. Full measures every Cartesian coordinate. Vibrational measures only the vibrational directions; its resolution can call a borderline mode resolved where Full calls it unresolved.

double ci_stencil_step = gpr::optim::defaultStencilStep()

Step of the climbing-image index certificate’s central-difference stencil, the validation stencil’s step.

bool saddle_stage_follows = false

A later saddle stage owns certification. A force-stopped band hands the climbing image over and does not buy a Cartesian stencil: that stencil ends unresolved and the saddle measures the index at the geometry it reaches. When this is false the band is the final stage and a higher-order stencil still refuses the search.

bool band_midpoint_certificate = false

Require the relaxed segment midpoints to lie below the climbing image. This additional path-resolution check can purchase oracle observations.

bool hold_refined_spacing = true

A refinement resamples the converged band at the chord-leak equidistribution (images where the path turns under force) with the count set by the O(h^2) law, and the refined attempt holds that spacing through spring rest lengths (initial_rest_lengths) so the uniform springs cannot spread it out again. Off: the resampled band relaxes under the plain springs.

bool band_leak_bound = false

Require the chord leak at the climbing-image neighbours to be within the force tolerance as well (stricter than the eight-image reference band, which carries the same leak); the leak is always reported.

bool band_stall = true

Re-climb the lowest certified image when the max band force makes no progress of one force tolerance. The quiet window is the longer of the ordered image pairs and the polished subspace. On by default for every band mode.

ObservationVarianceEstimator observation_variance_estimator

Optional joint energy-and-gradient variance estimator for OIE. An empty callback supplies zero uncertainty; force-based strategies then reduce to their deterministic force score.

const policy::TrainingPolicy* training_policy = nullptr

Null keeps every training decision the engine already makes. The pointer is not owned. It must outlive the search.

Label published to the policy. runOCINEB sets OciNeb.

static double kDefaultLbfgsNewtonAgreement = 2.0

Residual (eV/A) above which a 1/kappa step undershoots the Newton step and the curvature cap keeps the configured band trust. A step of length 1/kappa changes the force by 1 eV/A, so the default stays within a factor of two of the Newton step.

Methods

static bool isRgsaddleEngine(BandEngineKind kind)

Whether a band engine kind runs on the rgsaddle library.

static void requireLbfgsNewtonAgreement(double value)

Reject a negative or non-finite agreement. Zero is off: the curvature cap keeps the configured band trust. The value is not clamped.

static bool parseBandEngineKind(const std::string& name, BandEngineKind& out)

Parse neb-band-engine. Empty selects the production default (RgLbfgs). Unknown names return false.