class gpr::neb::OCINEBController

Overview

#include <gpr/neb/OCINEBController.h>
 
class OCINEBController {
public:
    // structs
 
    struct CiAdaptiveState;
 
    // construction
 
    OCINEBController(OCINEBConfig cfg);
 
    // methods
 
    void initBaseline(double baseline_force);
    bool baselineSet() const;
    void recordMmfHandoffForce(double handoff_force, bool handoff_data_ready = false);
    bool shouldPrepareMmfHandoff(bool trap_detected = false, bool band_information_exhausted = false, bool current_chain_certificate = false) const;
    bool shouldTrigger(double convForce, bool ci_active, long climbingImage, long numImages, bool ci_posterior_confident, bool trap_detected = false, std::size_t ntrain_now = 0, bool ci_is_energy_maximum = false, bool band_information_exhausted = false, bool oie_acquisition_quiet = false, bool rejected_seed_replay = false, bool current_chain_certificate = false, bool current_saddle_stencil_certificate = false, bool rejected_seed_position_matches = false, bool stagnation_handoff = false) const;
    void recordMmfPosteriorUpdate();
    void noteMmfRejectSurrogateSnapshot(detail::MmfSurrogateFingerprint surrogate);
    void noteMmfRejectActionSnapshot(detail::MmfPosteriorActionFingerprint action);
    void noteMmfSurrogateChange(detail::MmfSurrogateFingerprint surrogate);
    void noteMmfActionChange(detail::MmfPosteriorActionFingerprint action);
    void noteMmfMinModeProbeConsumed();
    detail::MmfPosteriorActionFingerprint previewMmfAction(ActiveLearningSession& session, const NEBPath& path, int ci_image_idx, const GPNEBConfig& neb_config) const;
    void releaseRecoveryOwnerForCertifiedHandover(const Eigen::VectorXd& owner_position, long owner_image);
    void releaseExhaustedRecoveryForCertifiedHandover();
    void openInformationGateAtNoiseFloor(const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate_now, long climbingImage = -1);
    bool rejectedMmfSeedPositionMatches(const Eigen::VectorXd& ci_position, const gpr::AtomsConfiguration* atoms_config = nullptr, long climbingImage = -1) const;
    bool rejectedMmfSeedReplay(const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate, long climbingImage = -1, const gpr::AtomsConfiguration* atoms_config = nullptr) const;
    bool rejectedMmfSeedReplay(const Eigen::VectorXd& ci_position, const detail::MmfPosteriorActionFingerprint& action, long climbingImage = -1, const gpr::AtomsConfiguration* atoms_config = nullptr) const;
    void noteMmfRejectCiPosition(const Eigen::VectorXd& ci_position, long climbingImage = -1);
    void recordUncertifiedMmfHookReject(double convForce, const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate, long climbingImage = -1);
    void recordUncertifiedMmfHookReject(double convForce, const Eigen::VectorXd& ci_position, detail::MmfPosteriorActionFingerprint action, long climbingImage = -1);
    bool wantsCurrentCiOracle(double convForce, bool ci_active, long climbingImage, long numImages, int outerIter, bool ci_posterior_confident, bool trap_detected = false, std::size_t ntrain_now = 0, bool ci_is_energy_maximum = false);
    void updateStability(long climbingImage);
    void updateStabilityForOuter(long climbingImage, int outerIter);
    MMFRunResult run(NEBPath& path, int ci_image_idx, NEBOracle& oracle, const GPNEBConfig& neb_config, ActiveLearningSession& session, bool trap_detected = false);
    double threshold() const;
    OCINEBDiagnostics diagnostics() const;
};

Detailed Documentation

Methods

void initBaseline(double baseline_force)

Seed the adaptive threshold from the first residual whose resulting adaptive bar remains above force_tolerance. Smaller bars cannot lease MMF before NEB convergence.

bool shouldPrepareMmfHandoff(bool trap_detected = false, bool band_information_exhausted = false, bool current_chain_certificate = false) const

Whether MMF has enough scheduler evidence to interrupt GP band work. GP fallback requires a measured trap or certified likelihood-floor exhaustion until its first MMF lease has been consumed.

bool shouldTrigger(double convForce, bool ci_active, long climbingImage, long numImages, bool ci_posterior_confident, bool trap_detected = false, std::size_t ntrain_now = 0, bool ci_is_energy_maximum = false, bool band_information_exhausted = false, bool oie_acquisition_quiet = false, bool rejected_seed_replay = false, bool current_chain_certificate = false, bool current_saddle_stencil_certificate = false, bool rejected_seed_position_matches = false, bool stagnation_handoff = false) const

True iff the trigger conditions are met for the current NEB state. ~trap_detected~ marks a GP fixed-point trap: the inner GP relaxation has converged but the true oracle force at the climbing image is still above conv_tol. In that state the relative threshold never fires (conv_force cannot fall further on the surrogate), so the trap is its own trigger path. ~stagnation_handoff~ leases the dimer after the band walk has stopped above the force tolerance. It does not lower the bar for a walk that is still descending.

void recordMmfPosteriorUpdate()

Record that retained MMF observations have refactorized the GP posterior used by the trap decision.

void noteMmfRejectSurrogateSnapshot(detail::MmfSurrogateFingerprint surrogate)

Enter AwaitingFirstTrainingGrowth with the model lease MMF consumed.

void noteMmfRejectActionSnapshot(detail::MmfPosteriorActionFingerprint action)

Enter the information wait with the posterior action MMF would consume.

void noteMmfSurrogateChange(detail::MmfSurrogateFingerprint surrogate)

Advance the information gate when the model lease MMF would consume changes.

void noteMmfActionChange(detail::MmfPosteriorActionFingerprint action)

Advance when the live GP posterior changes the first MMF decision, mode, or resolved trial geometry at the rejected seed.

void noteMmfMinModeProbeConsumed()

Record that the rejected action consumed a true-potential mode probe.

detail::MmfPosteriorActionFingerprint previewMmfAction(ActiveLearningSession& session, const NEBPath& path, int ci_image_idx, const GPNEBConfig& neb_config) const

Preview the first action selected by the same seed, model lease, and dimer configuration used by ~run~. The preview never invokes the accurate potential.

void releaseRecoveryOwnerForCertifiedHandover(const Eigen::VectorXd& owner_position, long owner_image)

Retire a stale recovery owner after another saddle candidate carries posterior confidence and an exact true-PES handover stencil.

void releaseExhaustedRecoveryForCertifiedHandover()

Retire an exhausted rejected-saddle lease after a different candidate carries the complete true-PES handover certificate.

void openInformationGateAtNoiseFloor(const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate_now, long climbingImage = -1)

The chain posterior is everywhere at or below the likelihood noise floor: the OIE has no admissible information left to supply, so waiting for training growth is vacuous and the burst’s own fresh oracle rows are the only remaining information source. Opens the gate unless the climbing image still sits bitwise at the position of the last REJECTED burst AND the surrogate is unchanged since that reject: the fresh dimer is a deterministic function of its seed geometry and the surrogate it consumes, so re-firing there replays the identical rejected trajectory every outer.

bool rejectedMmfSeedReplay(const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate, long climbingImage = -1, const gpr::AtomsConfiguration* atoms_config = nullptr) const

A deterministic replay requires both the rejected seed geometry and the surrogate information consumed by MMF to be unchanged.

void noteMmfRejectCiPosition(const Eigen::VectorXd& ci_position, long climbingImage = -1)

Record the seed geometry of a rejected burst (see ~openInformationGateAtNoiseFloor~).

void recordUncertifiedMmfHookReject(double convForce, const Eigen::VectorXd& ci_position, detail::MmfSurrogateFingerprint surrogate, long climbingImage = -1)

Treat a force-converged MMF burst that failed GP-NEB’s on-path certificate as a rejected lease for adaptive-trigger purposes.

bool wantsCurrentCiOracle(double convForce, bool ci_active, long climbingImage, long numImages, int outerIter, bool ci_posterior_confident, bool trap_detected = false, std::size_t ntrain_now = 0, bool ci_is_energy_maximum = false)

True iff the GP-NEB picker should spend its current oracle on the climbing image so the MMF hook can run with a true CI force.

void updateStability(long climbingImage)

Track the current climbing image: on a CI-index change, persist the outgoing image’s adaptive trigger state and restore the incoming one (also invalidating the cached mode). The handover gate is the GP posterior confidence, so there is no stability counter to keep.

void updateStabilityForOuter(long climbingImage, int outerIter)

Idempotent stability update keyed by GP-NEB outer iteration.

MMFRunResult run(NEBPath& path, int ci_image_idx, NEBOracle& oracle, const GPNEBConfig& neb_config, ActiveLearningSession& session, bool trap_detected = false)

Run one MMF burst on the CI image: kick along the seed mode, instantiate AtomicDimer, execute up to max_steps, harvest result + status + alignment. Writes the dimer-translated coord into ~path.image(ci_image_idx)~ on Helped; restores pre-kick coord on PositiveCurvature. ~trap_detected~ routes a trapped-CI burst to a FRESH local surrogate (the standalone gprd path) instead of leasing the over-smoothed session GP: at a GP fixed-point trap the leased global theta would just re-trap the dimer, so a sharp local fit on fresh oracle rows is required.

double threshold() const

Current adaptive trigger threshold (eOn ~current_threshold_~).

OCINEBDiagnostics diagnostics() const

Snapshot of trigger-gate state for verbose run diagnostics.