Loading...
Searching...
No Matches
Callback types

Typedefs

typedef void(* gpr_force_fn) (long n_atoms, const double *R, const int *atomic_nrs, double *F, double *energy, double *energy_noise_rms, const double *box, void *user_data)
 Full atomistic force callback (used by dimer search).
typedef void(* gpr_force_with_uncertainty_fn) (long n_atoms, const double *R, const int *atomic_nrs, double *F, double *energy, double *energy_noise_rms, double *force_noise_rms, const double *box, void *user_data)
 Force callback with separate energy and force uncertainty channels.
typedef void(* gpr_oracle_fn) (int n_coords, const double *positions, double *energy, double *gradient, void *user_data)
 Simple oracle callback (used by NEB and minimizer).

Detailed Description

Typedef Documentation

◆ gpr_force_fn

typedef void(* gpr_force_fn) (long n_atoms, const double *R, const int *atomic_nrs, double *F, double *energy, double *energy_noise_rms, const double *box, void *user_data)

Full atomistic force callback (used by dimer search).

Parameters
n_atomsNumber of atoms
RPositions, flat [x1,y1,z1,x2,...], length 3*n_atoms
atomic_nrsAtomic numbers, length n_atoms
FOutput forces, length 3*n_atoms (caller-allocated)
energyOutput energy scalar (caller-allocated)
energy_noise_rmsOutput energy-noise RMS, a standard deviation in eV and not a variance (caller-allocated, may be NULL). The same channel as the energy_noise_rms slot of gpr_force_with_uncertainty_fn; there is no force-noise slot in this signature.
boxCell vectors, 3x3 row-major (9 doubles, may be NULL)
user_dataOpaque pointer passed through from caller

Definition at line 421 of file gpridge_c.h.

◆ gpr_force_with_uncertainty_fn

typedef void(* gpr_force_with_uncertainty_fn) (long n_atoms, const double *R, const int *atomic_nrs, double *F, double *energy, double *energy_noise_rms, double *force_noise_rms, const double *box, void *user_data)

Force callback with separate energy and force uncertainty channels.

This is the C ABI for pot::PotentialWrapper::from_force_with_uncertainty. rgpot C++ types cannot be named from C; a caller that already has an rgpot object in C++ should wrap it with PotentialWrapper::from_rgpot and then expose this callback (or use the C++ API directly). A C caller implements the same contract rgpot uses after layout conversion: energy, forces, energy-noise RMS, and force-noise RMS.

Parameters
n_atomsNumber of atoms
RPositions, flat [x1,y1,z1,x2,...], length 3*n_atoms
atomic_nrsAtomic numbers, length n_atoms
FOutput forces, length 3*n_atoms (caller-allocated)
energyOutput energy scalar (caller-allocated)
energy_noise_rmsOutput energy-noise RMS (may be NULL)
force_noise_rmsOutput force-noise RMS (may be NULL)
boxCell vectors, 3x3 row-major (9 doubles, may be NULL)
user_dataOpaque pointer passed through from caller

Definition at line 446 of file gpridge_c.h.

◆ gpr_oracle_fn

typedef void(* gpr_oracle_fn) (int n_coords, const double *positions, double *energy, double *gradient, void *user_data)

Simple oracle callback (used by NEB and minimizer).

Parameters
n_coordsTotal coordinate dimension (e.g. 3*n_atoms)
positionsInput positions, length n_coords
energyOutput energy scalar (caller-allocated)
gradientOutput gradient, length n_coords (caller-allocated)
user_dataOpaque pointer passed through from caller

Definition at line 460 of file gpridge_c.h.