Fortran API

Every public entity of the gpridge module in fortran/gpridge.f90, with the dummy-argument declarations as the source states them. The Fortran module page covers error handling, oracle failures and compiler requirements; the Fortran tutorial trains a model step by step.

Derived types

BQConfig

bind(C); the components follow the C struct in field order.

integer(c_int) :: dimension
integer(c_int) :: kernel
integer(c_int) :: ard
integer(c_int) :: hyper_mode
real(c_double) :: magn_sigma2
real(c_double) :: lengthscale
real(c_double) :: extra_sigma2
integer(c_int) :: optimize_extra_sigma2
real(c_double) :: jitter_sigma2
real(c_double) :: kappa_max
integer(c_int) :: use_prior_mean
real(c_double) :: ls_prior_mu
real(c_double) :: ls_prior_s2
real(c_double) :: ls_prior_nu
real(c_double) :: tp_hyperprior_a
real(c_double) :: tp_hyperprior_b
integer(c_int) :: quad_nodes
integer(c_int) :: gl_max_panels
integer(c_int) :: max_iter
real(c_double) :: tol_func
real(c_double) :: tol_sol
integer(c_int) :: report_level
integer(c_int) :: interpolate_candidate_noise

BQIntegralReport

bind(C); the components follow the C struct in field order.

real(c_double) :: mean
real(c_double) :: variance
real(c_double) :: std_dev
real(c_double) :: prior_integral_variance
real(c_double) :: explained_variance
real(c_double) :: mean_shift_variance
real(c_double) :: aleatoric_variance
real(c_double) :: epistemic_variance
real(c_double) :: hyperparameter_variance
real(c_double) :: loo_calibration_scale
real(c_double) :: tp_variance_scale
real(c_double) :: condition_number
real(c_double) :: effective_nugget
integer(c_int) :: quadrature_models

BQUncertainty

bind(C); the components follow the C struct in field order.

real(c_double) :: mean
real(c_double) :: variance
real(c_double) :: gp_variance
real(c_double) :: observation_noise_variance
real(c_double) :: hyperparameter_variance
real(c_double) :: numerical_abs_tolerance
real(c_double) :: loo_predictive_scale
real(c_double) :: variance_model
real(c_double) :: measure_mass
integer(c_int) :: quadrature_models

FESConfig

gpr_fes_config_t (ABI 1.23). fes_config_defaults() fills it.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: kernel = 0
integer(c_int) :: ard = 0

FESRateConfig

gpr_fes_rate_config_t (ABI 1.23). fes_rate_config_defaults() fills it; beta must then be set.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: posterior_samples = 0
integer(c_int64_t) :: seed = 0
real(c_double) :: beta = 0.0_c_double
real(c_double) :: credible_mass = 0.0_c_double
real(c_double) :: saddle_tolerance = 0.0_c_double

FESRateReport

gpr_fes_rate_report_t (ABI 1.23).

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
real(c_double) :: barrier_mean = 0.0_c_double
real(c_double) :: barrier_std = 0.0_c_double
real(c_double) :: barrier_lower = 0.0_c_double
real(c_double) :: barrier_upper = 0.0_c_double
real(c_double) :: prefactor_mean = 0.0_c_double
real(c_double) :: prefactor_std = 0.0_c_double
real(c_double) :: rate_mean = 0.0_c_double
real(c_double) :: rate_std = 0.0_c_double
real(c_double) :: rate_lower = 0.0_c_double
real(c_double) :: rate_upper = 0.0_c_double
integer(c_int) :: samples_requested = 0
integer(c_int) :: samples_accepted = 0
real(c_double) :: saddle_gradient_norm = 0.0_c_double

ModelConfig

GP/TP model configuration (gpr_model_config_t). The initializers are gpr_model_config_defaults(), which ModelConfig() returns.

bind(C); the components follow the C struct in field order.

real(c_double) :: sigma2 = 1.0d-4
real(c_double) :: jitter_sigma2 = 1.0d-4
real(c_double) :: magn_sigma2 = 0.0d0
real(c_double) :: const_sigma2 = 0.0d0
real(c_double) :: prior_mu = 0.0d0
real(c_double) :: prior_nu = 20.0d0
real(c_double) :: prior_s2 = 1.0d0
integer(c_int) :: optim_alg = 0
integer(c_int) :: max_iter = 400
real(c_double) :: tol_func = 1.0d-3
real(c_double) :: tol_sol = 1.0d-3
integer(c_int) :: report_level = 0
real(c_double) :: tp_hyperprior_a = 1.0d-20
real(c_double) :: tp_hyperprior_b = 1.0d-20
integer(c_int) :: use_zbl_prior_mean = 0
integer(c_int) :: use_ff_prior_mean = 0
integer(c_int) :: use_hssvd_backend = 1

MarginalLikelihoodReport

Result of a prior-free negative log marginal-likelihood fit (ABI 1.13).

bind(C); the components follow the C struct in field order.

real(c_double) :: objective
real(c_double) :: log_determinant
real(c_double) :: quadratic
real(c_double) :: signal_variance
real(c_double) :: noise_variance
integer(c_int) :: n_lengthscales
integer(c_int) :: optimizer_iterations

CalibrationReport

Residual-calibration report shared by held-out force and LOO workflows.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: components
real(c_double) :: nominal_probability
real(c_double) :: empirical_coverage
real(c_double) :: calibrated_coverage
real(c_double) :: posterior_variance_scale
real(c_double) :: calibration_scale
real(c_double) :: mean_standardized_residual
real(c_double) :: rms_standardized_residual
real(c_double) :: mean_log_predictive_density

BQLooReport

bind(C); the components follow the C struct in field order.

type(CalibrationReport) :: summary
integer(c_size_t) :: z_score_count

BQFitReport

Result of a Bayesian quadrature hyperparameter fit (ABI 1.17): the MarginalLikelihoodReport fields plus the number of failed trial points.

bind(C); the components follow the C struct in field order.

real(c_double) :: objective
real(c_double) :: log_determinant
real(c_double) :: quadratic
real(c_double) :: signal_variance
real(c_double) :: noise_variance
integer(c_int) :: n_lengthscales
integer(c_int) :: optimizer_iterations
integer(c_int) :: failed_trials

NEBConfig

NEB search configuration. Field order matches gpr_neb_config_t; the initializers are gpr_neb_config_defaults(), which NEBConfig() returns.

bind(C); the components follow the C struct in field order.

integer(c_int) :: mode = 4
real(c_double) :: conv_tol = 0.05d0
integer(c_int) :: max_outer_iter = 200
integer(c_int) :: max_inner_iter = 100
real(c_double) :: inner_step_size = 0.01d0
real(c_double) :: spring_constant = 5.0d0
integer(c_int) :: climbing_image = 1
real(c_double) :: ci_activation_tol = 0.5d0
integer(c_int) :: n_atoms = 0
integer(c_int) :: use_idpp = 0
integer(c_int) :: acquisition = 7
real(c_double) :: ucb_kappa = 1.0d0
integer(c_int) :: evals_per_iter = 1
integer(c_int) :: use_triplet = 0
integer(c_int) :: seed = 42
integer(c_int) :: verbose = 1
integer(c_int) :: uncertainty_mode = 0
integer(c_int) :: use_psis_laplace = 0
integer(c_int) :: use_psis_deterministic = 1
integer(c_int) :: use_delta_method = 0
integer(c_int) :: use_zbl_prior_mean = 0
integer(c_int) :: rff_features = 0
integer(c_int) :: hyperparameter_mode = 0
integer(c_int) :: hyperparameter_objective = 0
integer(c_int) :: max_inner_iter_gp = 0
real(c_double) :: inner_conv_tol = 1.0d-3
integer(c_int) :: trust_metric = 2
integer(c_int) :: use_adaptive_trust = 0
real(c_double) :: trust_radius = 0.5d0
real(c_double) :: trust_adaptive_A = 1.3d0
real(c_double) :: trust_adaptive_floor = 0.25d0
real(c_double) :: trust_t_min = 0.15d0
real(c_double) :: trust_delta_explore = 0.35d0
integer(c_int) :: trust_half_life = 50
real(c_double) :: trust_ratio_at_limit = 0.4d0
integer(c_int) :: scalapack_block_size = 0
integer(c_int) :: scalapack_nprow = 0
real(c_double) :: lbfgs_max_move = 0.1d0
integer(c_int) :: lbfgs_memory = 20
real(c_double) :: lbfgs_inverse_curvature = 0.01d0
real(c_double) :: lbfgs_finite_difference = 1.0d-6
integer(c_int) :: lbfgs_auto_scale = 1
integer(c_int) :: lbfgs_angle_reset = 1
integer(c_int) :: lbfgs_distance_reset = 1
integer(c_int) :: reparam_period = 0
real(c_double) :: reparam_tol = -1.0d0
integer(c_int) :: use_ff_prior_mean = 0

MinimizeConfig

Minimizer configuration (gpr_minimize_config_t). The initializers are gpr_minimize_config_defaults(), which MinimizeConfig() returns. max_iter bounds outer surrogate-relaxation cycles (up to 200 inner surrogate steps by default; override via gpr_minimize_request_max_inner_steps).

bind(C); the components follow the C struct in field order.

real(c_double) :: trust_radius = 0.1d0
real(c_double) :: conv_tol = 5.0d-3
integer(c_int) :: max_iter = 500
integer(c_int) :: max_oracle_calls = 0
integer(c_int) :: gp_train_iter = 300
integer(c_int) :: n_initial_perturb = 4
real(c_double) :: perturb_scale = 0.1d0
real(c_double) :: max_move = 0.1d0
integer(c_int) :: max_training_points = 0
integer(c_int) :: fps_history = 0
real(c_double) :: jitter_sigma2 = 1.0d-6
integer(c_int) :: verbose = 1
integer(c_int) :: seed = 42

DimerConfig

Dimer search configuration. Field order matches gpr_dimer_config_t; the initializers are gpr_dimer_config_defaults().

bind(C); the components follow the C struct in field order.

real(c_double) :: dimer_sep = 0.01d0
real(c_double) :: T_dimer = 0.1d0
integer(c_int) :: conv_norm = 0
real(c_double) :: T_anglerot_init = 0.0873d0
integer(c_int) :: num_iter_initrot = 6
real(c_double) :: T_anglerot_gp = 0.01d0
integer(c_int) :: num_iter_rot_gp = 0
integer(c_int) :: initrot_nogp = 0
real(c_double) :: step_length = 0.1d0
real(c_double) :: max_step_length = 0.05d0
real(c_double) :: disp_max = 0.5d0
real(c_double) :: ratio_at_limit = 2.0d0 / 3.0d0
integer(c_int) :: num_bigiter = 300
integer(c_int) :: num_iter = 200
integer(c_int) :: num_bigiter_initloc = 0
integer(c_int) :: num_bigiter_initparam = 0
integer(c_int) :: islarge_num_iter = 2
integer(c_int) :: eval_image1 = 0
integer(c_int) :: divisor_T_dimer_gp = 10
integer(c_int) :: use_prune = 0
integer(c_int) :: start_prune_at = 10
integer(c_int) :: nprune_vals = 4
real(c_double) :: prune_threshold = 0.5d0
real(c_double) :: cell(9) = 0.0d0
real(c_double) :: gp_sigma2 = 1.0d-4
real(c_double) :: gp_jitter = 1.0d-4
integer(c_int) :: gp_max_iter = 400
integer(c_int) :: uncertainty_mode = 0
real(c_double) :: variance_accept_tau = 0.0d0
real(c_double) :: variance_accept_tau_relative = 0.0d0
integer(c_int) :: use_psis_laplace = 0
integer(c_int) :: use_psis_deterministic = 1
integer(c_int) :: use_delta_method = 0
integer(c_int) :: use_zbl_prior_mean = 0
integer(c_int) :: report_level = 2
integer(c_int) :: es_use_adaptive_threshold = 0
real(c_double) :: es_threshold = 1.2d0
real(c_double) :: es_adaptive_A = 1.3d0
real(c_double) :: es_adaptive_floor = 0.25d0
real(c_double) :: es_t_min = 0.15d0
real(c_double) :: es_delta_explore = 0.35d0
integer(c_int) :: es_half_life = 50
integer(c_int) :: use_ff_prior_mean = 0
integer(c_int) :: vibrational_stencil = 0

DimerReport

Outcome of a dimer search (gpr_dimer_report_t). Two fields are inputs: max_oracle_calls, a budget of oracle calls that is never exceeded, with 0 for none, and certificate_step, the Cartesian displacement of the stencil that certifies the stopped midpoint, with 0 for the library step.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: converged = 0
integer(c_int) :: stop = GPR_DIMER_STOP_UNSPECIFIED
real(c_double) :: curvature = 0.0d0
real(c_double) :: final_force_norm = 0.0d0
integer(c_long) :: n_force_calls = 0
integer(c_long) :: n_gp_calls = 0
integer(c_long) :: n_iterations = 0
integer(c_int) :: max_oracle_calls = 0
real(c_double) :: energy_zero_level = 0.0d0
real(c_double) :: certificate_step = 0.0d0
integer(c_long) :: n_certificate_calls = 0
integer(c_int) :: certified = 0

NEBReport

Outcome of a NEB run (gpr_neb_report_t), from NEBResult%report.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: converged = 0
integer(c_int) :: convergence_status = GPR_NEB_NOT_CONVERGED
integer(c_int) :: gp_used = 0
integer(c_int) :: max_energy_image = 0
integer(c_long) :: oracle_calls = 0
integer(c_long) :: oracle_calls_to_convergence = 0
integer(c_long) :: callback_calls = 0
integer(c_long) :: outer_iterations = 0
integer(c_long) :: hyperparameter_refits = 0
real(c_double) :: barrier = 0.0d0
real(c_double) :: reverse_barrier = 0.0d0
integer(c_int) :: dimer_ran = 0
integer(c_int) :: dimer_converged = 0
integer(c_long) :: dimer_oracle_calls = 0
integer(c_long) :: mmf_bursts = 0
integer(c_int) :: certified = 0
integer(c_int) :: index = 0
integer(c_long) :: n_certificate_calls = 0
integer(c_int) :: prior_observations = 0

DerivativeOptions

Options of the derivative primitives (gpr_derivative_options_t, ABI 1.20). The wrappers set struct_size.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: energy_unit = GPR_ENERGY_UNIT_NATIVE
integer(c_int) :: length_unit = GPR_LENGTH_UNIT_NATIVE
integer(c_int) :: project_rigid = 0
real(c_double) :: max_energy_std = 0.0d0
real(c_double) :: variance_step = 0.0d0

DerivativeReport

Report of one derivative call (gpr_derivative_report_t, ABI 1.20). Written on success and on GPR_ERR_OUT_OF_SUPPORT.

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: energy_unit = 0
integer(c_int) :: length_unit = 0
integer(c_int) :: n_points = 0
integer(c_int) :: projected = 0
real(c_double) :: max_energy_std = 0.0d0
integer(c_int) :: max_energy_std_point = -1
real(c_double) :: max_translation_residual = -1.0d0
real(c_double) :: max_rotation_residual = -1.0d0
integer(c_int) :: factor_appended = -1

HTSTOptions

Prefactor options (gpr_htst_options_t, ABI 1.20); start from gpr_htst_options_defaults().

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: enabled = 1
integer(c_int) :: mode = GPR_HTST_REFINED
integer(c_int) :: project_translation = 1
integer(c_int) :: project_rotation = 1
integer(c_int) :: max_measured = 0
real(c_double) :: omega_scale = 1.0d0
real(c_double) :: tolerance = 1.0d-3
real(c_double) :: fd_step = 1.0d-3
real(c_double) :: variance_step = 0.0d0

HTSTHalf

One half of the prefactor (gpr_htst_half_t, ABI 1.20).

bind(C); the components follow the C struct in field order.

integer(c_size_t) :: struct_size = 0
integer(c_int) :: status = GPR_HTST_UNAVAILABLE
integer(c_int) :: kind = GPR_HTST_MINIMUM
integer(c_int) :: source = GPR_HTST_SOURCE_REFINED
integer(c_int) :: n_coords = 0
integer(c_int) :: n_projected = 0
integer(c_int) :: n_modes = 0
integer(c_int) :: n_negative = 0
integer(c_int) :: oracle_calls = 0
integer(c_int) :: n_measured = 0
integer(c_int) :: converged = 0
real(c_double) :: ln_sum = 0.0d0
real(c_double) :: ln_sum_std = 0.0d0
real(c_double) :: imaginary_frequency = 0.0d0
real(c_double) :: omega_scale = 0.0d0

LocalBandConfig

Local-band knobs (gpr_local_band_config_t). The initializers are gpr_local_band_config_defaults(), which LocalBandConfig() returns.

bind(C); the components follow the C struct in field order.

real(c_double) :: fraction = 0.1d0
real(c_double) :: radius = 0.0d0
integer(c_int) :: window = 16
real(c_double) :: trust = 0.3d0
integer(c_int) :: inner_max = 20
integer(c_int) :: refit_iters = 0
real(c_double) :: inner_tol_factor = 0.5d0
integer(c_int) :: phase = 1
integer(c_int) :: refit_every = 4
real(c_double) :: noise = 1.0d-3
real(c_double) :: pair_cutoff = 9.5d0
real(c_double) :: pair_spacing = 0.0d0
real(c_double) :: far_trust = 0.5d0
real(c_double) :: far_refresh = 0.05d0
integer(c_int) :: initial_sweep = 1
integer(c_int) :: batch = 1
integer(c_int) :: batch_growth = 8
integer(c_int) :: batch_max = 3
integer(c_int) :: sweep_images = 0
integer(c_int) :: jacobi = 0
real(c_double) :: grow_radius = 3.0d0
integer(c_int) :: safeguard = 1
integer(c_int) :: keep_memory = 1
integer(c_int) :: residual = 1
real(c_double) :: pair_split = 7.0d0
real(c_double) :: pair_tail_refresh = 0.0d0
integer(c_int) :: cycles = 2
integer(c_int) :: sweep = 0
integer(c_int) :: force_stop_certificate = 0
real(c_double) :: certificate_step = 0.0d0
integer(c_int) :: vibrational_stencil = 0

PeriodicBandConfig

Periodic local band (gpr_periodic_band_config_t). The initializers are gpr_periodic_band_config_defaults(), which PeriodicBandConfig() returns. The local knobs stay on LocalBandConfig.

bind(C); the components follow the C struct in field order.

real(c_double) :: fmax = 0.05d0
real(c_double) :: spring_constant = 5.0d0
real(c_double) :: max_move = 0.2d0
integer(c_int) :: steps = 1000
integer(c_int) :: climb = 1
integer(c_int) :: initial = GPR_PERIODIC_BAND_LINEAR
integer(c_int) :: seed = 42
integer(c_int) :: verbose = 0
integer(c_int) :: convergence_norm = GPR_PERIODIC_NORM_UNSET

OCINEBConfig

OCINEB dimer-burst controls (gpr_ocineb_config_t). The initializers are gpr_ocineb_config_defaults(), which OCINEBConfig() returns.

bind(C); the components follow the C struct in field order.

integer(c_int) :: use_mmf = 1
real(c_double) :: trigger_force = 0.0d0
real(c_double) :: trigger_factor = 0.31d0
integer(c_long) :: max_steps = 0
real(c_double) :: alignment_cos_tol = 0.85d0
real(c_double) :: force_tolerance = 0.05d0
integer(c_int) :: dimer_max_phases = 0
integer(c_int) :: dimer_max_inner_iter = 0
integer(c_int) :: dimer_max_rot_iter = 10
integer(c_int) :: dimer_eval_image1 = 1
real(c_double) :: perturb_along_tangent = 0.05d0
real(c_double) :: max_burst_displacement = 0.0d0

AtomsDescriptor

The C atoms descriptor (gpr_atoms_config_t). AtomsConfig(n, …) fills it; it is public so its layout can be checked against the header.

bind(C); the components follow the C struct in field order.

integer(c_int) :: n_atoms_total = 0
type(c_ptr) :: is_frozen = c_null_ptr
type(c_ptr) :: atom_types = c_null_ptr
type(c_ptr) :: atomic_nrs = c_null_ptr
type(c_ptr) :: positions = c_null_ptr
real(c_double) :: actdist_fro = 0.0d0

RFFSelection

Report of held-out random-feature selection (gpr_rff_selection_t).

bind(C); the components follow the C struct in field order.

integer(c_int) :: accepted = 0
integer(c_int) :: deferred = 0
integer(c_int) :: automatic = 0
integer(c_int) :: features = 0
integer(c_int) :: start_features = 0
integer(c_int) :: limit_features = 0
integer(c_int) :: fit_geometries = 0
integer(c_int) :: holdout_geometries = 0
integer(c_int) :: full_geometries = 0
integer(c_int) :: cartesian_dimension = 0
integer(c_int) :: joint_rows = 0
real(c_double) :: force_tol_fraction = 0.0d0
real(c_double) :: force_convergence_tolerance = 0.0d0
real(c_double) :: energy_tolerance = 0.0d0
real(c_double) :: force_tolerance = 0.0d0
real(c_double) :: energy_noise = 0.0d0
real(c_double) :: gradient_noise = 0.0d0
real(c_double) :: max_energy_error = 0.0d0
real(c_double) :: max_force_error = 0.0d0
real(c_double) :: max_energy_oracle_error = 0.0d0
real(c_double) :: max_force_oracle_error = 0.0d0
real(c_double) :: exact_energy_oracle_error = 0.0d0
real(c_double) :: exact_force_oracle_error = 0.0d0
integer(c_long_long) :: exact_gram_bytes = 0
integer(c_long_long) :: memory_cap_bytes = 0
integer(c_long_long) :: full_gram_bytes = 0

NoiseFloorReport

Condition-floored noise and certificate gap of a trained model (gpr_noise_floor_report_t, ABI 1.14).

bind(C); the components follow the C struct in field order.

real(c_double) :: sigma2_requested = 0.0d0
real(c_double) :: sigma2_floored = 0.0d0
real(c_double) :: certificate_gap = 0.0d0
real(c_double) :: sigma2_interval = 0.0d0
integer(c_int) :: floor_active = 0
integer(c_int) :: certified = 0

LJParams

Lennard-Jones oracle adapter parameters (gpr_lj_params_t).

bind(C); the components follow the C struct in field order.

integer(c_int) :: n_atoms = 0
real(c_double) :: epsilon = 1.0d0
real(c_double) :: sigma = 1.0d0

AtomsConfig

Atomic configuration for GP kernel (wraps opaque C handle).

Binding

Implementation

%n_moving

atoms_n_moving

%n_pairtypes

atoms_n_pairtypes

%is_valid

atoms_is_valid

%get_handle

atoms_get_handle

%release

atoms_release

%n_moving

function atoms_n_moving(self) result(n)
  class(AtomsConfig), intent(in) :: self
  integer :: n

%n_pairtypes

function atoms_n_pairtypes(self) result(n)
  class(AtomsConfig), intent(in) :: self
  integer :: n

%is_valid

function atoms_is_valid(self) result(valid)
  class(AtomsConfig), intent(in) :: self
  logical :: valid

%get_handle

function atoms_get_handle(self) result(h)
  class(AtomsConfig), intent(in) :: self
  type(c_ptr) :: h

%release

subroutine atoms_release(self)
  class(AtomsConfig), intent(inout) :: self

GPModel

Gaussian/Student-t process model (wraps opaque C handle).

Binding

Implementation

%init

gpmodel_init

%train

gpmodel_train

%train_marginal_likelihood

gpmodel_train_marginal_likelihood

%update

gpmodel_update

%append_fixed

gpmodel_append_fixed

%calibrate_forces

gpmodel_calibrate_forces

%calibrate_loo

gpmodel_calibrate_loo

%predict

gpmodel_predict

%predict_variance

gpmodel_predict_variance

%predict_full

gpmodel_predict_full

%predict_batch

gpmodel_predict_batch

%predict_hessian

gpmodel_predict_hessian

%predict_hessian_action

gpmodel_predict_hessian_action

%prediction_supported

gpmodel_prediction_supported

%prediction_factors

gpmodel_prediction_factors

%fit_iterations

gpmodel_fit_iterations

%fit_restarts

gpmodel_fit_restarts

%fit_stop_reason

gpmodel_fit_stop_reason

%set_rff_features

gpmodel_set_rff_features

%get_rff_selection

gpmodel_get_rff_selection

%set_rigid_null_deflation

gpmodel_set_rigid_null_deflation

%get_rigid_null_deflation

gpmodel_get_rigid_null_deflation

%predict_energy_variance_interval

gpmodel_predict_energy_variance_interval

%noise_floor_report

gpmodel_noise_floor_report

%mean_hessian_batch

gpmodel_mean_hessian_batch

%mean_hessian_action_batch

gpmodel_mean_hessian_action_batch

%hessian_bilinear_covariance

gpmodel_hessian_bilinear_covariance

%hessian_trace_variance

gpmodel_hessian_trace_variance

%posterior_variance_batch

gpmodel_posterior_variance_batch

%condition_fixed

gpmodel_condition_fixed

%condition_fixed_hessian

gpmodel_condition_fixed_hessian

%model_type

gpmodel_model_type

%n_lengthscales

gpmodel_n_lengthscales

%get_lengthscales

gpmodel_get_lengthscales

%set_lengthscales

gpmodel_set_lengthscales

%get_magn_sigma2

gpmodel_get_magn_sigma2

%set_magn_sigma2

gpmodel_set_magn_sigma2

%get_sigma2

gpmodel_get_sigma2

%set_sigma2

gpmodel_set_sigma2

%get_jitter

gpmodel_get_jitter

%set_hssvd_backend

gpmodel_set_hssvd_backend

%get_hssvd_backend

gpmodel_get_hssvd_backend

%get_alpha

gpmodel_get_alpha

%n_observations

gpmodel_n_observations

%tp_prefactor

gpmodel_tp_prefactor

%is_valid

gpmodel_is_valid

%release

gpmodel_release

%init

Initialize model with configuration and atom setup

subroutine gpmodel_init(self, config, atoms, ierr)
  class(GPModel), intent(inout) :: self
  type(ModelConfig), intent(in) :: config
  type(AtomsConfig), intent(in) :: atoms
  integer, intent(out), optional :: ierr

%train

Train model on observations. R and G hold n_obs * n_coords values, E holds n_obs; a shorter array is refused with GPR_ERR_INVALID_ARG.

subroutine gpmodel_train(self, R, E, G, n_obs, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), E(:), G(:)
  integer, intent(in) :: n_obs, n_coords
  integer, intent(out), optional :: ierr

%train_marginal_likelihood

Fit all rows by prior-free Gaussian marginal likelihood. The report and lengthscales are unchanged when an extent check rejects the call.

subroutine gpmodel_train_marginal_likelihood(self, R, E, G, n_obs, n_coords, report, lengthscales, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), E(:), G(:)
  integer, intent(in) :: n_obs, n_coords
  type(MarginalLikelihoodReport) :: report
  real(c_double), contiguous :: lengthscales(:)
  integer, intent(out), optional :: ierr

%update

Add observations and retrain. The array extents are checked as in train.

subroutine gpmodel_update(self, R, E, G, n_new, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), E(:), G(:)
  integer, intent(in) :: n_new, n_coords
  integer, intent(out), optional :: ierr

%append_fixed

Append rows without changing fitted hyperparameters or refactorizing.

subroutine gpmodel_append_fixed(self, R, E, G, n_new, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), E(:), G(:)
  integer, intent(in) :: n_new, n_coords
  integer, intent(out), optional :: ierr

%calibrate_forces

Calibrate latent force marginals against held-out true gradients.

subroutine gpmodel_calibrate_forces(self, R, G_true, n_holdout, n_coords, nominal_probability, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), G_true(:)
  integer, intent(in) :: n_holdout, n_coords
  real(c_double), intent(in) :: nominal_probability
  type(CalibrationReport) :: report
  integer, intent(out), optional :: ierr

%calibrate_loo

Calibrate all fitted training channels by closed-form leave-one-out prediction without changing the model.

subroutine gpmodel_calibrate_loo(self, nominal_probability, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in) :: nominal_probability
  type(CalibrationReport) :: report
  integer, intent(out), optional :: ierr

%predict

Predict energy and gradient at a query point. R_query and G_out hold n_coords values.

subroutine gpmodel_predict(self, R_query, E_out, G_out, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  real(c_double), intent(out) :: E_out
  real(c_double), intent(out), contiguous :: G_out(:)
  integer, intent(in) :: n_coords
  integer, intent(out), optional :: ierr

%predict_variance

Predict variance at a query point. R_query and var_G hold n_coords values.

subroutine gpmodel_predict_variance(self, R_query, var_E, var_G, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  real(c_double), intent(out) :: var_E
  real(c_double), intent(out), contiguous :: var_G(:)
  integer, intent(in) :: n_coords
  integer, intent(out), optional :: ierr

%predict_full

Predict energy, gradient and their variances at a query point No INTENT on the outputs: an error leaves them unchanged.

subroutine gpmodel_predict_full(self, R_query, E_out, G_out, var_E, var_G, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  real(c_double) :: E_out, var_E
  real(c_double), contiguous :: G_out(:), var_G(:)
  integer, intent(in) :: n_coords
  integer, intent(out), optional :: ierr

%predict_batch

Predict at n_queries points stored one after another in R_queries. var_E (n_queries) and var_G (n_queries*n_coords) are optional.

subroutine gpmodel_predict_batch(self, R_queries, E_out, G_out, n_queries, n_coords, ierr, var_E, var_G)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_queries(:)
  real(c_double), contiguous :: E_out(:), G_out(:)
  integer, intent(in) :: n_queries, n_coords
  integer, intent(out), optional :: ierr
  real(c_double), intent(inout), optional, target, contiguous :: var_E(:)
  real(c_double), intent(inout), optional, target, contiguous :: var_G(:)

%predict_hessian

Posterior-mean Hessian (n_coords x n_coords, symmetric) at R_query.

subroutine gpmodel_predict_hessian(self, R_query, H_out, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  real(c_double), intent(out), contiguous :: H_out(:)
  integer, intent(in) :: n_coords
  integer, intent(out), optional :: ierr

%predict_hessian_action

Apply the posterior-mean Hessian to v. All arrays hold n_coords values.

subroutine gpmodel_predict_hessian_action(self, R_query, v, Hv_out, n_coords, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:), v(:)
  real(c_double), contiguous :: Hv_out(:)
  integer, intent(in) :: n_coords
  integer, intent(out), optional :: ierr

%prediction_supported

Report whether the model’s own kernel-support rule admits R_query.

subroutine gpmodel_prediction_supported(self, R_query, n_coords, supported, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  integer, intent(in) :: n_coords
  logical :: supported
  integer, intent(out), optional :: ierr

%prediction_factors

Factors of one trained energy prediction.

subroutine gpmodel_prediction_factors(self, R_query, n_coords, energy, scale, mean, kstar, weights, order, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_query(:)
  integer, intent(in) :: n_coords
  real(c_double), intent(out) :: energy, scale, mean
  real(c_double), intent(out), contiguous :: kstar(:), weights(:)
  integer, intent(out) :: order
  integer, intent(out), optional :: ierr

%fit_iterations

Optimizer iterations the last train ran, or -1 if missing. The count is rgmin’s SCG steps plus the L-BFGS fallback steps that finish a stalled rgmin SCG fit.

function gpmodel_fit_iterations(self) result(iters)
  class(GPModel), intent(in) :: self
  integer :: iters

%fit_restarts

Restarts the last train needed: 1 after a restarted marginal-likelihood fit, otherwise 0. INTENT(INOUT) preserves the caller value when C rejects the handle.

subroutine gpmodel_fit_restarts(self, restarts, ierr)
  class(GPModel), intent(in) :: self
  integer, intent(inout) :: restarts
  integer, intent(out), optional :: ierr

%fit_stop_reason

Why the last train stopped: “budget” when an rgmin fit exhausts its iteration budget, “library” when it does not, “restored scg point” when a rejected L-BFGS fallback restores the SCG point, “wall-clock limit” when the wall is already spent, “non-finite marginal likelihood” when a failed fit keeps a non-finite input marginal likelihood, “unset” before any train, and “missing” for a NULL handle.

function gpmodel_fit_stop_reason(self) result(reason)
  class(GPModel), intent(in) :: self
  character(len=:), allocatable :: reason

%set_rff_features

Configure the random-feature count or automatic held-out selection (-1).

subroutine gpmodel_set_rff_features(self, n_features, force_tol_fraction, ierr)
  class(GPModel), intent(inout) :: self
  integer, intent(in) :: n_features
  real(c_double), intent(in), optional :: force_tol_fraction
  integer, intent(out), optional :: ierr

%get_rff_selection

Copy the stored held-out random-feature selection report.

subroutine gpmodel_get_rff_selection(self, selection, ierr)
  class(GPModel), intent(in) :: self
  type(RFFSelection), intent(out) :: selection
  integer, intent(out), optional :: ierr

%set_rigid_null_deflation

Enable or disable rigid-motion nullspace deflation on training factorizations.

subroutine gpmodel_set_rigid_null_deflation(self, enabled, ierr)
  class(GPModel), intent(inout) :: self
  logical, intent(in) :: enabled
  integer, intent(out), optional :: ierr

%get_rigid_null_deflation

Query whether rigid-motion nullspace deflation is enabled.

function gpmodel_get_rigid_null_deflation(self, ierr) result(enabled)
  class(GPModel), intent(in) :: self
  integer, intent(out), optional :: ierr
  logical :: enabled

%predict_energy_variance_interval

Certified energy-variance intervals for n_queries contiguous points (ABI 1.14).

subroutine gpmodel_predict_energy_variance_interval(self, R_queries, n_queries, n_coords, lower, upper, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_queries(:)
  integer, intent(in) :: n_queries, n_coords
  real(c_double), contiguous :: lower(:), upper(:)
  integer, intent(out), optional :: ierr

%noise_floor_report

Condition-floored noise and certificate gap of the trained model (ABI 1.14).

subroutine gpmodel_noise_floor_report(self, report, ierr)
  class(GPModel), intent(in) :: self
  type(NoiseFloorReport), intent(out) :: report
  integer, intent(out), optional :: ierr

%mean_hessian_batch

Posterior-mean Hessians at n_points contiguous points: H_out holds n_points row-major n_coords x n_coords blocks. residuals (6 per point) receives the rigid-generator norms H g_k of the raw Hessian.

subroutine gpmodel_mean_hessian_batch(self, R, n_points, n_coords, H_out, options, residuals, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:)
  integer, intent(in) :: n_points, n_coords
  real(c_double), contiguous :: H_out(:)
  type(DerivativeOptions), intent(in), optional :: options
  real(c_double), intent(inout), contiguous, optional, target :: residuals(:)
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%mean_hessian_action_batch

Posterior-mean Hessian actions: V holds n_vectors vectors per point (point-major); Hv_out the same layout.

subroutine gpmodel_mean_hessian_action_batch(self, R, n_points, n_coords, V, n_vectors, Hv_out, options, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), V(:)
  integer, intent(in) :: n_points, n_coords, n_vectors
  real(c_double), contiguous :: Hv_out(:)
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%hessian_bilinear_covariance

Posterior covariance of v_i^T H w_j, one (n_left*n_right)^2 block per point. A probabilistic estimate, not a bound.

subroutine gpmodel_hessian_bilinear_covariance(self, R, n_points, n_coords, V, n_left, W, n_right, cov_out, options, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), V(:), W(:)
  integer, intent(in) :: n_points, n_coords, n_left, n_right
  real(c_double), contiguous :: cov_out(:)
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%hessian_trace_variance

Posterior variance of tr(A dH) for one symmetric A per point.

subroutine gpmodel_hessian_trace_variance(self, R, n_points, n_coords, A, var_out, options, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:), A(:)
  integer, intent(in) :: n_points, n_coords
  real(c_double), contiguous :: var_out(:)
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%posterior_variance_batch

Posterior variance of the energy and of each gradient component.

subroutine gpmodel_posterior_variance_batch(self, R, n_points, n_coords, var_E, var_G, options, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R(:)
  integer, intent(in) :: n_points, n_coords
  real(c_double), contiguous :: var_E(:), var_G(:)
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%condition_fixed

Condition on n_new oracle rows at fixed hyperparameters, then predict energy, gradient and their variances at n_query points. When H_new or hvp is supplied, the fixed-point Hessian is validated and used in subsequent Vineyard prefactor calculations at R_new.

subroutine gpmodel_condition_fixed(self, R_new, E_new, G_new, n_new, R_query, n_query, n_coords, E_out, G_out, var_E, var_G, options, report, ierr, H_new, hvp, user_data)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_new(:), E_new(:), G_new(:)
  real(c_double), intent(in), contiguous :: R_query(:)
  integer, intent(in) :: n_new, n_query, n_coords
  real(c_double), contiguous :: E_out(:), G_out(:), var_E(:), var_G(:)
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr
  real(c_double), intent(in), contiguous, optional, target :: H_new(:)
  procedure(gpr_hvp_interface), optional :: hvp
  type(c_ptr), intent(in), optional :: user_data

%condition_fixed_hessian

Condition on a fixed point with an optional exact Hessian H_new or Hessian-vector-product callback hvp, then predict at n_query points.

subroutine gpmodel_condition_fixed_hessian(self, R_new, E_new, G_new, n_new, R_query, n_query, n_coords, E_out, G_out, var_E, var_G, H_new, hvp, user_data, options, report, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: R_new(:), E_new(:), G_new(:)
  real(c_double), intent(in), contiguous :: R_query(:)
  integer, intent(in) :: n_new, n_query, n_coords
  real(c_double), contiguous :: E_out(:), G_out(:), var_E(:), var_G(:)
  real(c_double), intent(in), contiguous, optional, target :: H_new(:)
  procedure(gpr_hvp_interface), optional :: hvp
  type(c_ptr), intent(in), optional :: user_data
  type(DerivativeOptions), intent(in), optional :: options
  type(DerivativeReport), intent(inout), optional :: report
  integer, intent(out), optional :: ierr

%model_type

GPR_MODEL_GP or GPR_MODEL_TP

function gpmodel_model_type(self) result(model_type)
  class(GPModel), intent(in) :: self
  integer :: model_type

%n_lengthscales

Number of kernel lengthscale parameters

function gpmodel_n_lengthscales(self) result(n)
  class(GPModel), intent(in) :: self
  integer :: n

%get_lengthscales

Get lengthscale values. out must hold n_lengthscales() values; a shorter array is refused with GPR_ERR_INVALID_ARG.

subroutine gpmodel_get_lengthscales(self, out, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(out), contiguous :: out(:)
  integer, intent(out), optional :: ierr

%set_lengthscales

Set lengthscale values. values must hold n values.

subroutine gpmodel_set_lengthscales(self, values, n, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in), contiguous :: values(:)
  integer, intent(in) :: n
  integer, intent(out), optional :: ierr

%get_magn_sigma2

Get signal variance

subroutine gpmodel_get_magn_sigma2(self, val, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(out) :: val
  integer, intent(out), optional :: ierr

%set_magn_sigma2

Set signal variance

subroutine gpmodel_set_magn_sigma2(self, val, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in) :: val
  integer, intent(out), optional :: ierr

%get_sigma2

Get noise variance

subroutine gpmodel_get_sigma2(self, val, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(out) :: val
  integer, intent(out), optional :: ierr

%set_sigma2

Set noise variance

subroutine gpmodel_set_sigma2(self, val, ierr)
  class(GPModel), intent(inout) :: self
  real(c_double), intent(in) :: val
  integer, intent(out), optional :: ierr

%get_jitter

Configured numerical diagonal jitter variance. INTENT(INOUT) preserves the caller value when C rejects the handle.

subroutine gpmodel_get_jitter(self, val, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(inout) :: val
  integer, intent(out), optional :: ierr

%set_hssvd_backend

Select the HS-SVD stable-basis backend for the next training call.

subroutine gpmodel_set_hssvd_backend(self, enabled, ierr)
  class(GPModel), intent(inout) :: self
  logical, intent(in) :: enabled
  integer, intent(out), optional :: ierr

%get_hssvd_backend

Return whether the HS-SVD stable-basis backend is selected.

subroutine gpmodel_get_hssvd_backend(self, enabled, ierr)
  class(GPModel), intent(in) :: self
  logical, intent(out) :: enabled
  integer, intent(out), optional :: ierr

%get_alpha

Posterior mean weights. size(alpha) is the buffer capacity passed to C. A short or empty buffer returns GPR_ERR_INVALID_ARG and is not written. Capacity beyond the weight vector is left unchanged.

subroutine gpmodel_get_alpha(self, alpha, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(inout), contiguous :: alpha(:)
  integer, intent(out), optional :: ierr

%n_observations

Number of training observations

function gpmodel_n_observations(self) result(n)
  class(GPModel), intent(in) :: self
  integer :: n

%tp_prefactor

TP prefactor (valid after training, TP models only)

subroutine gpmodel_tp_prefactor(self, val, ierr)
  class(GPModel), intent(in) :: self
  real(c_double), intent(out) :: val
  integer, intent(out), optional :: ierr

%is_valid

function gpmodel_is_valid(self) result(valid)
  class(GPModel), intent(in) :: self
  logical :: valid

%release

subroutine gpmodel_release(self)
  class(GPModel), intent(inout) :: self

NEBResult

NEB result (wraps opaque C handle with path data).

Binding

Implementation

%converged

neb_converged

%oracle_calls

neb_oracle_calls

%barrier

neb_barrier

%n_images

neb_n_images

%image_energy

neb_image_energy

%image_positions

neb_image_positions

%convergence_status

neb_convergence_status

%outer_iterations

neb_outer_iterations

%energies

neb_energies

%max_energy_image

neb_max_energy_image

%report

neb_report

%prefactor

neb_prefactor

%is_valid

neb_is_valid

%release

neb_release

%converged

function neb_converged(self) result(conv)
  class(NEBResult), intent(in) :: self
  logical :: conv

%oracle_calls

function neb_oracle_calls(self) result(n)
  class(NEBResult), intent(in) :: self
  integer :: n

%barrier

function neb_barrier(self) result(b)
  class(NEBResult), intent(in) :: self
  real(c_double) :: b

%n_images

function neb_n_images(self) result(n)
  class(NEBResult), intent(in) :: self
  integer :: n

%image_energy

subroutine neb_image_energy(self, idx, energy, ierr)
  class(NEBResult), intent(in) :: self
  integer, intent(in) :: idx
  real(c_double), intent(out) :: energy
  integer, intent(out), optional :: ierr

%image_positions

subroutine neb_image_positions(self, idx, positions, n_coords, ierr)
  class(NEBResult), intent(in) :: self
  integer, intent(in) :: idx, n_coords
  real(c_double), intent(out), contiguous :: positions(:)
  integer, intent(out), optional :: ierr

%convergence_status

GPR_NEB_NOT_CONVERGED, GPR_NEB_FORCE_TOLERANCE or GPR_NEB_MODEL_NOISE_FLOOR.

function neb_convergence_status(self) result(status)
  class(NEBResult), intent(in) :: self
  integer :: status

%outer_iterations

function neb_outer_iterations(self) result(n)
  class(NEBResult), intent(in) :: self
  integer :: n

%energies

Energies of every image, endpoints included.

subroutine neb_energies(self, energies, stat, errmsg)
  class(NEBResult), intent(in) :: self
  real(c_double), allocatable, intent(out) :: energies(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%max_energy_image

0-based index of the highest-energy image.

function neb_max_energy_image(self) result(idx)
  class(NEBResult), intent(in) :: self
  integer :: idx

%report

Fill report (gpr_neb_report_t) from the result.

subroutine neb_report(self, report, stat, errmsg)
  class(NEBResult), intent(in) :: self
  type(NEBReport), intent(inout) :: report
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%prefactor

A half of this GP NEB result, as gpr_search_prefactor.

subroutine neb_prefactor(self, point, half, frequencies, measured, n_coords, stat, errmsg)
  class(NEBResult), intent(in) :: self
  integer, intent(in) :: point
  type(HTSTHalf), intent(inout) :: half
  real(c_double), intent(inout), contiguous, optional, target :: frequencies(:)
  integer(c_int), intent(inout), contiguous, optional, target :: measured(:)
  integer, intent(in), optional :: n_coords
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%is_valid

function neb_is_valid(self) result(valid)
  class(NEBResult), intent(in) :: self
  logical :: valid

%release

subroutine neb_release(self)
  class(NEBResult), intent(inout) :: self

PotentialHandle

Force-evaluation wrapper handle (wraps opaque gpr_potential_t).

Binding

Implementation

%force

pot_force

%force_with_uncertainty

pot_force_with_uncertainty

%is_valid

pot_is_valid

%get_handle

pot_get_handle

%release

pot_release

%force

subroutine pot_force(self, n_atoms, R, atomic_nrs, F, energy, energy_noise_rms, box, stat, errmsg)
  class(PotentialHandle), intent(in) :: self
  integer, intent(in) :: n_atoms
  real(c_double), intent(in) :: R(:)
  integer, intent(in) :: atomic_nrs(:)
  real(c_double), intent(out) :: F(:)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out), optional, target :: energy_noise_rms
  real(c_double), intent(in), optional, target :: box(9)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%force_with_uncertainty

subroutine pot_force_with_uncertainty(self, n_atoms, R, atomic_nrs, F, energy, energy_noise_rms, force_noise_rms, box, stat, errmsg)
  class(PotentialHandle), intent(in) :: self
  integer, intent(in) :: n_atoms
  real(c_double), intent(in) :: R(:)
  integer, intent(in) :: atomic_nrs(:)
  real(c_double), intent(out) :: F(:)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out), optional, target :: energy_noise_rms
  real(c_double), intent(out), optional, target :: force_noise_rms
  real(c_double), intent(in), optional, target :: box(9)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%is_valid

function pot_is_valid(self) result(valid)
  class(PotentialHandle), intent(in) :: self
  logical :: valid

%get_handle

function pot_get_handle(self) result(h)
  class(PotentialHandle), intent(in) :: self
  type(c_ptr) :: h

%release

subroutine pot_release(self)
  class(PotentialHandle), intent(inout) :: self

FESSurrogate

Gaussian process over a free energy F(s) on collective variables. Point arrays are s(dimension, n): one column per point.

Binding

Implementation

%dimension

fes_dimension

%n_observations

fes_n_observations

%train

fes_train

%predict

fes_predict

%rate_path

fes_rate_path

%is_valid

fes_is_valid

%get_handle

fes_get_handle

%release

fes_release

%dimension

function fes_dimension(self) result(n)
  class(FESSurrogate), intent(in) :: self
  integer :: n

%n_observations

function fes_n_observations(self) result(n)
  class(FESSurrogate), intent(in) :: self
  integer :: n

%train

Train on F at the columns of s. grad_F and grad_noise_var must have the shape of s (dimension x n). grad_present (n) is with them, or all three are absent. Any other shape is rejected.

subroutine fes_train(self, s, F, F_noise_var, grad_F, grad_noise_var, grad_present, stat, errmsg)
  class(FESSurrogate), intent(inout) :: self
  real(c_double), intent(in), contiguous :: s(:,:), F(:)
  real(c_double), intent(in), optional :: F_noise_var(:)
  real(c_double), intent(in), optional :: grad_F(:,:), grad_noise_var(:,:)
  logical, intent(in), optional :: grad_present(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%predict

Posterior mean F(n) at the n columns of s, with the mean gradient grad_F(dimension, n) and the latent variance var_F(n) when present. Outputs of any other shape are rejected unwritten.

subroutine fes_predict(self, s, F, grad_F, var_F, stat, errmsg)
  class(FESSurrogate), intent(in) :: self
  real(c_double), intent(in), contiguous :: s(:,:)
  real(c_double), intent(inout) :: F(:)
  real(c_double), intent(inout), optional :: grad_F(:,:), var_F(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%rate_path

Posterior-sampled Kramers rate along the columns of path. The indices are 1-based; diffusion(dimension) is the diagonal of the diffusion tensor.

subroutine fes_rate_path(self, path, reactant, product, diffusion, config, report, stat, errmsg)
  class(FESSurrogate), intent(in) :: self
  real(c_double), intent(in), contiguous :: path(:,:)
  integer, intent(in) :: reactant, product
  real(c_double), intent(in), contiguous :: diffusion(:)
  type(FESRateConfig), intent(in) :: config
  type(FESRateReport), intent(inout) :: report
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

%is_valid

function fes_is_valid(self) result(valid)
  class(FESSurrogate), intent(in) :: self
  logical :: valid

%get_handle

function fes_get_handle(self) result(h)
  class(FESSurrogate), intent(in) :: self
  type(c_ptr) :: h

%release

subroutine fes_release(self)
  class(FESSurrogate), intent(inout) :: self

Callback interfaces

Abstract interfaces for the procedures a search calls back.

gpr_oracle_interface

subroutine gpr_oracle_interface(n_coords, positions, energy, gradient, &
    user_data) bind(C)
  integer(c_int), value :: n_coords
  real(c_double), intent(in) :: positions(n_coords)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(n_coords)
  type(c_ptr), value :: user_data
end subroutine

gpr_force_interface

subroutine gpr_force_interface(n_atoms, positions, atomic_nrs, forces, &
    energy, energy_noise_rms, box, user_data) bind(C)
  integer(c_long), value :: n_atoms
  real(c_double), intent(in) :: positions(3 * n_atoms)
  integer(c_int), intent(in) :: atomic_nrs(n_atoms)
  real(c_double), intent(out) :: forces(3 * n_atoms)
  real(c_double), intent(out) :: energy
  type(c_ptr), value :: energy_noise_rms, box, user_data
end subroutine

gpr_force_with_uncertainty_interface

subroutine gpr_force_with_uncertainty_interface(n_atoms, positions, &
    atomic_nrs, forces, energy, energy_noise_rms, force_noise_rms, box, &
    user_data) bind(C)
  integer(c_long), value :: n_atoms
  real(c_double), intent(in) :: positions(3 * n_atoms)
  integer(c_int), intent(in) :: atomic_nrs(n_atoms)
  real(c_double), intent(out) :: forces(3 * n_atoms)
  real(c_double), intent(out) :: energy
  type(c_ptr), value :: energy_noise_rms, force_noise_rms, box, user_data
end subroutine

gpr_hvp_interface

subroutine gpr_hvp_interface(n_coords, positions, vector, hv_out, &
    user_data) bind(C)
  integer(c_int), value :: n_coords
  real(c_double), intent(in) :: positions(n_coords), vector(n_coords)
  real(c_double), intent(out) :: hv_out(n_coords)
  type(c_ptr), value :: user_data
end subroutine

Module procedures

c_gpr_bq_config_defaults

function c_gpr_bq_config_defaults()

c_gpr_bq_create

type(c_ptr) function c_gpr_bq_create(config)
  type(BQConfig), intent(in) :: config

c_gpr_bq_destroy

subroutine c_gpr_bq_destroy(bq)
  type(c_ptr), value :: bq

c_gpr_bq_reset

integer(c_int) function c_gpr_bq_reset(bq, config)
  type(c_ptr), value :: bq
  type(BQConfig), intent(in) :: config

c_gpr_bq_dimension

integer(c_int) function c_gpr_bq_dimension(bq)
  type(c_ptr), value :: bq

c_gpr_bq_n_observations

integer(c_int) function c_gpr_bq_n_observations(bq)
  type(c_ptr), value :: bq

c_gpr_bq_n_lengthscales

integer(c_int) function c_gpr_bq_n_lengthscales(bq)
  type(c_ptr), value :: bq

c_gpr_bq_train_checked

integer(c_int) function c_gpr_bq_train_checked(bq, X, X_len, y, y_len, noise, noise_len, n, d)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: X(*), y(*), noise(*)
  integer(c_size_t), value :: X_len, y_len, noise_len
  integer(c_int), value :: n, d

c_gpr_bq_train_bounded_checked

integer(c_int) function c_gpr_bq_train_bounded_checked(bq, X, X_len, y, y_len, noise, noise_len, lower, lower_len, upper, upper_len, n, d)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: X(*), y(*), noise(*), lower(*), upper(*)
  integer(c_size_t), value :: X_len, y_len, noise_len, lower_len, upper_len
  integer(c_int), value :: n, d

c_gpr_bq_append_checked

integer(c_int) function c_gpr_bq_append_checked(bq, X, X_len, y, y_len, noise, noise_len, n, d, refit)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: X(*), y(*), noise(*)
  integer(c_size_t), value :: X_len, y_len, noise_len
  integer(c_int), value :: n, d, refit

c_gpr_bq_fit_hyperparameters_checked

integer(c_int) function c_gpr_bq_fit_hyperparameters_checked(bq, mode, report, ls, nls)
  type(c_ptr), value :: bq
  integer(c_int), value :: mode
  type(*) :: report
  real(c_double) :: ls(*)
  integer(c_size_t), value :: nls

c_gpr_bq_get_lengthscales_checked

integer(c_int) function c_gpr_bq_get_lengthscales_checked(bq, out, n)
  type(c_ptr), value :: bq
  real(c_double) :: out(*)
  integer(c_size_t), value :: n

c_gpr_bq_set_lengthscales_checked

integer(c_int) function c_gpr_bq_set_lengthscales_checked(bq, values, n)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: values(*)
  integer(c_size_t), value :: n

c_gpr_bq_get_magn_sigma2

integer(c_int) function c_gpr_bq_get_magn_sigma2(bq, out)
  type(c_ptr), value :: bq
  real(c_double) :: out

c_gpr_bq_set_magn_sigma2

integer(c_int) function c_gpr_bq_set_magn_sigma2(bq, value)
  type(c_ptr), value :: bq
  real(c_double), value :: value

c_gpr_bq_get_extra_sigma2

integer(c_int) function c_gpr_bq_get_extra_sigma2(bq, out)
  type(c_ptr), value :: bq
  real(c_double) :: out

c_gpr_bq_set_extra_sigma2

integer(c_int) function c_gpr_bq_set_extra_sigma2(bq, value)
  type(c_ptr), value :: bq
  real(c_double), value :: value

c_gpr_bq_predict_batch_checked

integer(c_int) function c_gpr_bq_predict_batch_checked(bq, X, X_len, mean, mean_len, var, var_len, n, d)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: X(*)
  real(c_double) :: mean(*), var(*)
  integer(c_size_t), value :: X_len, mean_len, var_len
  integer(c_int), value :: n, d

c_gpr_bq_kernel_mean_checked

integer(c_int) function c_gpr_bq_kernel_mean_checked(bq, lower, nl, upper, nu, X, nx, n, d, z, nz)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*), X(*)
  real(c_double) :: z(*)
  integer(c_size_t), value :: nl, nu, nx, nz
  integer(c_int), value :: n, d

c_gpr_bq_kernel_double_integral_checked

integer(c_int) function c_gpr_bq_kernel_double_integral_checked(bq, lower, nl, upper, nu, d, omega)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*)
  integer(c_size_t), value :: nl, nu
  integer(c_int), value :: d
  real(c_double) :: omega

c_gpr_bq_integrate_checked

integer(c_int) function c_gpr_bq_integrate_checked(bq, lower, nl, upper, nu, d, mean, var)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*)
  integer(c_size_t), value :: nl, nu
  integer(c_int), value :: d
  real(c_double) :: mean, var

c_gpr_bq_integrate_report_checked

integer(c_int) function c_gpr_bq_integrate_report_checked(bq, lower, nl, upper, nu, d, report)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*)
  integer(c_size_t), value :: nl, nu
  integer(c_int), value :: d
  type(*) :: report

c_gpr_bq_integrate_measure_checked

integer(c_int) function c_gpr_bq_integrate_measure_checked(bq, kind, lower, nl, upper, nu, mean, nm, cov, nc, d, mout, vout, mass)
  type(c_ptr), value :: bq
  integer(c_int), value :: kind, d
  real(c_double), intent(in) :: lower(*), upper(*), mean(*), cov(*)
  integer(c_size_t), value :: nl, nu, nm, nc
  real(c_double) :: mout, vout, mass

c_gpr_bq_integrate_uncertainty_checked

integer(c_int) function c_gpr_bq_integrate_uncertainty_checked(bq, kind, lower, nl, upper, nu, mean, nm, cov, nc, d, report)
  type(c_ptr), value :: bq
  integer(c_int), value :: kind, d
  real(c_double), intent(in) :: lower(*), upper(*), mean(*), cov(*)
  integer(c_size_t), value :: nl, nu, nm, nc
  type(*) :: report

c_gpr_bq_set_basis

integer(c_int) function c_gpr_bq_set_basis(bq, basis)
  type(c_ptr), value :: bq
  integer(c_int), value :: basis

c_gpr_bq_get_basis

integer(c_int) function c_gpr_bq_get_basis(bq, basis)
  type(c_ptr), value :: bq
  integer(c_int) :: basis

c_gpr_bq_integrate_cumulative_checked

integer(c_int) function c_gpr_bq_integrate_cumulative_checked(bq, lower, nl, upper, nu, nlim, d, mean, nm, cov, nc)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*)
  real(c_double) :: mean(*), cov(*)
  integer(c_size_t), value :: nl, nu, nm, nc
  integer(c_int), value :: nlim, d

c_gpr_bq_sample_cumulative_checked

integer(c_int) function c_gpr_bq_sample_cumulative_checked(bq, lower, nl, upper, nu, nlim, d, ndraw, seed, draws, n)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*)
  integer(c_size_t), value :: nl, nu, n
  integer(c_int), value :: nlim, d, ndraw
  integer(c_int64_t), value :: seed
  real(c_double) :: draws(*)

c_gpr_bq_candidate_variance_reduction_checked

integer(c_int) function c_gpr_bq_candidate_variance_reduction_checked(bq, lower, nl, upper, nu, X, nx, noise, nn, ncan, d, delta, nd)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*), X(*), noise(*)
  real(c_double) :: delta(*)
  integer(c_size_t), value :: nl, nu, nx, nn, nd
  integer(c_int), value :: ncan, d

c_gpr_bq_select_batch_candidates_checked

integer(c_int) function c_gpr_bq_select_batch_candidates_checked(bq, lower, nl, upper, nu, X, nx, noise, nn, ncan, d, batch, selected, ns, reduction, nr)
  type(c_ptr), value :: bq
  real(c_double), intent(in) :: lower(*), upper(*), X(*), noise(*)
  integer(c_int) :: selected(*)
  real(c_double) :: reduction(*)
  integer(c_size_t), value :: nl, nu, nx, nn, ns, nr
  integer(c_int), value :: ncan, d, batch

c_gpr_bq_calibrate_loo_checked

integer(c_int) function c_gpr_bq_calibrate_loo_checked(bq, probability, report)
  type(c_ptr), value :: bq
  real(c_double), value :: probability
  type(*) :: report

c_gpr_bq_calibrate_loo_scores_checked

integer(c_int) function c_gpr_bq_calibrate_loo_scores_checked(bq, probability, report, scores, n)
  type(c_ptr), value :: bq
  real(c_double), value :: probability
  type(*) :: report
  real(c_double) :: scores(*)
  integer(c_size_t), value :: n

c_gpr_fes_config_init

integer(c_int) function c_gpr_fes_config_init(out, out_size)
  type(FESConfig), intent(inout) :: out
  integer(c_size_t), value :: out_size

c_gpr_fes_rate_config_init

integer(c_int) function c_gpr_fes_rate_config_init(out, out_size)
  type(FESRateConfig), intent(inout) :: out
  integer(c_size_t), value :: out_size

c_gpr_fes_create

type(c_ptr) function c_gpr_fes_create(dimension, model_config, fes_config, grad_noise_var, grad_noise_var_len)
  integer(c_int), value :: dimension
  type(ModelConfig), intent(in) :: model_config
  type(FESConfig), intent(in) :: fes_config
  type(c_ptr), value :: grad_noise_var
  integer(c_size_t), value :: grad_noise_var_len

c_gpr_fes_destroy

subroutine c_gpr_fes_destroy(fes)
  type(c_ptr), value :: fes

c_gpr_fes_dimension

integer(c_int) function c_gpr_fes_dimension(fes)
  type(c_ptr), value :: fes

c_gpr_fes_n_observations

integer(c_int) function c_gpr_fes_n_observations(fes)
  type(c_ptr), value :: fes

c_gpr_fes_noise_from_weights_checked

integer(c_int) function c_gpr_fes_noise_from_weights_checked(weights, weights_len, reference_variance, min_relative_weight, noise, noise_len, n_obs)
  real(c_double), intent(in) :: weights(*)
  integer(c_size_t), value :: weights_len
  real(c_double), value :: reference_variance, min_relative_weight
  real(c_double) :: noise(*)
  integer(c_size_t), value :: noise_len
  integer(c_int), value :: n_obs

c_gpr_fes_train_checked

integer(c_int) function c_gpr_fes_train_checked(fes, s, s_len, F, F_len, F_noise, F_noise_len, grad, grad_len, grad_noise, grad_noise_len, present, present_len, n_obs, dimension)
  type(c_ptr), value :: fes
  real(c_double), intent(in) :: s(*), F(*)
  integer(c_size_t), value :: s_len, F_len
  type(c_ptr), value :: F_noise, grad, grad_noise, present
  integer(c_size_t), value :: F_noise_len, grad_len, grad_noise_len
  integer(c_size_t), value :: present_len
  integer(c_int), value :: n_obs, dimension

c_gpr_fes_predict_batch_checked

integer(c_int) function c_gpr_fes_predict_batch_checked(fes, s, s_len, F, F_len, grad, grad_len, var, var_len, n_queries, dimension)
  type(c_ptr), value :: fes
  real(c_double), intent(in) :: s(*)
  real(c_double) :: F(*)
  type(c_ptr), value :: grad, var
  integer(c_size_t), value :: s_len, F_len, grad_len, var_len
  integer(c_int), value :: n_queries, dimension

c_gpr_fes_rate_path_checked

integer(c_int) function c_gpr_fes_rate_path_checked(fes, path, path_len, n_path, dimension, reactant_index, product_index, diffusion, diffusion_len, config, report)
  type(c_ptr), value :: fes
  real(c_double), intent(in) :: path(*), diffusion(*)
  integer(c_size_t), value :: path_len, diffusion_len
  integer(c_int), value :: n_path, dimension, reactant_index, product_index
  type(FESRateConfig), intent(in) :: config
  type(FESRateReport), intent(inout) :: report

c_gpr_sgp_create

Scalar surrogate and parameter search (ABI 1.26). An argument declared type(c_ptr) is optional in C: pass c_null_ptr with a zero length, or c_loc of a target array.

type(c_ptr) function c_gpr_sgp_create(dimension, kernel)
  integer(c_int), value :: dimension, kernel

c_gpr_sgp_destroy

subroutine c_gpr_sgp_destroy(sgp)
  type(c_ptr), value :: sgp

c_gpr_sgp_n_observations

integer(c_int) function c_gpr_sgp_n_observations(sgp)
  type(c_ptr), value :: sgp

c_gpr_sgp_set_kernel

integer(c_int) function c_gpr_sgp_set_kernel(sgp, kernel)
  type(c_ptr), value :: sgp
  integer(c_int), value :: kernel

c_gpr_sgp_set_mean_basis

integer(c_int) function c_gpr_sgp_set_mean_basis(sgp, basis)
  type(c_ptr), value :: sgp
  integer(c_int), value :: basis

c_gpr_sgp_set_hyperparameters_checked

integer(c_int) function c_gpr_sgp_set_hyperparameters_checked(sgp, length_scales, length_scales_len, signal_variance, noise_variance)
  type(c_ptr), value :: sgp
  real(c_double), intent(in) :: length_scales(*)
  integer(c_size_t), value :: length_scales_len
  real(c_double), value :: signal_variance, noise_variance

c_gpr_sgp_get_hyperparameters_checked

integer(c_int) function c_gpr_sgp_get_hyperparameters_checked(sgp, length_scales, length_scales_len, signal_variance, noise_variance)
  type(c_ptr), value :: sgp
  real(c_double) :: length_scales(*)
  integer(c_size_t), value :: length_scales_len
  real(c_double) :: signal_variance, noise_variance

c_gpr_sgp_observe_checked

integer(c_int) function c_gpr_sgp_observe_checked(sgp, X, X_len, y, y_len, noise_var, noise_var_len, n_obs, n_dims)
  type(c_ptr), value :: sgp
  real(c_double), intent(in) :: X(*), y(*)
  type(c_ptr), value :: noise_var
  integer(c_size_t), value :: X_len, y_len, noise_var_len
  integer(c_int), value :: n_obs, n_dims

c_gpr_sgp_fit_checked

integer(c_int) function c_gpr_sgp_fit_checked(sgp, optimize, n_starts, log_marginal_likelihood)
  type(c_ptr), value :: sgp
  integer(c_int), value :: optimize, n_starts
  real(c_double) :: log_marginal_likelihood

c_gpr_sgp_predict_checked

integer(c_int) function c_gpr_sgp_predict_checked(sgp, X, X_len, n_queries, n_dims, query_noise_var, mean, mean_len, std, std_len)
  type(c_ptr), value :: sgp
  real(c_double), intent(in) :: X(*)
  integer(c_size_t), value :: X_len, mean_len, std_len
  integer(c_int), value :: n_queries, n_dims
  real(c_double), value :: query_noise_var
  real(c_double) :: mean(*)
  type(c_ptr), value :: std

c_gpr_psearch_create

type(c_ptr) function c_gpr_psearch_create(lower, lower_len, upper, upper_len, axis_kind, axis_kind_len, dimension, kernel, noisy)
  real(c_double), intent(in) :: lower(*), upper(*)
  type(c_ptr), value :: axis_kind
  integer(c_size_t), value :: lower_len, upper_len, axis_kind_len
  integer(c_int), value :: dimension, kernel, noisy

c_gpr_psearch_destroy

subroutine c_gpr_psearch_destroy(search)
  type(c_ptr), value :: search

c_gpr_psearch_set_allowed_values_checked

integer(c_int) function c_gpr_psearch_set_allowed_values_checked(search, axis, values, values_len, categorical)
  type(c_ptr), value :: search
  integer(c_int), value :: axis, categorical
  real(c_double), intent(in) :: values(*)
  integer(c_size_t), value :: values_len

c_gpr_psearch_observe_checked

integer(c_int) function c_gpr_psearch_observe_checked(search, X, X_len, y, y_len, noise_var, noise_var_len, constraint, constraint_len, n_obs, n_dims)
  type(c_ptr), value :: search
  real(c_double), intent(in) :: X(*), y(*)
  type(c_ptr), value :: noise_var, constraint
  integer(c_size_t), value :: X_len, y_len, noise_var_len, constraint_len
  integer(c_int), value :: n_obs, n_dims

c_gpr_psearch_propose_checked

integer(c_int) function c_gpr_psearch_propose_checked(search, q, X, X_len, n_dims, n_proposed)
  type(c_ptr), value :: search
  integer(c_int), value :: q, n_dims
  real(c_double) :: X(*)
  integer(c_size_t), value :: X_len
  integer(c_int) :: n_proposed

c_gpr_psearch_best_checked

integer(c_int) function c_gpr_psearch_best_checked(search, x, x_len, loss)
  type(c_ptr), value :: search
  real(c_double) :: x(*)
  integer(c_size_t), value :: x_len
  real(c_double) :: loss

gpr_lj_energy

Lennard-Jones energy and gradient

subroutine gpr_lj_energy(x, n_atoms, epsilon, sigma, energy, gradient, ierr)
  real(c_double), intent(in), contiguous :: x(:)
  integer, intent(in) :: n_atoms
  real(c_double), intent(in) :: epsilon, sigma
  real(c_double), intent(out) :: energy
  real(c_double), intent(out), contiguous :: gradient(:)
  integer, intent(out), optional :: ierr

gpr_muller_brown_energy

Muller-Brown 2D potential

subroutine gpr_muller_brown_energy(xy, energy, gradient, ierr)
  real(c_double), intent(in) :: xy(2)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(2)
  integer, intent(out), optional :: ierr

gpr_leps_energy

LEPS collinear potential

subroutine gpr_leps_energy(r, energy, gradient, ierr)
  real(c_double), intent(in) :: r(2)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(2)
  integer, intent(out), optional :: ierr

gpr_oracle_lj

Oracle adapter for Lennard-Jones (user_data points to LJParams).

subroutine gpr_oracle_lj(n_coords, positions, energy, gradient, user_data)
  integer, intent(in) :: n_coords
  real(c_double), intent(in) :: positions(:)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(:)
  type(c_ptr), intent(in) :: user_data

gpr_oracle_muller_brown

Oracle adapter for Muller-Brown.

subroutine gpr_oracle_muller_brown(n_coords, positions, energy, gradient, user_data)
  integer, intent(in) :: n_coords
  real(c_double), intent(in) :: positions(:)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(:)
  type(c_ptr), intent(in), optional :: user_data

gpr_oracle_leps

Oracle adapter for LEPS.

subroutine gpr_oracle_leps(n_coords, positions, energy, gradient, user_data)
  integer, intent(in) :: n_coords
  real(c_double), intent(in) :: positions(:)
  real(c_double), intent(out) :: energy
  real(c_double), intent(out) :: gradient(:)
  type(c_ptr), intent(in), optional :: user_data

gpr_version_string

Library version string, “major.minor.patch”.

function gpr_version_string() result(version)
  character(len=:), allocatable :: version

gpr_error_message

Message of the last failing call on this thread.

function gpr_error_message() result(message)
  character(len=:), allocatable :: message

gpr_last_error_message

Same string as gpr_error_message. This is the C name.

function gpr_last_error_message() result(message)
  character(len=:), allocatable :: message

gpr_last_error

Alias of gpr_last_error_message matching gpr_last_error in gpridge_c.h.

function gpr_last_error() result(message)
  character(len=:), allocatable :: message

gpr_check_abi

Check that the loaded library implements the ABI this module binds.

subroutine gpr_check_abi(stat, errmsg)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_version_components

Version components of the loaded library.

subroutine gpr_version_components(major, minor, patch)
  integer, intent(out) :: major, minor, patch

gpr_abi_version

ABI version of the loaded library (GPR_C_ABI_MAJOR/MINOR give this module’s).

subroutine gpr_abi_version(major, minor)
  integer, intent(out) :: major, minor

gpr_status_name

Name of a status code, e.g. “GPR_ERR_ORACLE”.

function gpr_status_name(status) result(name)
  integer, intent(in) :: status
  character(len=:), allocatable :: name

gpr_last_status

Status of the last failing call on this thread; GPR_SUCCESS after a call that succeeded.

function gpr_last_status() result(status)
  integer :: status

gpr_backend_name

“slate”, “scalapack”, “kokkos”, “cusolver”, “cholmod”, “stdpar” or “eigen”.

function gpr_backend_name() result(name)
  character(len=:), allocatable :: name

gpr_backend_requires_mpi

True when the linear-algebra backend needs MPI initialized first.

function gpr_backend_requires_mpi() result(requires)
  logical :: requires

gpr_mpi_initialized

function gpr_mpi_initialized() result(initialized)
  logical :: initialized

gpr_mpi_world_rank

Rank in MPI_COMM_WORLD, 0 without MPI.

function gpr_mpi_world_rank() result(rank)
  integer :: rank

gpr_mpi_world_size

Size of MPI_COMM_WORLD, 1 without MPI.

function gpr_mpi_world_size() result(size_)
  integer :: size_

gpr_omp_max_threads

OpenMP thread budget, 1 without OpenMP.

function gpr_omp_max_threads() result(threads)
  integer :: threads

gpr_set_linalg_mode

“reproducible” (the default) or “library”; see gpr_set_linalg_mode in gpridge_c.h.

subroutine gpr_set_linalg_mode(mode, stat, errmsg)
  character(len=*), intent(in) :: mode
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_linalg_mode

function gpr_linalg_mode() result(mode)
  character(len=:), allocatable :: mode

gpr_set_linalg_threads

subroutine gpr_set_linalg_threads(threads, stat, errmsg)
  integer, intent(in) :: threads
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_set_library_serial

Select Eigen’s serial factor/solve (true) or OpenMP panel kernels (false).

subroutine gpr_set_library_serial(enabled, stat, errmsg)
  logical, intent(in) :: enabled
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_set_training_product

“” for the native product, “scheme2:fp64[…]” / “scheme2:int8[…]” for a Scheme II engine, or the path of a product library.

subroutine gpr_set_training_product(spec, stat, errmsg)
  character(len=*), intent(in) :: spec
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_training_product_configured

function gpr_training_product_configured() result(configured)
  logical :: configured

gpr_check_model_package

Check that an AOTInductor model package runs on this CPU.

subroutine gpr_check_model_package(path, stat, errmsg)
  character(len=*), intent(in) :: path
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_train_phase_reset

Zero the train-phase wall-time accumulators.

subroutine gpr_train_phase_reset()

gpr_train_phase_read

Read the five train-phase wall-time accumulators.

subroutine gpr_train_phase_read(factor_s, solve_s, eigen_s, kernel_s, hessian_s)
  real(c_double), intent(out), optional, target :: factor_s, solve_s, eigen_s, kernel_s, hessian_s

gpr_train_phase_read_leaves

Read the train-phase leaf accumulators (setup, conditioning, etc.).

subroutine gpr_train_phase_read_leaves(setup_s, descriptor_s, posterior_s, subset_s, objective_s, condition_s, cache_s, curvature_s, energy_s, schedule_s)
  real(c_double), intent(out), optional, target :: setup_s, descriptor_s, posterior_s, subset_s, objective_s, condition_s, cache_s, curvature_s, energy_s, schedule_s

gpr_potential_from_force

function gpr_potential_from_force(fn, user_data, stat, errmsg) result(self)
  procedure(gpr_force_interface) :: fn
  type(c_ptr), intent(in), optional :: user_data
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(PotentialHandle) :: self

gpr_potential_from_force_with_uncertainty

function gpr_potential_from_force_with_uncertainty(fn, user_data, stat, errmsg) result(self)
  procedure(gpr_force_with_uncertainty_interface) :: fn
  type(c_ptr), intent(in), optional :: user_data
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(PotentialHandle) :: self

gpr_minimize

GP-accelerated minimization from R_init. R_final, E_final and G_final are always an exact oracle evaluation at R_final (never a surrogate prediction or an averaged near-coincident row); converged is true when its gradient norm is below conv_tol. config%max_iter bounds outer surrogate-relaxation cycles (up to 200 inner steps each by default, or the cap set by gpr_minimize_request_max_inner_steps). The first failed oracle evaluation ends the run with GPR_ERR_ORACLE.

subroutine gpr_minimize(oracle, R_init, atoms, config, R_final, E_final, converged, n_oracle_calls, stat, errmsg, G_final, user_data)
  procedure(gpr_oracle_interface) :: oracle
  real(c_double), intent(in) :: R_init(:)
  type(AtomsConfig), intent(in) :: atoms
  type(MinimizeConfig), intent(in) :: config
  real(c_double), intent(inout) :: R_final(:)
  real(c_double), intent(inout) :: E_final
  logical, intent(out) :: converged
  integer, intent(out) :: n_oracle_calls
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  real(c_double), intent(inout), optional :: G_final(:)
  type(c_ptr), intent(in), optional :: user_data

gpr_minimize_request_max_inner_steps

Set the inner surrogate L-BFGS step cap (default 200, must be >= 1) for the next gpr_minimize call on this thread. The request is consumed by that call, including when validation rejects it.

subroutine gpr_minimize_request_max_inner_steps(max_inner_steps, stat, errmsg)
  integer, intent(in) :: max_inner_steps
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_dimer_search_potential

GP-accelerated dimer search over a PotentialHandle.

subroutine gpr_dimer_search_potential(pot, atoms, R_init, orient_init, config, R_saddle, E_saddle, report, stat, errmsg, orient_out)
  type(PotentialHandle), intent(in) :: pot
  type(AtomsConfig), intent(in) :: atoms
  real(c_double), intent(in) :: R_init(:), orient_init(:)
  type(DimerConfig), intent(in) :: config
  real(c_double), intent(inout) :: R_saddle(:)
  real(c_double), intent(inout) :: E_saddle
  type(DimerReport), intent(inout), optional :: report
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  real(c_double), intent(inout), optional, target, contiguous :: orient_out(:)

gpr_dimer_search_raw

GP-accelerated dimer search via gpr_dimer_search (without DimerReport).

subroutine gpr_dimer_search_raw(force, atoms, R_init, orient_init, config, R_saddle, E_saddle, stat, errmsg, orient_out, curvature, n_force_calls, n_gp_calls, user_data)
  procedure(gpr_force_interface) :: force
  type(AtomsConfig), intent(in) :: atoms
  real(c_double), intent(in) :: R_init(:), orient_init(:)
  type(DimerConfig), intent(in) :: config
  real(c_double), intent(inout) :: R_saddle(:)
  real(c_double), intent(inout) :: E_saddle
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  real(c_double), intent(inout), optional, target, contiguous :: orient_out(:)
  real(c_double), intent(out), optional, target :: curvature
  integer, intent(out), optional :: n_force_calls, n_gp_calls
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_potential

NEB without a GP over a force callback of n_atoms = size(atomic_nrs) atoms (R_initial and R_final have 3*n_atoms values). box (3x3, row-major) defaults to zeros, an isolated system.

subroutine gpr_neb_search_potential(force, atomic_nrs, R_initial, R_final, n_images, config, result, stat, errmsg, box, user_data)
  procedure(gpr_force_interface) :: force
  integer, intent(in) :: atomic_nrs(:)
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBConfig), intent(in) :: config
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  real(c_double), intent(in), optional :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_local

Local band (gpr_neb_search_local). config and local default to the library defaults. atoms, when present, is the full system and frozen atoms stay at R_initial; without it every coordinate moves. box is absent for an isolated system. A failure leaves the reason in gpr_last_error_message().

subroutine gpr_neb_search_local(oracle, R_initial, R_final, n_images, result, stat, errmsg, config, local, atoms, box, user_data)
  procedure(gpr_oracle_interface) :: oracle
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(NEBConfig), intent(in), optional, target :: config
  type(LocalBandConfig), intent(in), optional, target :: local
  type(AtomsConfig), intent(in), optional :: atoms
  real(c_double), intent(in), optional, target :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_local_potential

gpr_neb_search_local over a force callback. atomic_nrs names the atoms when atoms is absent.

subroutine gpr_neb_search_local_potential(force, atomic_nrs, R_initial, R_final, n_images, result, stat, errmsg, config, local, atoms, box, user_data)
  procedure(gpr_force_interface) :: force
  integer, intent(in) :: atomic_nrs(:)
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(NEBConfig), intent(in), optional, target :: config
  type(LocalBandConfig), intent(in), optional, target :: local
  type(AtomsConfig), intent(in), optional :: atoms
  real(c_double), intent(in), optional, target :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_periodic

Periodic local band (gpr_neb_search_periodic), the binding of GPLocalBand. periodic and local default to the library defaults. atoms and box are as for gpr_neb_search_local. The search does not certify; gpr_neb_request_index_certificate, called first, does.

subroutine gpr_neb_search_periodic(oracle, R_initial, R_final, n_images, result, stat, errmsg, periodic, local, atoms, box, user_data)
  procedure(gpr_oracle_interface) :: oracle
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(PeriodicBandConfig), intent(in), optional, target :: periodic
  type(LocalBandConfig), intent(in), optional, target :: local
  type(AtomsConfig), intent(in), optional :: atoms
  real(c_double), intent(in), optional, target :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_periodic_potential

gpr_neb_search_periodic over a force callback.

subroutine gpr_neb_search_periodic_potential(force, atomic_nrs, R_initial, R_final, n_images, result, stat, errmsg, periodic, local, atoms, box, user_data)
  procedure(gpr_force_interface) :: force
  integer, intent(in) :: atomic_nrs(:)
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(PeriodicBandConfig), intent(in), optional, target :: periodic
  type(LocalBandConfig), intent(in), optional, target :: local
  type(AtomsConfig), intent(in), optional :: atoms
  real(c_double), intent(in), optional, target :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_request_index_certificate

Ask the next band search on this thread for the index certificate. step 0 keeps the library stencil step. On the periodic band searches a nonzero step takes precedence over LocalBandConfig%certificate_step.

subroutine gpr_neb_request_index_certificate(enable, step, stat, errmsg)
  logical, intent(in) :: enable
  real(c_double), intent(in) :: step
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_neb_request_sidpp

Select SIDPP (true) or classic IDPP (false) for the next NEB search on this thread. SIDPP is the library default. The periodic band searches take PeriodicBandConfig%initial alone, so the request has no effect on them; they still consume it.

subroutine gpr_neb_request_sidpp(enable, stat, errmsg)
  logical, intent(in) :: enable
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_neb_request_vibrational_stencil

Stencil of the next non-local NEB search on this thread. mode 0 measures every coordinate; mode 1 measures the vibrational directions. A local or periodic band takes LocalBandConfig instead.

subroutine gpr_neb_request_vibrational_stencil(mode, stat, errmsg)
  integer, intent(in) :: mode
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_neb_search_gp

GP-accelerated NEB (gpr_neb_search_gp): R_initial and R_final hold every atom of atoms (3*n_atoms values); frozen atoms stay put and the oracle sees full-length arrays. config%mode must be GPR_NEB_GP_OIE or GPR_NEB_GP_AIE. model defaults to the gprn NEB GP settings.

subroutine gpr_neb_search_gp(oracle, atoms, R_initial, R_final, n_images, config, result, stat, errmsg, model, user_data)
  procedure(gpr_oracle_interface) :: oracle
  type(AtomsConfig), intent(in) :: atoms
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBConfig), intent(in) :: config
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(ModelConfig), intent(in), optional, target :: model
  type(c_ptr), intent(in), optional :: user_data

gpr_neb_search_gp_potential

gpr_neb_search_gp over a force callback. The callback receives the atomic numbers of atoms; box (3x3, row-major) is absent for an isolated system.

subroutine gpr_neb_search_gp_potential(force, atoms, R_initial, R_final, n_images, config, result, stat, errmsg, model, box, user_data)
  procedure(gpr_force_interface) :: force
  type(AtomsConfig), intent(in) :: atoms
  real(c_double), intent(in) :: R_initial(:), R_final(:)
  integer, intent(in) :: n_images
  type(NEBConfig), intent(in) :: config
  type(NEBResult), intent(inout) :: result
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(ModelConfig), intent(in), optional, target :: model
  real(c_double), intent(in), optional, target :: box(9)
  type(c_ptr), intent(in), optional :: user_data

gpr_atoms_config_defaults

gpr_atoms_config_defaults() of the loaded library.

function gpr_atoms_config_defaults() result(config)
  type(AtomsDescriptor) :: config

gpr_atoms_simple

gpr_atoms_simple() of the loaded library.

function gpr_atoms_simple(n_atoms) result(config)
  integer, intent(in) :: n_atoms
  type(AtomsDescriptor) :: config

gpr_dimer_config_defaults

gpr_dimer_config_defaults() of the loaded library; equal to a default-initialized DimerConfig.

function gpr_dimer_config_defaults() result(config)
  type(DimerConfig) :: config

gpr_model_config_defaults

gpr_model_config_defaults() of the loaded library.

function gpr_model_config_defaults() result(config)
  type(ModelConfig) :: config

gpr_neb_config_defaults

gpr_neb_config_defaults() of the loaded library.

function gpr_neb_config_defaults() result(config)
  type(NEBConfig) :: config

gpr_minimize_config_defaults

gpr_minimize_config_defaults() of the loaded library.

function gpr_minimize_config_defaults() result(config)
  type(MinimizeConfig) :: config

gpr_ocineb_config_defaults

gpr_ocineb_config_defaults() of the loaded library.

function gpr_ocineb_config_defaults() result(config)
  type(OCINEBConfig) :: config

gpr_local_band_config_defaults

function gpr_local_band_config_defaults() result(config)
  type(LocalBandConfig) :: config

gpr_periodic_band_config_defaults

function gpr_periodic_band_config_defaults() result(config)
  type(PeriodicBandConfig) :: config

fes_config_defaults

gpr_fes_config_init() of the loaded library.

function fes_config_defaults() result(config)
  type(FESConfig) :: config

fes_rate_config_defaults

gpr_fes_rate_config_init() of the loaded library.

function fes_rate_config_defaults() result(config)
  type(FESRateConfig) :: config

fes_noise_from_weights

Noise variances from relative sample weights; an approximation that ignores correlation between samples (see the C reference). noise_var has one entry per weight.

subroutine fes_noise_from_weights(weights, reference_variance, min_relative_weight, noise_var, stat, errmsg)
  real(c_double), intent(in), contiguous :: weights(:)
  real(c_double), intent(in) :: reference_variance, min_relative_weight
  real(c_double), intent(inout) :: noise_var(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_derivative_options_defaults

gpr_derivative_options_defaults() with struct_size set.

function gpr_derivative_options_defaults() result(options)
  type(DerivativeOptions) :: options

gpr_htst_options_defaults

gpr_htst_options_defaults() with struct_size set.

function gpr_htst_options_defaults() result(options)
  type(HTSTOptions) :: options

gpr_htst_half_from_hessian

The half of a caller’s row-major Hessian H at x. masses holds one value per moving atom; absent means unit masses.

subroutine gpr_htst_half_from_hessian(H, x, kind, half, options, masses, frequencies, stat, errmsg)
  real(c_double), intent(in), contiguous :: H(:), x(:)
  integer, intent(in) :: kind
  type(HTSTHalf), intent(inout) :: half
  type(HTSTOptions), intent(in), optional :: options
  real(c_double), intent(in), contiguous, optional, target :: masses(:)
  real(c_double), intent(inout), contiguous, optional, target :: frequencies(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_htst_half

The half at x from a trained model and an oracle; the options’ mode says which of the two it needs. measured receives one flag per frequency: 1 for an oracle-measured mode.

subroutine gpr_htst_half(x, kind, half, model, oracle, options, masses, frequencies, measured, stat, errmsg, user_data)
  real(c_double), intent(in), contiguous :: x(:)
  integer, intent(in) :: kind
  type(HTSTHalf), intent(inout) :: half
  class(GPModel), intent(in), optional :: model
  procedure(gpr_oracle_interface), optional :: oracle
  type(HTSTOptions), intent(in), optional :: options
  real(c_double), intent(in), contiguous, optional, target :: masses(:)
  real(c_double), intent(inout), contiguous, optional, target :: frequencies(:)
  integer(c_int), intent(inout), contiguous, optional, target :: measured(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg
  type(c_ptr), intent(in), optional :: user_data

gpr_htst_ln_prefactor

ln nu = minimum%ln_sum - saddle%ln_sum and its GP-variance spread.

subroutine gpr_htst_ln_prefactor(minimum, saddle, ln_nu, ln_nu_std, stat, errmsg)
  type(HTSTHalf), intent(in) :: minimum, saddle
  real(c_double), intent(out) :: ln_nu
  real(c_double), intent(out), optional :: ln_nu_std
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_request_prefactor

Opt this thread’s later searches into prefactor halves. Absent options set enabled and the surrogate. Searches stay off until this call.

subroutine gpr_request_prefactor(options, masses, stat, errmsg)
  type(HTSTOptions), intent(in), optional, target :: options
  real(c_double), intent(in), contiguous, optional, target :: masses(:)
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

gpr_search_prefactor

A half (GPR_HTST_REACTANT, TRANSITION or PRODUCT) of the last search on this thread. n_coords is required with frequencies or measured.

subroutine gpr_search_prefactor(point, half, frequencies, measured, n_coords, stat, errmsg)
  integer, intent(in) :: point
  type(HTSTHalf), intent(inout) :: half
  real(c_double), intent(inout), contiguous, optional, target :: frequencies(:)
  integer(c_int), intent(inout), contiguous, optional, target :: measured(:)
  integer, intent(in), optional :: n_coords
  integer, intent(out), optional :: stat
  character(len=*), intent(inout), optional :: errmsg

Named constants

Error codes

Name

Value

GPR_SUCCESS

0

GPR_ERR_NULL_HANDLE

-1

GPR_ERR_INVALID_ARG

-2

GPR_ERR_NOT_TRAINED

-3

GPR_ERR_ALLOC

-4

GPR_ERR_CHOLESKY

-5

GPR_ERR_OPTIMIZER

-6

GPR_ERR_NOT_CONVERGED

-7

GPR_ERR_SIZE_LIMIT

-8

GPR_ERR_ORACLE

-9

GPR_ERR_UNSUPPORTED

-10

GPR_ERR_ABI

-11

GPR_ERR_OUT_OF_SUPPORT

-12

GPR_ERR_UNIT_MISMATCH

-13

GPR_ERR_INTERNAL

-99

C ABI version this module was written against (gpridge_c.h)

Name

Value

GPR_C_ABI_MAJOR

1

GPR_C_ABI_MINOR

26

Why a dimer search stopped (gpr_dimer_stop_t)

Name

Value

GPR_DIMER_STOP_UNSPECIFIED

0

GPR_DIMER_STOP_FORCE_CONVERGED

1

GPR_DIMER_STOP_MEASURED_NON_DESCENT

2

GPR_DIMER_STOP_DEGENERATE_PROBE

3

GPR_DIMER_STOP_UNINFORMATIVE_ROTATION

4

GPR_DIMER_STOP_ALIGNMENT_LOSS

5

GPR_DIMER_STOP_ITERATION_BUDGET

6

GPR_DIMER_STOP_INTERATOMIC_COLLAPSE

7

GPR_DIMER_STOP_INVALID_ATOMS

8

GPR_DIMER_STOP_ORACLE_BUDGET

9

GPR_DIMER_STOP_INVALID_PARAMETERS

10

GPR_DIMER_STOP_MEASURED_INDEX_ZERO

11

GPR_DIMER_STOP_UNCERTIFIED_FORCE_STOP

12

How a NEB converged (gpr_neb_status_t)

Name

Value

GPR_NEB_NOT_CONVERGED

0

GPR_NEB_FORCE_TOLERANCE

1

GPR_NEB_MODEL_NOISE_FLOOR

2

Unit tags of the derivative primitives (gpr_energy_unit_t, gpr_length_unit_t, ABI 1.20). Labels only; nothing is converted

Name

Value

GPR_ENERGY_UNIT_NATIVE

0

GPR_ENERGY_UNIT_EV

1

GPR_ENERGY_UNIT_HARTREE

2

GPR_ENERGY_UNIT_KCAL_PER_MOL

3

GPR_ENERGY_UNIT_KJ_PER_MOL

4

GPR_LENGTH_UNIT_NATIVE

0

GPR_LENGTH_UNIT_ANGSTROM

1

GPR_LENGTH_UNIT_BOHR

2

GPR_LENGTH_UNIT_NANOMETER

3

Harmonic prefactors (gpr_htst_*_t, ABI 1.20)

Name

Value

GPR_HTST_REFINED

0

GPR_HTST_MEASURED

1

GPR_HTST_SURROGATE

2

GPR_HTST_MINIMUM

0

GPR_HTST_SADDLE

1

GPR_HTST_OK

0

GPR_HTST_NOT_CONVERGED

1

GPR_HTST_WRONG_INDEX

2

GPR_HTST_UNAVAILABLE

3

GPR_HTST_SOURCE_REFINED

0

GPR_HTST_SOURCE_MEASURED

1

GPR_HTST_SOURCE_STENCIL

2

GPR_HTST_SOURCE_SURROGATE

3

GPR_HTST_SOURCE_CONDITIONED

4

GPR_HTST_REACTANT

0

GPR_HTST_TRANSITION

1

GPR_HTST_PRODUCT

2

Model type enumerators

Name

Value

GPR_MODEL_GP

0

GPR_MODEL_TP

1

Optimization algorithms

Name

Value

GPR_OPT_SCG

0

GPR_OPT_FACTORIZED

2

Posterior solver on ModelConfig%use_hssvd_backend. Zero keeps HS-SVD

Name

Value

GPR_HSSVD_BACKEND_DEFAULT

0

GPR_HSSVD_BACKEND_HSSVD

1

GPR_HSSVD_BACKEND_CHOLESKY

2

NEB modes (gpr_neb_mode_t)

Name

Value

GPR_NEB_STANDARD

0

GPR_NEB_AIE

1

GPR_NEB_OIE

2

GPR_NEB_GP_AIE

3

GPR_NEB_GP_OIE

4

GPR_NEB_GP_LOCAL

5

Acquisition strategies (gpr_acquisition_t)

Name

Value

GPR_ACQ_MAX_VARIANCE

0

GPR_ACQ_MAX_FORCE

1

GPR_ACQ_UCB

2

GPR_ACQ_THOMPSON

3

GPR_ACQ_IMSPE

4

GPR_ACQ_EI

5

GPR_ACQ_PRIORITY_CASCADE

6

GPR_ACQ_TPE

7

GPR_ACQ_PSBAX

8

Convergence norms

Name

Value

GPR_NORM_L2

0

GPR_NORM_LINF

1

GPR_NORM_MAX_ATOM

2

Uncertainty modes (gpr_uncertainty_mode_t)

Name

Value

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

Hyperparameter optimiser / objective

Name

Value

GPR_HOPT_SCG

0

GPR_HOPT_INLA

1

GPR_HOBJ_NLML

0

GPR_HOBJ_LOO

1

Trust distance metric (gpr_distance_metric_t)

Name

Value

GPR_DIST_MAX_1D_LOG

0

GPR_DIST_RMSD

1

GPR_DIST_EMD

2

Scalar GP / Bayesian quadrature (ABI 1.17)

Name

Value

GPR_BQ_KERNEL_SE

0

GPR_BQ_KERNEL_MATERN32_PRODUCT

1

GPR_BQ_KERNEL_MATERN52_PRODUCT

2

GPR_BQ_KERNEL_MATERN32_ISOTROPIC

3

GPR_BQ_KERNEL_MATERN52_ISOTROPIC

4

GPR_BQ_HYPER_FIXED

0

GPR_BQ_HYPER_ML

1

GPR_BQ_HYPER_MAP

2

GPR_BQ_HYPER_TP_MARGINAL

3

GPR_BQ_HYPER_MARGINALIZED

4

GPR_BQ_MEASURE_LEBESGUE_BOX

0

GPR_BQ_MEASURE_UNIFORM_BOX

1

GPR_BQ_MEASURE_GAUSSIAN

2

GPR_BQ_BASIS_FOLLOW_CONFIG

-1

GPR_BQ_BASIS_NONE

0

GPR_BQ_BASIS_CONSTANT

1

GPR_BQ_BASIS_AFFINE

2

GPR_PSEARCH_AXIS_LINEAR

0

GPR_PSEARCH_AXIS_LOG

1

GPR_PSEARCH_AXIS_INTEGER

2

Initial path of a periodic band (gpr_periodic_band_initial_t)

Name

Value

GPR_PERIODIC_BAND_LINEAR

0

GPR_PERIODIC_BAND_IDPP

1

GPR_PERIODIC_BAND_SIDPP

2

convergence_norm value that keeps the mode’s own norm

Name

Value

GPR_PERIODIC_NORM_UNSET

-1