Loading...
Searching...
No Matches
Configuration structs

Classes

struct  gpr_atoms_config_t
 Atoms configuration descriptor. Describes the atomic system for the GP kernel (pair types, frozen atoms). More...
struct  gpr_model_config_t
 GP/TP model configuration. All fields have sensible defaults via gpr_model_config_defaults(). More...
struct  gpr_marginal_likelihood_report_t
 Prior-free marginal-likelihood fit result (ABI 1.13). More...
struct  gpr_calibration_report_t
 Gaussian residual-calibration report shared by ABI 1.13 workflows. More...
struct  gpr_bq_config_t
 Scalar GP and Bayesian quadrature configuration (ABI 1.17). More...
struct  gpr_bq_integral_report_t
 Posterior decomposition for a Bayesian quadrature integral. More...
struct  gpr_bq_uncertainty_t
 Integral uncertainty split by source. variance is the historical report, including the leave-one-out factor. The other fields are not coverage corrections: loo_predictive_scale may be below one, and numerical_abs_tolerance is a moment bound that is not added into variance. More...
struct  gpr_bq_loo_report_t
 LOO summary plus the number of z-scores written separately. More...
struct  gpr_bq_fit_report_t
 Result of a Bayesian quadrature hyperparameter fit (ABI 1.17). More...
struct  gpr_dimer_config_t
 Dimer search configuration. More...
struct  gpr_neb_config_t
 NEB search configuration. More...
struct  gpr_local_band_config_t
 Local-band knobs (ABI 1.6), the gp_local_* fields of the C++ config. Start from gpr_local_band_config_defaults(). Lengths are Angstrom. force_stop_certificate asks for the band index certificate; certificate_step is the stencil displacement, and 0 keeps the library step. gpr_neb_search_local is the entry point: gpr_neb_search and gpr_neb_search_potential reject GPR_NEB_GP_LOCAL with GPR_ERR_INVALID_ARG (kLocalModeEntry). More...
struct  gpr_periodic_band_config_t
 Periodic local band (ABI 1.7): the choices GPLocalBand makes on top of gpr_local_band_config_t. Start from gpr_periodic_band_config_defaults(). Lengths are Angstrom, fmax is eV/Angstrom. convergence_norm -1 keeps the mode's own norm; otherwise it is a gpr_conv_norm_t. The local knobs and the certificate stay on gpr_local_band_config_t and gpr_neb_request_index_certificate: this struct does not repeat them. More...
struct  gpr_minimize_config_t
 Minimizer configuration. More...

Enumerations

enum  gpr_uncertainty_mode_t {
  GPR_UQ_MAP = 0 , GPR_UQ_BMA = 1 , GPR_UQ_LAPLACE = 2 , GPR_UQ_EB = 3 ,
  GPR_UQ_SVGD = 4 , GPR_UQ_LAPLACE_SLICE = 5
}
enum  gpr_hyperparameter_mode_t { GPR_HOPT_SCG = 0 , GPR_HOPT_INLA = 1 }
enum  gpr_hyperparameter_objective_t { GPR_HOBJ_NLML = 0 , GPR_HOBJ_LOO = 1 }
enum  gpr_periodic_band_initial_t { GPR_PERIODIC_BAND_LINEAR = 0 , GPR_PERIODIC_BAND_IDPP = 1 , GPR_PERIODIC_BAND_SIDPP = 2 }
 How a periodic band builds its initial path (ABI 1.7). GPLocalBand's "linear", "idpp" and "sidpp". More...

Functions

gpr_atoms_config_t gpr_atoms_config_defaults (void)
 Default atoms configuration (everything zeroed/NULL).
gpr_atoms_config_t gpr_atoms_simple (int n_atoms)
 Convenience: N identical moving atoms, one pair type.
gpr_atoms_t gpr_atoms_create_simple (int n_atoms)
 Convenience: create an atoms handle for N identical moving atoms. Equivalent to gpr_atoms_create(&gpr_atoms_simple(n_atoms)).
gpr_model_config_t gpr_model_config_defaults (void)
 Library defaults of every gpr_model_config_t field.
gpr_bq_config_t gpr_bq_config_defaults (void)
 Defaults: one dimension, squared-exponential kernel, marginalized hyperparameters, constant mean profile, jitter 1e-12.
gpr_dimer_config_t gpr_dimer_config_defaults (void)
 Library defaults of every gpr_dimer_config_t field.
gpr_neb_config_t gpr_neb_config_defaults (void)
 Library defaults of every gpr_neb_config_t field.
gpr_local_band_config_t gpr_local_band_config_defaults (void)
 Library defaults of every gpr_local_band_config_t field (ABI 1.6).
gpr_periodic_band_config_t gpr_periodic_band_config_defaults (void)
 Library defaults of every gpr_periodic_band_config_t field (ABI 1.7).
int gpr_neb_request_index_certificate (int enable, double step)
 Ask the next NEB search on this thread to certify the stopped band (ABI 1.6). enable 0 is the default. step 0 selects the library stencil step; a negative step is GPR_ERR_INVALID_ARG. The request is consumed by that search. gpr_neb_search_local also honours gpr_local_band_config_t::force_stop_certificate. On gpr_neb_search_periodic and gpr_neb_search_periodic_potential a nonzero step takes precedence over gpr_local_band_config_t::certificate_step, and step 0 leaves that field's step in place.
int gpr_neb_request_sidpp (int enable)
 Select the IDPP initializer for the next NEB search on this thread (ABI 1.16). enable 1 selects SIDPP and enable 0 selects classic IDPP. SIDPP is the library default. The request is consumed by that search, including when validation rejects the search. It has no effect on gpr_neb_search_periodic or gpr_neb_search_periodic_potential: those take the initializer from gpr_periodic_band_config_t::initial alone, and they still consume the request.
int gpr_neb_request_vibrational_stencil (int mode)
 Choose the true-oracle Hessian stencil for the next non-local NEB search on this thread (ABI 1.21). mode 0 is full, every Cartesian coordinate, and mode 1 is vibrational. Any other value is GPR_ERR_INVALID_ARG. The request is consumed by that search. A local or periodic band takes the choice from gpr_local_band_config_t instead, and still consumes the request. gpr_neb_config_t is unchanged: its tail padding stays unread, so a caller built against ABI 1.14 keeps working.
gpr_minimize_config_t gpr_minimize_config_defaults (void)
 Library defaults of every gpr_minimize_config_t field.
int gpr_minimize_request_max_inner_steps (int max_inner_steps)
 Set the inner surrogate L-BFGS step cap for the next gpr_minimize call on this thread (ABI 1.18).

Build / runtime introspection

Query the linalg backend, MPI status, and OpenMP thread budget without re-compiling the caller against gpridge_config.h.

Binding callers (eOn, ASE wrappers, Python ctypes) need to know:

  • the active linalg backend (ScaLAPACK requires MPI init, Eigen does not, Kokkos / cuSolver have GPU prerequisites);
  • whether MPI is initialised on this rank (and the rank/size if so);
  • what OpenMP thread budget the GPR will use (driven by env vars OMP_NUM_THREADS / OPENBLAS_NUM_THREADS at construction time).
const char * gpr_backend_name (void)
 Returns a static C string naming the compiled linalg backend: "slate", "scalapack", "kokkos", "cusolver", "cholmod", "stdpar", or "eigen". Caller must NOT free.
int gpr_backend_requires_mpi (void)
 Returns 1 if the compiled linalg backend requires MPI to be initialised before any GPR call (e.g. ScaLAPACK), 0 otherwise.
int gpr_mpi_initialized (void)
 Returns 1 if MPI_Init has been called on this process (queries MPI_Initialized). Returns 0 if MPI is not compiled in OR not initialised. Safe to call before any GPR construction.
int gpr_mpi_world_rank (void)
 Returns the MPI rank in MPI_COMM_WORLD on this process, or 0 if MPI is not initialised / not compiled in.
int gpr_mpi_world_size (void)
 Returns the MPI size of MPI_COMM_WORLD on this process, or 1 if MPI is not initialised / not compiled in.
int gpr_omp_max_threads (void)
 Returns the OpenMP thread budget for this process (omp_get_max_threads). Returns 1 if OpenMP is not compiled in.

Detailed Description

Enumeration Type Documentation

◆ gpr_hyperparameter_mode_t

Enumerator
GPR_HOPT_SCG 
GPR_HOPT_INLA 

Definition at line 892 of file gpridge_c.h.

gpr_hyperparameter_mode_t
Definition gpridge_c.h:892
@ GPR_HOPT_SCG
Definition gpridge_c.h:892
@ GPR_HOPT_INLA
Definition gpridge_c.h:892

◆ gpr_hyperparameter_objective_t

Enumerator
GPR_HOBJ_NLML 
GPR_HOBJ_LOO 

Definition at line 896 of file gpridge_c.h.

896 {
897 GPR_HOBJ_NLML = 0,
898 GPR_HOBJ_LOO = 1
gpr_hyperparameter_objective_t
Definition gpridge_c.h:896
@ GPR_HOBJ_NLML
Definition gpridge_c.h:897
@ GPR_HOBJ_LOO
Definition gpridge_c.h:898

◆ gpr_periodic_band_initial_t

How a periodic band builds its initial path (ABI 1.7). GPLocalBand's "linear", "idpp" and "sidpp".

Enumerator
GPR_PERIODIC_BAND_LINEAR 
GPR_PERIODIC_BAND_IDPP 
GPR_PERIODIC_BAND_SIDPP 

Definition at line 1071 of file gpridge_c.h.

1071 {
gpr_periodic_band_initial_t
How a periodic band builds its initial path (ABI 1.7). GPLocalBand's "linear", "idpp" and "sidpp".
Definition gpridge_c.h:1071
@ GPR_PERIODIC_BAND_LINEAR
Definition gpridge_c.h:1072
@ GPR_PERIODIC_BAND_IDPP
Definition gpridge_c.h:1073
@ GPR_PERIODIC_BAND_SIDPP
Definition gpridge_c.h:1074

◆ gpr_uncertainty_mode_t

Enumerator
GPR_UQ_MAP 
GPR_UQ_BMA 
GPR_UQ_LAPLACE 
GPR_UQ_EB 
GPR_UQ_SVGD 
GPR_UQ_LAPLACE_SLICE 

Definition at line 881 of file gpridge_c.h.

881 {
882 GPR_UQ_MAP = 0,
883 GPR_UQ_BMA = 1,
884 GPR_UQ_LAPLACE = 2,
885 GPR_UQ_EB = 3,
886 GPR_UQ_SVGD = 4,
887 GPR_UQ_LAPLACE_SLICE = 5 /* PSIS-Laplace + INLA-Delta variance arm */
gpr_uncertainty_mode_t
Definition gpridge_c.h:881
@ GPR_UQ_LAPLACE_SLICE
Definition gpridge_c.h:887
@ GPR_UQ_SVGD
Definition gpridge_c.h:886
@ GPR_UQ_BMA
Definition gpridge_c.h:883
@ GPR_UQ_LAPLACE
Definition gpridge_c.h:884
@ GPR_UQ_EB
Definition gpridge_c.h:885
@ GPR_UQ_MAP
Definition gpridge_c.h:882

Function Documentation

◆ gpr_atoms_config_defaults()

gpr_atoms_config_t gpr_atoms_config_defaults ( void )

Default atoms configuration (everything zeroed/NULL).

◆ gpr_atoms_create_simple()

gpr_atoms_t gpr_atoms_create_simple ( int n_atoms)

Convenience: create an atoms handle for N identical moving atoms. Equivalent to gpr_atoms_create(&gpr_atoms_simple(n_atoms)).

◆ gpr_atoms_simple()

gpr_atoms_config_t gpr_atoms_simple ( int n_atoms)

Convenience: N identical moving atoms, one pair type.

◆ gpr_backend_name()

const char * gpr_backend_name ( void )

Returns a static C string naming the compiled linalg backend: "slate", "scalapack", "kokkos", "cusolver", "cholmod", "stdpar", or "eigen". Caller must NOT free.

◆ gpr_backend_requires_mpi()

int gpr_backend_requires_mpi ( void )

Returns 1 if the compiled linalg backend requires MPI to be initialised before any GPR call (e.g. ScaLAPACK), 0 otherwise.

◆ gpr_bq_config_defaults()

gpr_bq_config_t gpr_bq_config_defaults ( void )

Defaults: one dimension, squared-exponential kernel, marginalized hyperparameters, constant mean profile, jitter 1e-12.

Returns
The configuration by value; nothing is allocated.

◆ gpr_dimer_config_defaults()

gpr_dimer_config_t gpr_dimer_config_defaults ( void )

Library defaults of every gpr_dimer_config_t field.

◆ gpr_local_band_config_defaults()

gpr_local_band_config_t gpr_local_band_config_defaults ( void )

Library defaults of every gpr_local_band_config_t field (ABI 1.6).

◆ gpr_minimize_config_defaults()

gpr_minimize_config_t gpr_minimize_config_defaults ( void )

Library defaults of every gpr_minimize_config_t field.

◆ gpr_minimize_request_max_inner_steps()

int gpr_minimize_request_max_inner_steps ( int max_inner_steps)

Set the inner surrogate L-BFGS step cap for the next gpr_minimize call on this thread (ABI 1.18).

Each outer cycle (bounded by gpr_minimize_config_t::max_iter) runs up to max_inner_steps inner surrogate L-BFGS steps. The library default is 200; passing a value less than 1 returns GPR_ERR_INVALID_ARG without altering any pending request. The request is consumed by the next gpr_minimize call on the calling thread, including when validation rejects the call. A call takes the request when it starts and leaves none pending while it runs, so a gpr_minimize call made from inside an oracle callback does not inherit its caller's request. A request made in a callback applies to the next call after it, nested or not, and stays pending if no call follows.

◆ gpr_model_config_defaults()

gpr_model_config_t gpr_model_config_defaults ( void )

Library defaults of every gpr_model_config_t field.

◆ gpr_mpi_initialized()

int gpr_mpi_initialized ( void )

Returns 1 if MPI_Init has been called on this process (queries MPI_Initialized). Returns 0 if MPI is not compiled in OR not initialised. Safe to call before any GPR construction.

◆ gpr_mpi_world_rank()

int gpr_mpi_world_rank ( void )

Returns the MPI rank in MPI_COMM_WORLD on this process, or 0 if MPI is not initialised / not compiled in.

◆ gpr_mpi_world_size()

int gpr_mpi_world_size ( void )

Returns the MPI size of MPI_COMM_WORLD on this process, or 1 if MPI is not initialised / not compiled in.

◆ gpr_neb_config_defaults()

gpr_neb_config_t gpr_neb_config_defaults ( void )

Library defaults of every gpr_neb_config_t field.

◆ gpr_neb_request_index_certificate()

int gpr_neb_request_index_certificate ( int enable,
double step )

Ask the next NEB search on this thread to certify the stopped band (ABI 1.6). enable 0 is the default. step 0 selects the library stencil step; a negative step is GPR_ERR_INVALID_ARG. The request is consumed by that search. gpr_neb_search_local also honours gpr_local_band_config_t::force_stop_certificate. On gpr_neb_search_periodic and gpr_neb_search_periodic_potential a nonzero step takes precedence over gpr_local_band_config_t::certificate_step, and step 0 leaves that field's step in place.

◆ gpr_neb_request_sidpp()

int gpr_neb_request_sidpp ( int enable)

Select the IDPP initializer for the next NEB search on this thread (ABI 1.16). enable 1 selects SIDPP and enable 0 selects classic IDPP. SIDPP is the library default. The request is consumed by that search, including when validation rejects the search. It has no effect on gpr_neb_search_periodic or gpr_neb_search_periodic_potential: those take the initializer from gpr_periodic_band_config_t::initial alone, and they still consume the request.

◆ gpr_neb_request_vibrational_stencil()

int gpr_neb_request_vibrational_stencil ( int mode)

Choose the true-oracle Hessian stencil for the next non-local NEB search on this thread (ABI 1.21). mode 0 is full, every Cartesian coordinate, and mode 1 is vibrational. Any other value is GPR_ERR_INVALID_ARG. The request is consumed by that search. A local or periodic band takes the choice from gpr_local_band_config_t instead, and still consumes the request. gpr_neb_config_t is unchanged: its tail padding stays unread, so a caller built against ABI 1.14 keeps working.

◆ gpr_omp_max_threads()

int gpr_omp_max_threads ( void )

Returns the OpenMP thread budget for this process (omp_get_max_threads). Returns 1 if OpenMP is not compiled in.

◆ gpr_periodic_band_config_defaults()

gpr_periodic_band_config_t gpr_periodic_band_config_defaults ( void )

Library defaults of every gpr_periodic_band_config_t field (ABI 1.7).