.. index:: pair: class; pot::ActiveGPPotential .. _doxid-classpot_1_1_active_g_p_potential: class pot::ActiveGPPotential ============================ .. toctree:: :hidden: Overview ~~~~~~~~ The learning surrogate as an rgpot potential wrapping an rgpot potential. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ActiveGPPotential: public rgpot::PotentialBase { public: // typedefs typedef :ref:`ActiveGPConfig` :target:`Config`; // construction :ref:`ActiveGPPotential`(std::shared_ptr<:ref:`gpr::neb::ActiveLearningSession`> session, std::shared_ptr oracle, :ref:`Config` config = :ref:`Config`()); // methods std::tuple :ref:`operator()`(const rgpot::types::AtomMatrix& positions, const std::vector& atmtypes, const std::array, 3>& box); std::uint64_t :ref:`modelState`() const; long :target:`oracleCalls`() const; long :target:`trainingSize`() const; void :ref:`incorporate`(); :ref:`ActiveGP`& :ref:`surrogate`(); }; .. _details-classpot_1_1_active_g_p_potential: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ The learning surrogate as an rgpot potential wrapping an rgpot potential. :ref:`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. :ref:`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 ------------ .. index:: pair: function; ActiveGPPotential .. _doxid-classpot_1_1_active_g_p_potential_1a3e85728fbdacaac7f73621c13476ae80: .. ref-code-block:: cpp :class: doxyrest-title-code-block ActiveGPPotential(std::shared_ptr<:ref:`gpr::neb::ActiveLearningSession`> session, std::shared_ptr oracle, :ref:`Config` config = :ref:`Config`()) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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 ------- .. index:: pair: function; operator() .. _doxid-classpot_1_1_active_g_p_potential_1aac24a37885d4e83aa7c25c2089ca711d: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::tuple operator()(const rgpot::types::AtomMatrix& positions, const std::vector& atmtypes, const std::array, 3>& box) Energy, forces, and posterior energy standard deviation (eV); zero marks an answer that came from the oracle. .. index:: pair: function; modelState .. _doxid-classpot_1_1_active_g_p_potential_1a266cdbce3042033498d59e20b5143294: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::uint64_t modelState() const Surface epoch; changes only when an incorporation moved the posterior, so a host may key a cache on it. .. index:: pair: function; incorporate .. _doxid-classpot_1_1_active_g_p_potential_1ac57c32d651514e80bd47205c8d8a7b60: .. ref-code-block:: cpp :class: doxyrest-title-code-block void incorporate() Host-declared incorporation boundary. .. index:: pair: function; surrogate .. _doxid-classpot_1_1_active_g_p_potential_1aa245bb19744c5e6622e8c85493dd84c5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`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.