50#ifdef RGPOT_ENGINE_BUILD
51#define RGPOT_ENGINE_API __declspec(dllexport)
53#define RGPOT_ENGINE_API __declspec(dllimport)
56#define RGPOT_ENGINE_API __attribute__((visibility("default")))
68 double *positions,
double *box);
70#define RGPOT_ENGINE_ABI_VERSION 1
101#define RGPOT_ENGINE_GPR_GATE_MAGIC 0x47505247u
102#define RGPOT_ENGINE_GPR_GATE_VERSION 1u
127 const double *positions,
128 const int *atomicNrs,
double *forces,
129 double *energy,
double *variance,
132 void *transform_user);
149 RgpotEnginePot *pot,
long nSystems,
long nAtoms,
const double *positions,
150 const int *atomicNrs,
double *forces,
double *energies,
double *variances,
152 void *transform_user);
185 int (*
oracle)(
void *
ctx,
long nAtoms,
const double *positions,
186 const int *atomicNrs,
double *forces,
double *energy,
211 size_t msg_len,
char *errbuf,
RGPOT_ENGINE_API void rgpot_engine_destroy(RgpotEnginePot *pot)
rgpot_engine_acquire_reason
Why a learning engine delegated a point to the oracle.
@ RGPOT_ACQUIRE_REJECT
geometry above sigma_hi, evaluated but not incorporated
@ RGPOT_ACQUIRE_BATCH
batched acquisition sweep
@ RGPOT_ACQUIRE_CERTIFY
verifying a surrogate convergence claim
@ RGPOT_ACQUIRE_VARIANCE
predictive variance above sigma_lo
RGPOT_ENGINE_API int rgpot_engine_force_batch(RgpotEnginePot *pot, long nSystems, long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energies, double *variances, const double *boxes, rgpot_engine_coord_transform transform, void *transform_user)
Strided-uniform batched evaluation: nSystems systems sharing one composition (atomicNrs,...
RGPOT_ENGINE_API int rgpot_engine_force(RgpotEnginePot *pot, long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box, rgpot_engine_coord_transform transform, void *transform_user)
Energy + forces.
RGPOT_ENGINE_API long rgpot_engine_neighbor_options(const RgpotEnginePot *pot, RgpotEngineNeighborOptions *opts, long capacity)
Writes up to capacity declarations into opts and returns the total count (call with capacity 0 to siz...
RGPOT_ENGINE_API RgpotEnginePot * rgpot_engine_create(const void *config, size_t config_len, char *errbuf, size_t errlen)
Create a potential from a Cap'n Proto flat-array message whose root struct is the engine's params arm...
RGPOT_ENGINE_API int rgpot_engine_available(void)
struct RgpotEnginePot RgpotEnginePot
RGPOT_ENGINE_API int rgpot_engine_set_callbacks(RgpotEnginePot *pot, const RgpotEngineCallbacks *callbacks)
Register host callbacks.
int(* rgpot_engine_coord_transform)(void *user, long nAtoms, double *positions, double *box)
Optional host-side transform applied by the engine to its scratch copy of (positions,...
RGPOT_ENGINE_API int rgpot_engine_hint(RgpotEnginePot *pot, const void *msg, size_t msg_len, char *errbuf, size_t errlen)
Runtime hint/tunable message: a Cap'n Proto flat-array whose root is the engine's hint arm on the sha...
RGPOT_ENGINE_API int rgpot_engine_abi_version(void)
RGPOT_ENGINE_API unsigned long long rgpot_engine_model_state(const RgpotEnginePot *pot)
Monotone model-state counter for engines with internal mutable state.
Host callbacks for learning engines.
void(* on_model_update)(void *ctx, unsigned long long model_state)
void(* on_acquire)(void *ctx, rgpot_engine_acquire_reason reason)
int(* oracle)(void *ctx, long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, const double *box)
unsigned magic
RGPOT_ENGINE_GPR_GATE_MAGIC.
unsigned long long refitTrainingRevisions
Refit cadence in training-set appends; zero refits at every incorporation boundary.
double sigmaLoFactor
Answer from the model below this multiple of its likelihood noise.
unsigned version
RGPOT_ENGINE_GPR_GATE_VERSION.
double sigmaHiFactor
Above this multiple the geometry is not learned from.
double certifyBelowForce
Predicted force magnitude under this (eV/Angstrom) forces a ground-truth call, so a driver's converge...
Neighbor-list declaration.
int full_list
1 full, 0 half
int strict
0: over-inclusion tolerated