class pot::ActiveGPPotential

Overview

The learning surrogate as an rgpot potential wrapping an rgpot potential. More…

#include <gpr/potentials/ActiveGPPotential.h>
 
class ActiveGPPotential: public rgpot::PotentialBase {
public:
    // typedefs
 
    typedef ActiveGPConfig Config;
 
    // construction
 
    ActiveGPPotential(std::shared_ptr<gpr::neb::ActiveLearningSession> session, std::shared_ptr<rgpot::PotentialBase> oracle, Config config = Config());
 
    // methods
 
    std::tuple<double, rgpot::types::AtomMatrix, double> operator()(const rgpot::types::AtomMatrix& positions, const std::vector<int>& atmtypes, const std::array<std::array<double, 3>, 3>& box);
    std::uint64_t modelState() const;
    long oracleCalls() const;
    long trainingSize() const;
    void incorporate();
    ActiveGP& surrogate();
};

Detailed Documentation

The learning surrogate as an rgpot potential wrapping an rgpot potential.

ActiveGP already carries the learn-on-the-fly semantics, but it takes its oracle as a raw callback and answers on a raw-pointer signature, so only a caller written against gpridge can hold it. This states the same object in rgpot’s own contract: it consumes a PotentialBase as the oracle and IS a PotentialBase to whoever holds it, which is what lets a host compose it eOn selecting a backend, ASE through the rgpot bindings without knowing a Gaussian process is involved.

The third element of the returned tuple is the posterior energy standard deviation in eV, the uncertainty scale operator() already documents. ActiveGP gates on the energy variance and writes zero to that channel whenever the oracle answered, so a zero there marks a ground-truth call rather than a confident prediction: a host reading it as confidence has the meaning backwards.

PotType has no arm for a surrogate, and minting one is a change to the shared potentials schema rather than to this file, so the type reports UNKNOWN until that lands. Hosts dispatch on the object, not on the tag.

Construction

ActiveGPPotential(std::shared_ptr<gpr::neb::ActiveLearningSession> session, std::shared_ptr<rgpot::PotentialBase> oracle, Config config = Config())

Parameters:

session

the model this surrogate learns into.

oracle

ground truth; held for the surrogate’s lifetime.

config

variance gates, force certification, and refit cadence.

Methods

std::tuple<double, rgpot::types::AtomMatrix, double> operator()(const rgpot::types::AtomMatrix& positions, const std::vector<int>& atmtypes, const std::array<std::array<double, 3>, 3>& box)

Energy, forces, and posterior energy standard deviation (eV); zero marks an answer that came from the oracle.

std::uint64_t modelState() const

Surface epoch; changes only when an incorporation moved the posterior, so a host may key a cache on it.

void incorporate()

Host-declared incorporation boundary.

ActiveGP& surrogate()

The acquisition channel, kept on the concrete type: PotentialBase declares no batch entry point, so a host reaching for band-wide argmax-variance selection holds this type rather than the base.