struct RgpotEngineCallbacksΒΆ

Host callbacks for learning engines. oracle evaluates the ground truth (same conventions and three-valued return as rgpot_engine_force; variance is absent because the oracle is exact). on_acquire fires when the engine delegates a point; on_model_update fires after each incorporation with the new model-state value and marks the boundary at which history-based host state (quasi-Newton memory, cached factorizations) must be reset. Either notification pointer may be NULL.

#include <engine_c_abi.h>
 
struct RgpotEngineCallbacks {
    // fields
 
    void* ctx;
    int(* oracle)(void *ctx, long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, const double *box);
    void(* on_acquire)(void *ctx, rgpot_engine_acquire_reason reason);
    void(* on_model_update)(void *ctx, unsigned long long model_state);
};