Global Namespace¶
Overview¶
// namespaces
namespace Eigen;
namespace Kokkos;
namespace atmd;
namespace aux;
namespace aux::distance;
namespace ceres;
namespace dimer;
namespace featomic;
namespace funcmin;
namespace gaussianinfluence;
namespace gpr;
namespace gpr::abi;
namespace gpr::bo;
namespace gpr::bo::testing;
namespace gpr::capi;
namespace gpr::capi::testing;
namespace gpr::cli;
namespace gpr::coord;
namespace gpr::derivatives;
namespace gpr::derivatives::generated;
namespace gpr::extended;
namespace gpr::extended::directed;
namespace gpr::extended::scaled;
namespace gpr::field;
namespace gpr::geometry;
namespace gpr::htst;
namespace gpr::io;
namespace gpr::irc;
namespace gpr::itergp;
namespace gpr::kokkos_environment;
namespace gpr::laplace;
namespace gpr::linalg;
namespace gpr::linalg::backend;
namespace gpr::linalg::canonical;
namespace gpr::linalg::cutlass;
namespace gpr::linalg::fixed;
namespace gpr::linalg::kokkos_joint;
namespace gpr::linalg::linop;
namespace gpr::linalg::portable_tiles;
namespace gpr::linalg::schemeii;
namespace gpr::memory;
namespace gpr::neb;
namespace gpr::neb::oie;
namespace gpr::numerics;
namespace gpr::optim;
namespace gpr::optim_abi;
namespace gpr::pairlocal;
namespace gpr::policy;
namespace gpr::posterior;
namespace gpr::potentials;
namespace gpr::priors;
namespace gpr::quantum;
namespace gpr::quantum::bathresponse;
namespace gpr::quantum::beadcorrection;
namespace gpr::quantum::elementfluct;
namespace gpr::quantum::functionaldesign;
namespace gpr::quantum::gaussian;
namespace gpr::quantum::ratepost;
namespace gpr::quantum::ringbath;
namespace gpr::quantum::ringspread;
namespace gpr::quantum::spectraldet;
namespace gpr::readcon_abi;
namespace gpr::readcon_db_abi;
namespace gpr::rgmin_abi;
namespace gpr::rgpot_abi;
namespace gpr::runtime;
namespace gpr::sfc;
namespace gpr::ski;
namespace gpr::startup;
namespace gpr::track;
namespace gpr::uasaddle;
namespace gpr::vecchia;
namespace math;
namespace pot;
namespace quantumbridge;
namespace quantumbridge::quadrature;
namespace quantumbridge::secondcumulantdetail;
namespace readcon_db;
namespace rgpot;
namespace std;
// typedefs
typedef int cusolverStatus_t;
typedef int cublasStatus_t;
typedef void* cusolverDnHandle_t;
typedef void* cublasHandle_t;
typedef int cublasFillMode_t;
typedef int cublasOperation_t;
typedef int cublasDiagType_t;
typedef int cublasSideMode_t;
typedef struct gpr_scheme2_cuda_table_v1 gpr_scheme2_cuda_table_v1;
typedef struct gpr_scheme2_cuda_operand_v1 gpr_scheme2_cuda_operand_v1;
typedef struct gpr_scheme2_cuda_task_v1 gpr_scheme2_cuda_task_v1;
typedef struct EonRelaxEngine EonRelaxEngine;
typedef int (*eon_relax_surface_fn)(
void *user,
eon_relax_surface_request_t *req
);
typedef rgsaddle_version_t gpr_rgsaddle_version_t;
typedef rgsaddle_surface_request_t gpr_rgsaddle_surface_request_t;
typedef rgsaddle_surface_fn gpr_rgsaddle_surface_fn;
typedef rgsaddle_band_config_t gpr_rgsaddle_band_config_t;
typedef rgsaddle_report_t gpr_rgsaddle_report_t;
typedef rgsaddle_sella_min_config_t gpr_rgsaddle_sella_min_config_t;
typedef rgsaddle_minmode_config_t gpr_rgsaddle_minmode_config_t;
typedef rgsaddle_sella_saddle_config_t gpr_rgsaddle_sella_saddle_config_t;
typedef rgsaddle_index1_config_t gpr_rgsaddle_index1_config_t;
typedef rgsaddle_kappa_config_t gpr_rgsaddle_kappa_config_t;
typedef rgsaddle_kappa_report_t gpr_rgsaddle_kappa_report_t;
typedef rgsaddle_hessian_fn gpr_rgsaddle_hessian_fn;
// enums
enum ConvergenceNormType;
enum DebugLevels;
enum DimerAlgorithm;
enum Directions;
enum DistanceMetricType;
enum FrozenAndMovingAtoms;
enum OptimizationAlgorithms;
enum OptionsForGradCalculation;
enum Potentials;
enum eon_relax_kind_t;
enum eon_relax_neb_status_t;
enum eon_relax_rc_t;
enum rgpot_engine_gpr_hill_policy;
enum rgpot_engine_gpr_hint_kind;
enum rgpot_engine_gpr_phase;
// structs
struct Compensated;
struct RgpotEngineGprHint;
struct RgpotEngineGprResidualPrior;
struct RgpotEngineGprStats;
struct RgpotEnginePot;
struct eon_relax_band_t;
struct eon_relax_outcome_t;
struct eon_relax_surface_request_t;
struct eon_relax_version_t;
struct gpr_atoms_config_t;
struct gpr_bq_config_t;
struct gpr_bq_fit_report_t;
struct gpr_bq_integral_report_t;
struct gpr_bq_loo_report_t;
struct gpr_bq_uncertainty_t;
struct gpr_calibration_report_t;
struct gpr_derivative_options;
struct gpr_derivative_report;
struct gpr_dimer_config_t;
struct gpr_dimer_report_t;
struct gpr_fes_config_t;
struct gpr_fes_rate_config_t;
struct gpr_fes_rate_report_t;
struct gpr_htst_half;
struct gpr_htst_options;
struct gpr_lj_params_t;
struct gpr_local_band_config_t;
struct gpr_marginal_likelihood_report_t;
struct gpr_minimize_config_t;
struct gpr_model_config_t;
struct gpr_neb_config_t;
struct gpr_neb_report_t;
struct gpr_noise_floor_report;
struct gpr_ocineb_config_t;
struct gpr_periodic_band_config_t;
struct gpr_rff_selection;
struct gpr_scheme2_cuda_operand_v1;
struct gpr_scheme2_cuda_table_v1;
struct gpr_scheme2_cuda_task_v1;
// global variables
static int CUSOLVER_STATUS_SUCCESS = 0;
static int CUBLAS_STATUS_SUCCESS = 0;
static int CUBLAS_FILL_MODE_LOWER = 0;
static int CUBLAS_OP_N = 0;
static int CUBLAS_OP_T = 1;
static int CUBLAS_DIAG_NON_UNIT = 0;
static int CUBLAS_SIDE_LEFT = 0;
size_t config_len;
size_t char* errbuf;
size_t char size_t errlen;
uint64_t epoch;
eon_relax_band_t* band;
eon_relax_band_t eon_relax_surface_fn surface;
eon_relax_band_t eon_relax_surface_fn void* user;
eon_relax_band_t eon_relax_surface_fn void eon_relax_outcome_t* out;
int status;
// global functions
void* gpr_stdpar_environment_create_v1(char* error, std::size_t capacity);
void gpr_stdpar_environment_destroy_v1(void* workspace);
int gpr_stdpar_environment_blocks_v1(void* workspace, const gpr::detail::EnvironmentPairBatch* batch, double* blocks, char* error, std::size_t capacity);
void* gpr_stdpar_environment_create_v1(char* error, std::size_t capacity);
void gpr_stdpar_environment_destroy_v1(void* workspace);
int gpr_stdpar_environment_blocks_v1(void* workspace, const gpr::detail::EnvironmentPairBatch* batch, double* blocks, char* error, std::size_t capacity);
static void add_term(struct Compensated* state, double value);
static void add_product(struct Compensated* state, double left, double right);
float compensated_product_sum(double* out, const double* left, const double* right, int n);
void Cblacs_pinfo(int* a, int* b);
void Cblacs_get(int a, int b, int* c);
void Cblacs_gridinit(int* a, const char* b, int c, int d);
void Cblacs_gridinfo(int a, int* b, int* c, int* d, int* e);
void Cblacs_gridexit(int a);
void Cblacs_exit(int a);
MPI_Comm Cblacs2sys_handle(int a);
int Csys2blacs_handle(MPI_Comm communicator);
void Cfree_blacs_system_handle(int handle);
void descinit_(int* desc, const int* m, const int* n, const int* mb, const int* nb, const int* irsrc, const int* icsrc, const int* ictxt, const int* lld, int* info);
int numroc_(const int* n, const int* nb, const int* iproc, const int* isrcproc, const int* nprocs);
void Cpdgemr2d(int m, int n, const double* a, int ia, int ja, const int* desca, double* b, int ib, int jb, const int* descb, int ictxt);
void pdgesvd_(const char* jobu, const char* jobvt, const int* m, const int* n, double* a, const int* ia, const int* ja, const int* desca, double* s, double* u, const int* iu, const int* ju, const int* descu, double* vt, const int* ivt, const int* jvt, const int* descvt, double* work, const int* lwork, int* info);
void pdsyev_(const char* jobz, const char* uplo, const int* n, double* a, const int* ia, const int* ja, const int* desca, double* w, double* z, const int* iz, const int* jz, const int* descz, double* work, const int* lwork, int* info);
bool pdsyevd_available_();
void pdsyevd_(const char* jobz, const char* uplo, const int* n, double* a, const int* ia, const int* ja, const int* desca, double* w, double* z, const int* iz, const int* jz, const int* descz, double* work, const int* lwork, int* iwork, const int* liwork, int* info);
bool pdsyevr_available_();
void pdsyevr_(const char* jobz, const char* range, const char* uplo, const int* n, double* a, const int* ia, const int* ja, const int* desca, const double* vl, const double* vu, const int* il, const int* iu, int* m, int* nz, double* w, double* z, const int* iz, const int* jz, const int* descz, double* work, const int* lwork, int* iwork, const int* liwork, int* info);
void pdpotrf_(const char* uplo, const int* n, double* a, const int* ia, const int* ja, const int* desca, int* info);
void pdpotri_(const char* uplo, const int* n, double* a, const int* ia, const int* ja, const int* desca, int* info);
void pdtrsm_(const char* side, const char* uplo, const char* trans, const char* diag, const int* m, const int* n, const double* alpha, const double* a, const int* ia, const int* ja, const int* desca, double* b, const int* ib, const int* jb, const int* descb);
void pdgemv_(const char* trans, const int* m, const int* n, const double* alpha, const double* a, const int* ia, const int* ja, const int* desca, const double* x, const int* ix, const int* jx, const int* descx, const int* incx, const double* beta, double* y, const int* iy, const int* jy, const int* descy, const int* incy);
void pdsyrk_(const char* uplo, const char* trans, const int* n, const int* k, const double* alpha, const double* a, const int* ia, const int* ja, const int* desca, const double* beta, double* c, const int* ic, const int* jc, const int* descc);
void pdtran_(const int* m, const int* n, const double* alpha, const double* a, const int* ia, const int* ja, const int* desca, const double* beta, double* c, const int* ic, const int* jc, const int* descc);
void* gpr_scheme2_cuda_create_v1(int device, char* error, size_t capacity);
void gpr_scheme2_cuda_destroy_v1(void* engine);
int gpr_scheme2_cuda_describe_v1(void* engine, char* text, size_t capacity);
int gpr_scheme2_cuda_run_v1(void* engine, const gpr_scheme2_cuda_table_v1* table, const gpr_scheme2_cuda_operand_v1* operands, int32_t operand_count, const gpr_scheme2_cuda_task_v1* tasks, int32_t task_count, char* error, size_t capacity);
int gpr_scheme2_cuda_gemm_s8_v1(void* engine, int64_t m, int64_t n, int64_t k, const int8_t* r, int64_t ldr, const int8_t* s, int64_t lds, int32_t* c, int64_t ldc, char* error, size_t capacity);
int gpr_scheme2_mkl_shim_v1(void);
__attribute__((visibility(“default”)));
SCHEME_I_HD double scheme_i_trunc(double value);
SCHEME_I_HD int scheme_i_slice_bits(int length);
SCHEME_I_HD int scheme_i_split(const double* values, int length, int bits, double* slices, int cap);
SCHEME_I_HD int scheme_i_slice_cap(const double* values, int length, int bits);
SCHEME_I_HD double schemeIProductRaw(const double* left, const double* right, int length);
void* gpr_training_product_create_v1(char* error, size_t capacity);
void gpr_training_product_destroy_v1(void* workspace);
int gpr_training_product_gemm_v1(void* workspace, int transpose_a, int transpose_b, int64_t m, int64_t n, int64_t k, double alpha, const double* a, int64_t lda, const double* b, int64_t ldb, double beta, double* c, int64_t ldc, char* error, size_t capacity);
void dgeqrf_(int*, int*, double*, int*, double*, double*, int*, int*);
void dlarft_(char*, char*, int*, int*, const double*, int*, const double*, double*, int*);
void dlarfb_(char*, char*, char*, char*, int*, int*, int*, const double*, int*, const double*, int*, double*, int*, double*, int*);
void dsbevd_(char*, char*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
void dsyevr_(char*, char*, char*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*, int*);
__attribute__((visibility(“default”)));
double gpr_core_exp(double);
double gpr_core_log(double);
double gpr_core_lgamma(double);
static void set_err(char* errbuf, size_t errlen, const char* msg);
int rgpot_engine_abi_version(void);
int rgpot_engine_available(void);
RgpotEnginePot* rgpot_engine_create(const void* config, size_t config_len, char* errbuf, size_t errlen);
void rgpot_engine_destroy(RgpotEnginePot* pot);
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);
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);
static void set_err(char* errbuf, size_t errlen, const char* msg);
int rgpot_engine_abi_version(void);
int rgpot_engine_available(void);
RgpotEnginePot* rgpot_engine_create(const void* config, size_t config_len, char* errbuf, size_t errlen);
void rgpot_engine_destroy(RgpotEnginePot* pot);
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);
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);
RGPOT_ENGINE_API int rgpot_engine_hessian_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* hessian_out, size_t hessian_len, const double* box);
RGPOT_ENGINE_API int rgpot_engine_hessian_action_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* direction, size_t direction_len, double* hv_out, size_t hv_len, const double* box, unsigned long long* ops_out, double* scale_out);
RGPOT_ENGINE_API int rgpot_engine_prediction_supported_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* box, int* supported_out);
RGPOT_ENGINE_API int rgpot_engine_predict_variance_checked(RgpotEnginePot* pot, long nSystems, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* var_energy_out, size_t var_energy_len, double* var_gradient_out, size_t var_gradient_len, const double* boxes);
RGPOT_ENGINE_API int rgpot_engine_gpr_stats(const RgpotEnginePot* pot, RgpotEngineGprStats* stats_out);
int rgpot_engine_abi_version(void);
int rgpot_engine_abi_compatible(const RgpotEngineAbiStamp* stamp);
int rgpot_engine_available(void);
RgpotEnginePot* rgpot_engine_create(const void* config, std::size_t config_len, char* errbuf, std::size_t errlen);
void rgpot_engine_destroy(RgpotEnginePot* pot);
int rgpot_engine_set_callbacks(RgpotEnginePot* pot, const RgpotEngineCallbacks* callbacks);
unsigned long long rgpot_engine_model_state(const RgpotEnginePot* pot);
size_t rgpot_engine_last_error(const RgpotEnginePot* pot, char* buf, size_t len);
int rgpot_engine_caps(const RgpotEnginePot* pot, RgpotEngineCaps* out);
const char* rgpot_engine_name(void);
const char* rgpot_engine_version(void);
size_t rgpot_engine_model_digest(const RgpotEnginePot* pot, char* buf, size_t len);
int rgpot_engine_set_num_threads(RgpotEnginePot* pot, int intra_op, int inter_op);
int rgpot_engine_set_charge_spin(RgpotEnginePot* pot, int charge, int spin);
int rgpot_engine_select_orbitals(RgpotEnginePot* pot, long long key);
int rgpot_engine_copy_orbitals(RgpotEnginePot* pot, long long from_key, long long to_key);
long rgpot_engine_neighbor_options(const RgpotEnginePot* pot, RgpotEngineNeighborOptions* opts, long capacity);
int rgpot_engine_hvp(RgpotEnginePot* pot, long nAtoms, const double* positions, const int* atomicNrs, const double* direction, double* hv_out, const double* box);
int rgpot_engine_gpr_stats(const RgpotEnginePot* pot, RgpotEngineGprStats* stats_out);
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);
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);
int rgpot_engine_hessian_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* hessian_out, size_t hessian_len, const double* box);
int rgpot_engine_hessian_action_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* direction, size_t direction_len, double* hv_out, size_t hv_len, const double* box, unsigned long long* ops_out, double* scale_out);
int rgpot_engine_prediction_supported_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* box, int* supported_out);
int rgpot_engine_predict_variance_checked(RgpotEnginePot* pot, long nSystems, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* var_energy_out, size_t var_energy_len, double* var_gradient_out, size_t var_gradient_len, const double* boxes);
int rgpot_engine_hint(RgpotEnginePot* pot, const void* msg, std::size_t msg_len, char* errbuf, std::size_t errlen);
int rgpot_engine_abi_version(void);
int rgpot_engine_available(void);
RgpotEnginePot* rgpot_engine_create(const void* config, size_t config_len, char* errbuf, size_t errlen);
void rgpot_engine_destroy(RgpotEnginePot* pot);
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);
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);
RGPOT_ENGINE_API RgpotEngineAbiStamp rgpot_engine_abi_stamp(void);
// macros
#define ADAM_inl
#define AdditionalFunctionality_inl
#define ConstantCF_inl
#define EIGEN_NO_DEBUG
#define EMPTY
#define EON_RELAX_ABI_MAJOR
#define EON_RELAX_ABI_MINOR
#define EON_RELAX_API
#define EON_RELAX_IMAGE_NONE
#define EON_RELAX_KIND_IS_KNOWN(k)
#define EON_RELAX_VERSION_INIT
#define FORTRAN_ENTRY(name, aliases, type)
#define GPR_ATOMICDIMER_INL_
#define GPR_ENVIRONMENT_FUNCTION
#define GPR_KOKKOS_HAS_ILOGB_SCALBN
#define GPR_LINALG_SCALAPACK
#define GPR_ML_GAUSSIANPROCESSREGRESSION_INL_
#define GPR_ML_RGMIN_LBFGS_INL_
#define GPR_ML_RGMIN_OPT_INL_
#define GPR_ML_RGMIN_SCG_INL_
#define GPR_READCON_ABI_MAJOR
#define GPR_READCON_ABI_MIN_MINOR
#define GPR_READCON_DB_ABI_MAJOR
#define GPR_READCON_DB_ABI_MIN_MINOR
#define GPR_RGMIN_ABI_MAJOR
#define GPR_RGMIN_ABI_MIN_MINOR
#define GPR_RGSADDLE_ABI_MAJOR
#define GPR_TILE_API
#define LikGaussian_h
#define MANAGERS_IO_FILEMANAGER_INL_
#define ProblemSetUp_inl
#define RGPOT_ENGINE_BUILD
#define RGPOT_ENGINE_BUILD
#define RGPOT_ENGINE_BUILD
#define RGPOT_ENGINE_BUILD
#define RGPOT_ENGINE_BUILD
#define RGPOT_ENGINE_ERR_OUTSIDE_SUPPORT
#define RGPOT_ENGINE_GPR_HINT_MAGIC
#define RGPOT_ENGINE_GPR_HINT_VERSION
#define RGPOT_ENGINE_GPR_RESIDUAL_PRIOR_MAGIC
#define RGPOT_ENGINE_GPR_RESIDUAL_PRIOR_VERSION
#define SCHEME_II_HD
#define SCHEME_I_HD
#define SexpatCF_inl
#define assertMsg(expression, msg)
Detailed Documentation¶
Typedefs¶
typedef struct gpr_scheme2_cuda_table_v1 gpr_scheme2_cuda_table_v1
Moduli and CRT tables of one inner dimension (Context::Impl::Table).
typedef struct gpr_scheme2_cuda_operand_v1 gpr_scheme2_cuda_operand_v1
One prepared operand, element (e, l) with e < extent indexing rows of op(A) or columns of op(B) and l < depth the inner dimension. Either values (binary64 at values[l * ld + e], or values[e * ld + l] when l_contiguous; residues formed on the device) or residues (count blocks of extent * depth signed bytes, [l * extent + e] for row operands and [e * depth + l] for column operands) is given.
typedef struct gpr_scheme2_cuda_task_v1 gpr_scheme2_cuda_task_v1
Output block (row0 .. row0 + m) x (col0 .. col0 + n) of the product of operands rows and cols. values[i + j * ld] receives the unscaled product P_ij in binary64, before alpha and beta.
typedef int (*eon_relax_surface_fn)(
void *user,
eon_relax_surface_request_t *req
)
Return 0 on success, positive recoverable, negative fatal.
Global Functions¶
void* gpr_scheme2_cuda_create_v1(int device, char* error, size_t capacity)
device < 0 selects the local rank modulo the visible device count.
int gpr_scheme2_cuda_describe_v1(void* engine, char* text, size_t capacity)
One line naming the device.
int gpr_scheme2_cuda_run_v1(void* engine, const gpr_scheme2_cuda_table_v1* table, const gpr_scheme2_cuda_operand_v1* operands, int32_t operand_count, const gpr_scheme2_cuda_task_v1* tasks, int32_t task_count, char* error, size_t capacity)
Products of every task. Operands are copied to the device once per call.
int gpr_scheme2_cuda_gemm_s8_v1(void* engine, int64_t m, int64_t n, int64_t k, const int8_t* r, int64_t ldr, const int8_t* s, int64_t lds, int32_t* c, int64_t ldc, char* error, size_t capacity)
Column-major INT32 C (m x n) = R (m x k) S (k x n) for signed INT8 operands, k at most 65536.
__attribute__((visibility(“default”)))
Immortal dest identity string. Never NULL.
FNV-1a 64-bit hash of eon_relax_version_hash_str(). Copied to outcome.version_hash.
Create. NULL config && config_len==0 selects Parameters NSDMI defaults and kind=NEB. A non-empty buffer is a Cap’n Proto flat-array whose root is RelaxEngineParams. kind tokens are “neb” and “saddle”; any other token fails closed (EON_RELAX_UNKNOWN_KIND). An unparseable buffer is EON_RELAX_CAPNP_ROOT. config!=NULL && config_len==0 is refused.
Last named create/run/step/reset/set_epoch rc on this handle. 0 if none.
Run the bound engine to completion. Writes updated interior coordinates into band->positions (caller-owned); endpoints stay in the caller frame. Endpoint minimization stays with the host (NudgedElasticBand::compute does not minimize endpoints). surface may not be NULL. Kind is bound at create (NULL config => NEB). Returns eon_relax_rc_t; on 0, out->status is the eOn NEB or saddle table.
One band optimizer step (kind=NEB only). The first call on a fresh or reset engine initializes the band state from the caller’s positions and captures the baseline force; every call syncs band->positions in (the host may have moved images between steps), assembles NEB forces on the host surface, takes ONE optimizer step, and writes the stepped INTERIOR positions back (endpoints are the caller’s and are never rewritten, so the caller’s frame survives eOn’s own cell wrapping). Climbing-image activation follows the engine’s own trigger rule; saddle POLICY (MMF bursts, resampling, acquisition) stays with the host. outcome.status is RUNNING until convergenceForce() reaches the configured tolerance (GOOD), host variance exceeds the GP-surrogate threshold (MAX_UNCERTAINTY), or neb.max_iterations is hit (BAD_MAX_ITERATIONS). surface and user must not change across steps without an eon_relax_reset.
Drop the stepper’s band state and optimizer history; the next eon_relax_step reinitializes from the caller’s band. This is the host’s model-update hook: quasi-Newton memory taken on one surface epoch must not survive onto the next.
NULL if kind or status is unknown.
__attribute__((visibility(“default”)))
(major << 16) | minor.
Immortal dest identity string. Never NULL.
FNV-1a 64-bit hash of eon_relax_version_hash_str(). Copied to outcome.version_hash.
Create. NULL config && config_len==0 selects Parameters NSDMI defaults and kind=NEB. A non-empty buffer is a Cap’n Proto flat-array whose root is RelaxEngineParams. kind tokens are “neb” and “saddle”; any other token fails closed (EON_RELAX_UNKNOWN_KIND). An unparseable buffer is EON_RELAX_CAPNP_ROOT. config!=NULL && config_len==0 is refused.
Last named create/run/step/reset/set_epoch rc on this handle. 0 if none.
Run the bound engine to completion. Writes updated interior coordinates into band->positions (caller-owned); endpoints stay in the caller frame. Endpoint minimization stays with the host (NudgedElasticBand::compute does not minimize endpoints). surface may not be NULL. Kind is bound at create (NULL config => NEB). Returns eon_relax_rc_t; on 0, out->status is the eOn NEB or saddle table.
One band optimizer step (kind=NEB only). The first call on a fresh or reset engine initializes the band state from the caller’s positions and captures the baseline force; every call syncs band->positions in (the host may have moved images between steps), assembles NEB forces on the host surface, takes ONE optimizer step, and writes the stepped INTERIOR positions back (endpoints are the caller’s and are never rewritten, so the caller’s frame survives eOn’s own cell wrapping). Climbing-image activation follows the engine’s own trigger rule; saddle POLICY (MMF bursts, resampling, acquisition) stays with the host. outcome.status is RUNNING until convergenceForce() reaches the configured tolerance (GOOD), host variance exceeds the GP-surrogate threshold (MAX_UNCERTAINTY), or neb.max_iterations is hit (BAD_MAX_ITERATIONS). surface and user must not change across steps without an eon_relax_reset.
Drop the stepper’s band state and optimizer history; the next eon_relax_step reinitializes from the caller’s band. This is the host’s model-update hook: quasi-Newton memory taken on one surface epoch must not survive onto the next.
NULL if kind or status is unknown.
RGPOT_ENGINE_API int rgpot_engine_hessian_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* hessian_out, size_t hessian_len, const double* box)
Extent-checked dense Hessian evaluation at one geometry. positions_len must be at least n_dof, and hessian_len at least n_dof * n_dof. n_dof is n_coords when that count is positive, otherwise 3*nAtoms. A longer positions buffer does not enlarge the Hessian. Returns 0 on success.
RGPOT_ENGINE_API int rgpot_engine_hessian_action_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* direction, size_t direction_len, double* hv_out, size_t hv_len, const double* box, unsigned long long* ops_out, double* scale_out)
Extent-checked Hessian-vector product H(positions) * direction. positions_len, direction_len and hv_len must each be at least n_coords (for residual sessions) or 3*nAtoms. When ops_out and scale_out are non-NULL, the owning implementation writes the floating-point operation count and the magnitude scale used for roundoff certification (ops * DBL_EPSILON * scale). Returns 0 on success, RGPOT_ENGINE_ERR_OUTSIDE_SUPPORT (4) when the query lies outside the trained prediction kernel support.
RGPOT_ENGINE_API int rgpot_engine_prediction_supported_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* box, int* supported_out)
Extent-checked prediction-support query at one geometry. positions_len must be at least n_coords (for residual sessions) or 3*nAtoms. On success, *supported_out is 1 inside the prediction kernel support and 0 outside it.
RGPOT_ENGINE_API int rgpot_engine_predict_variance_checked(RgpotEnginePot* pot, long nSystems, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* var_energy_out, size_t var_energy_len, double* var_gradient_out, size_t var_gradient_len, const double* boxes)
Extent-checked posterior energy and gradient variance query at nSystems geometries. positions_len and var_gradient_len must each be at least nSystems * n_coords (for residual sessions) or nSystems * 3 * nAtoms, and var_energy_len at least nSystems. Surrogate-phase rgpot_engine_force and rgpot_engine_force_batch write this energy variance into their variance slot, so a host does not treat the GP as exact. Oracle phases write 0: those evaluations are the true potential. The gradient variance is only available here. Returns 0 on success.
RGPOT_ENGINE_API int rgpot_engine_gpr_stats(const RgpotEnginePot* pot, RgpotEngineGprStats* stats_out)
Read the operation counters accumulated by the engine instance.
int rgpot_engine_gpr_stats(const RgpotEnginePot* pot, RgpotEngineGprStats* stats_out)
Read the operation counters accumulated by the engine instance.
int rgpot_engine_hessian_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* hessian_out, size_t hessian_len, const double* box)
Extent-checked dense Hessian evaluation at one geometry. positions_len must be at least n_dof, and hessian_len at least n_dof * n_dof. n_dof is n_coords when that count is positive, otherwise 3*nAtoms. A longer positions buffer does not enlarge the Hessian. Returns 0 on success.
int rgpot_engine_hessian_action_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* direction, size_t direction_len, double* hv_out, size_t hv_len, const double* box, unsigned long long* ops_out, double* scale_out)
Extent-checked Hessian-vector product H(positions) * direction. positions_len, direction_len and hv_len must each be at least n_coords (for residual sessions) or 3*nAtoms. When ops_out and scale_out are non-NULL, the owning implementation writes the floating-point operation count and the magnitude scale used for roundoff certification (ops * DBL_EPSILON * scale). Returns 0 on success, RGPOT_ENGINE_ERR_OUTSIDE_SUPPORT (4) when the query lies outside the trained prediction kernel support.
int rgpot_engine_prediction_supported_checked(RgpotEnginePot* pot, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, const double* box, int* supported_out)
Extent-checked prediction-support query at one geometry. positions_len must be at least n_coords (for residual sessions) or 3*nAtoms. On success, *supported_out is 1 inside the prediction kernel support and 0 outside it.
int rgpot_engine_predict_variance_checked(RgpotEnginePot* pot, long nSystems, long nAtoms, const double* positions, size_t positions_len, const int* atomicNrs, double* var_energy_out, size_t var_energy_len, double* var_gradient_out, size_t var_gradient_len, const double* boxes)
Extent-checked posterior energy and gradient variance query at nSystems geometries. positions_len and var_gradient_len must each be at least nSystems * n_coords (for residual sessions) or nSystems * 3 * nAtoms, and var_energy_len at least nSystems. Surrogate-phase rgpot_engine_force and rgpot_engine_force_batch write this energy variance into their variance slot, so a host does not treat the GP as exact. Oracle phases write 0: those evaluations are the true potential. The gradient variance is only available here. Returns 0 on success.
Macros¶
#define GPR_READCON_ABI_MAJOR
Major of the readcon-core C ABI gpridge is written against.
#define GPR_READCON_ABI_MIN_MINOR
Lowest minor: the stamp (RKR_ABI_VERSION_*, rkr_abi_version_*) first appears with the frame view and builder calls at minor 0.
#define GPR_READCON_DB_ABI_MAJOR
Major of the readcon-db C ABI gpridge is written against.
#define GPR_READCON_DB_ABI_MIN_MINOR
Lowest minor: the stamp (RKRDB_ABI_VERSION_*, rkrdb_abi_*) first appears at minor 0 together with the archive calls.
#define GPR_RGMIN_ABI_MAJOR
Major of the rgmin C ABI gpridge is written against.
#define GPR_RGMIN_ABI_MIN_MINOR
ABI minor 43 adds rgmin_lbfgs_pairs_push_rho. Meson also checks for the BFGS and SR1 exports when selecting the linked package.
#define RGPOT_ENGINE_GPR_HINT_MAGIC
Hint message for a curvature learning engine, passed to rgpot_engine_hint.
For RGPOT_ENGINE_GPR_HINT_LEARN_POINTS, the struct is followed immediately by n_points * n_coords doubles of positions, n_points doubles of energies, and n_points * n_coords doubles of gradients (dE/dx = -force).
RGPOT_ENGINE_GPR_HINT_SET_TRAINING takes effect at the next fit. n_points is the training window: a full fit trains on the most recent n_points observations, or on all of them at zero. phase 1 selects the Cholesky posterior and, after the first full fit, conditions later observations on the fitted hyperparameters through gpr_model_append_fixed_checked; phase 0 refits in full. An append needs a zero window and a Cartesian session and falls back to a full fit where the posterior cannot be extended.
#define RGPOT_ENGINE_GPR_RESIDUAL_PRIOR_MAGIC
Saddle-quadratic residual-prior configuration for a learning curvature engine, passed as the config blob to rgpot_engine_create.
The engine trains a Gaussian process on the residual of the quadratic expansion at the reference geometry (the saddle point), so far from training data its curvature returns to the reference Hessian.
The config buffer consists of this header followed immediately by:
n_coords doubles for the reference positions x_0;
n_coords doubles for the reference gradient g_0 (only when has_gradient is nonzero; otherwise g_0 = 0);
n_coords * n_coords doubles for the row-major reference Hessian H_0;
n_atoms ints for atomic numbers (only when has_atomic_nrs is nonzero).