Classes | |
| struct | gpr_htst_options |
| Prefactor options (ABI 1.20). More... | |
| struct | gpr_htst_half |
| One half of the prefactor (ABI 1.20). More... | |
Macros | |
| #define | GPR_HTST_OMEGA_EV_ANGSTROM_AMU 9.82269385e13 |
| sqrt(eV / (Angstrom^2 amu)) in rad/s. | |
Typedefs | |
| typedef struct gpr_htst_options | gpr_htst_options_t |
| Prefactor options (ABI 1.20). | |
| typedef struct gpr_htst_half | gpr_htst_half_t |
| One half of the prefactor (ABI 1.20). | |
Enumerations | |
| enum | gpr_htst_mode_t { GPR_HTST_REFINED = 0 , GPR_HTST_MEASURED = 1 , GPR_HTST_SURROGATE = 2 } |
| Hessian a half is built from (ABI 1.20). More... | |
| enum | gpr_htst_kind_t { GPR_HTST_MINIMUM = 0 , GPR_HTST_SADDLE = 1 } |
| Stationary point of a half (ABI 1.20). More... | |
| enum | gpr_htst_status_t { GPR_HTST_OK = 0 , GPR_HTST_NOT_CONVERGED = 1 , GPR_HTST_WRONG_INDEX , GPR_HTST_UNAVAILABLE = 3 } |
| Outcome of a half (ABI 1.20). More... | |
| enum | gpr_htst_source_t { GPR_HTST_SOURCE_REFINED = 0 , GPR_HTST_SOURCE_MEASURED = 1 , GPR_HTST_SOURCE_STENCIL = 2 , GPR_HTST_SOURCE_SURROGATE = 3 , GPR_HTST_SOURCE_CONDITIONED } |
| Where a half's Hessian came from (ABI 1.20). More... | |
| enum | gpr_htst_point_t { GPR_HTST_REACTANT = 0 , GPR_HTST_TRANSITION = 1 , GPR_HTST_PRODUCT = 2 } |
| Which stationary point of a search (ABI 1.20). More... | |
Functions | |
| gpr_htst_options_t | gpr_htst_options_defaults (void) |
| Defaults of gpr_htst_options_t with struct_size set. | |
| int | gpr_htst_half_from_hessian (const gpr_htst_options_t *options, const double *masses, int n_masses, const double *H, const double *x, int n_coords, int kind, double *frequencies_out, gpr_htst_half_t *half) |
| The half of a caller's Hessian (no oracle, no model). | |
| int | gpr_htst_half_from_hessian_checked (const gpr_htst_options_t *options, const double *masses, size_t masses_len, int n_masses, const double *H, size_t H_len, const double *x, size_t x_len, int n_coords, int kind, double *frequencies_out, size_t frequencies_len, gpr_htst_half_t *half) |
| Extent-checked gpr_htst_half_from_hessian. | |
| int | gpr_htst_half (gpr_model_t model, gpr_oracle_fn oracle, void *user_data, const gpr_htst_options_t *options, const double *masses, int n_masses, const double *x, int n_coords, int kind, double *frequencies_out, int *measured_out, gpr_htst_half_t *half) |
| The half at x from a trained model and an oracle. | |
| int | gpr_htst_half_checked (gpr_model_t model, gpr_oracle_fn oracle, void *user_data, const gpr_htst_options_t *options, const double *masses, size_t masses_len, int n_masses, const double *x, size_t x_len, int n_coords, int kind, double *frequencies_out, size_t frequencies_len, int *measured_out, size_t measured_len, gpr_htst_half_t *half) |
| Extent-checked gpr_htst_half. | |
| int | gpr_htst_ln_prefactor (const gpr_htst_half_t *minimum, const gpr_htst_half_t *saddle, double *ln_nu, double *ln_nu_std) |
| ln nu = minimum->ln_sum - saddle->ln_sum and its spread sqrt(std_min^2 + std_saddle^2). GPR_ERR_INVALID_ARG unless the halves are a GPR_HTST_MINIMUM and a GPR_HTST_SADDLE with status OK or NOT_CONVERGED, struct_size covers omega_scale, both have the same n_coords, finite ln_sum and finite non-negative ln_sum_std, the minimum has exactly one more real (positive) mode than the saddle (n_modes), and ln nu and its spread are finite. Outputs are untouched on failure. GPR_ERR_UNIT_MISMATCH when the halves were computed with different omega_scale values: their ln_sum are in different frequency units. | |
| int | gpr_request_prefactor (const gpr_htst_options_t *options, const double *masses, int n_masses) |
| Opt this thread's later searches into prefactor halves. | |
| int | gpr_search_prefactor (int point, gpr_htst_half_t *half, double *frequencies_out, int *measured_out, int n_coords) |
| A half of the last search on this thread. | |
| int | gpr_search_prefactor_checked (int point, gpr_htst_half_t *half, double *frequencies_out, size_t frequencies_len, int *measured_out, size_t measured_len, int n_coords) |
| Extent-checked gpr_search_prefactor. | |
| int | gpr_neb_result_prefactor (gpr_neb_t result, int point, gpr_htst_half_t *half, double *frequencies_out, int *measured_out, int n_coords) |
| A half of a GP NEB result, as gpr_search_prefactor. | |
| int | gpr_neb_result_prefactor_checked (gpr_neb_t result, int point, gpr_htst_half_t *half, double *frequencies_out, size_t frequencies_len, int *measured_out, size_t measured_len, int n_coords) |
| Extent-checked gpr_neb_result_prefactor. | |
Harmonic transition-state theory in the Vineyard form nu = prod_i nu_i(minimum) / prod'_i nu_i(saddle), nu_i = omega_i / (2 pi), omega_i^2 the eigenvalues of the mass-weighted Hessian on the complement of the projected rigid translations and rotations, the primed product over the real saddle modes. Each stationary point gives one half, ln_sum = sum_i ln nu_i over its real modes, and ln nu = ln_sum(minimum) - ln_sum(saddle) (gpr_htst_ln_prefactor).
Units: the Hessian is in the energy and length units of the oracle or the model, masses in the caller's unit (one per moving atom; NULL means unit masses), and omega_scale converts sqrt(energy / (length^2 mass)) to the caller's angular-frequency unit: 1 keeps native units, GPR_HTST_OMEGA_EV_ANGSTROM_AMU gives rad/s for eV, Angstrom and amu. omega_scale and the masses must be positive normal doubles. ln nu_i is formed in log space; a half whose eigenvalues, frequencies, ln_sum or ln_sum_std leave the normal double range has status GPR_HTST_UNAVAILABLE and a message, never an infinite or flushed value. Every call that writes an unavailable half returns GPR_SUCCESS and leaves its message in gpr_last_error().
Modes (gpr_htst_mode_t):
Nothing falls back silently: gpr_htst_half_t::status says whether the half converged and has the kind's index, and source says which Hessian it used.
| #define GPR_HTST_OMEGA_EV_ANGSTROM_AMU 9.82269385e13 |
sqrt(eV / (Angstrom^2 amu)) in rad/s.
Definition at line 2539 of file gpridge_c.h.
| typedef struct gpr_htst_half gpr_htst_half_t |
One half of the prefactor (ABI 1.20).
Set struct_size to sizeof(gpr_htst_half_t); the library writes only the first struct_size bytes. ln_sum is in ln of the frequency unit set by omega_scale. ln_sum_std is the GP-variance estimate of the spread of ln_sum: the root-sum-square, over the positive modes with a component outside the oracle-measured directions, of sqrt(var_i) / (2 lambda_i), the standard deviation of ln nu_i from the mode's diagonal curvature variance var_i. Covariance between modes is not included. An estimate, never a certificate, and 0 for a measured Hessian. oracle_calls counts this half's own oracle calls. omega_scale records the option the half was computed with, so halves in different units are not combined.
| typedef struct gpr_htst_options gpr_htst_options_t |
Prefactor options (ABI 1.20).
Set struct_size to sizeof(gpr_htst_options_t); fields past struct_size take their defaults. NULL means gpr_htst_options_defaults().
| enum gpr_htst_kind_t |
Stationary point of a half (ABI 1.20).
| Enumerator | |
|---|---|
| GPR_HTST_MINIMUM | no negative mode expected |
| GPR_HTST_SADDLE | one negative mode expected |
Definition at line 2549 of file gpridge_c.h.
| enum gpr_htst_mode_t |
Hessian a half is built from (ABI 1.20).
| Enumerator | |
|---|---|
| GPR_HTST_REFINED | |
| GPR_HTST_MEASURED | |
| GPR_HTST_SURROGATE | |
Definition at line 2542 of file gpridge_c.h.
| enum gpr_htst_point_t |
Which stationary point of a search (ABI 1.20).
| Enumerator | |
|---|---|
| GPR_HTST_REACTANT | NEB R_initial, or the minimizer's result |
| GPR_HTST_TRANSITION | the band's climbing image |
| GPR_HTST_PRODUCT | NEB R_final |
Definition at line 2575 of file gpridge_c.h.
| enum gpr_htst_source_t |
Where a half's Hessian came from (ABI 1.20).
Definition at line 2565 of file gpridge_c.h.
| enum gpr_htst_status_t |
Outcome of a half (ABI 1.20).
Definition at line 2555 of file gpridge_c.h.
| int gpr_htst_half | ( | gpr_model_t | model, |
| gpr_oracle_fn | oracle, | ||
| void * | user_data, | ||
| const gpr_htst_options_t * | options, | ||
| const double * | masses, | ||
| int | n_masses, | ||
| const double * | x, | ||
| int | n_coords, | ||
| int | kind, | ||
| double * | frequencies_out, | ||
| int * | measured_out, | ||
| gpr_htst_half_t * | half ) |
The half at x from a trained model and an oracle.
The mode of options picks the Hessian: REFINED needs both, MEASURED only the oracle (model may be NULL; when non-NULL and initialized, its geometry projection and mass rules apply as in REFINED and SURROGATE), SURROGATE only the model (oracle may be NULL). measured_out, when non-NULL, receives n_coords flags in the order of frequencies_out: 1 for a mode at least 99% inside the oracle-measured directions. A failed oracle returns GPR_ERR_ORACLE.
| int gpr_htst_half_checked | ( | gpr_model_t | model, |
| gpr_oracle_fn | oracle, | ||
| void * | user_data, | ||
| const gpr_htst_options_t * | options, | ||
| const double * | masses, | ||
| size_t | masses_len, | ||
| int | n_masses, | ||
| const double * | x, | ||
| size_t | x_len, | ||
| int | n_coords, | ||
| int | kind, | ||
| double * | frequencies_out, | ||
| size_t | frequencies_len, | ||
| int * | measured_out, | ||
| size_t | measured_len, | ||
| gpr_htst_half_t * | half ) |
Extent-checked gpr_htst_half.
| int gpr_htst_half_from_hessian | ( | const gpr_htst_options_t * | options, |
| const double * | masses, | ||
| int | n_masses, | ||
| const double * | H, | ||
| const double * | x, | ||
| int | n_coords, | ||
| int | kind, | ||
| double * | frequencies_out, | ||
| gpr_htst_half_t * | half ) |
The half of a caller's Hessian (no oracle, no model).
H is n_coords x n_coords row-major at x (n_coords). masses holds n_masses = n_coords / 3 values or is NULL with n_masses 0. frequencies_out, when non-NULL, receives n_coords values: the vibrational frequencies ascending by eigenvalue (an unstable mode as -abs(nu)), then zeros for the projected modes.
| int gpr_htst_half_from_hessian_checked | ( | const gpr_htst_options_t * | options, |
| const double * | masses, | ||
| size_t | masses_len, | ||
| int | n_masses, | ||
| const double * | H, | ||
| size_t | H_len, | ||
| const double * | x, | ||
| size_t | x_len, | ||
| int | n_coords, | ||
| int | kind, | ||
| double * | frequencies_out, | ||
| size_t | frequencies_len, | ||
| gpr_htst_half_t * | half ) |
Extent-checked gpr_htst_half_from_hessian.
| int gpr_htst_ln_prefactor | ( | const gpr_htst_half_t * | minimum, |
| const gpr_htst_half_t * | saddle, | ||
| double * | ln_nu, | ||
| double * | ln_nu_std ) |
ln nu = minimum->ln_sum - saddle->ln_sum and its spread sqrt(std_min^2 + std_saddle^2). GPR_ERR_INVALID_ARG unless the halves are a GPR_HTST_MINIMUM and a GPR_HTST_SADDLE with status OK or NOT_CONVERGED, struct_size covers omega_scale, both have the same n_coords, finite ln_sum and finite non-negative ln_sum_std, the minimum has exactly one more real (positive) mode than the saddle (n_modes), and ln nu and its spread are finite. Outputs are untouched on failure. GPR_ERR_UNIT_MISMATCH when the halves were computed with different omega_scale values: their ln_sum are in different frequency units.
| gpr_htst_options_t gpr_htst_options_defaults | ( | void | ) |
Defaults of gpr_htst_options_t with struct_size set.
| int gpr_neb_result_prefactor | ( | gpr_neb_t | result, |
| int | point, | ||
| gpr_htst_half_t * | half, | ||
| double * | frequencies_out, | ||
| int * | measured_out, | ||
| int | n_coords ) |
A half of a GP NEB result, as gpr_search_prefactor.
| int gpr_neb_result_prefactor_checked | ( | gpr_neb_t | result, |
| int | point, | ||
| gpr_htst_half_t * | half, | ||
| double * | frequencies_out, | ||
| size_t | frequencies_len, | ||
| int * | measured_out, | ||
| size_t | measured_len, | ||
| int | n_coords ) |
Extent-checked gpr_neb_result_prefactor.
| int gpr_request_prefactor | ( | const gpr_htst_options_t * | options, |
| const double * | masses, | ||
| int | n_masses ) |
Opt this thread's later searches into prefactor halves.
Searches do not compute halves until this call. It covers every gpr_neb_search* entry, including local and periodic bands, and gpr_minimize. NULL options opt in with enabled = 1 and GPR_HTST_SURROGATE: the half reuses the search's own evaluations through a GP fitted on the ones nearest the point, and that mode adds no oracle call. The NEB stores the reactant, the climbing image and the product; the minimizer stores its result. A climbing image whose index stencil the search measured (gpr_neb_request_index_certificate) uses that measured Hessian instead. REFINED or MEASURED spend oracle calls after the search; those calls reach the caller's callback and are counted in the half, not in the search's reports. Pass enabled = 0 to turn the request off. The settings persist on the thread until the next call. Explicit masses are copied and consumed by the next search.
A half that cannot be formed is still stored, with status GPR_HTST_UNAVAILABLE and a message. gpr_search_prefactor and gpr_neb_result_prefactor return GPR_SUCCESS for that half. They return GPR_ERR_UNSUPPORTED only when the search did not opt in or has no half at that point. A request whose coordinates are not a whole number of atoms fails the search with GPR_ERR_INVALID_ARG, except a classic gpr_neb_search* on such coordinates (a two-dimensional surface): it runs without halves and the reads return GPR_ERR_UNSUPPORTED. Nothing else is dropped and nothing is replaced by another mode.
| int gpr_search_prefactor | ( | int | point, |
| gpr_htst_half_t * | half, | ||
| double * | frequencies_out, | ||
| int * | measured_out, | ||
| int | n_coords ) |
A half of the last search on this thread.
GPR_ERR_UNSUPPORTED when that search did not opt in or has no half at this point (a minimizer has only GPR_HTST_REACTANT). A stored half with status GPR_HTST_UNAVAILABLE is still returned: the search opted in and that point could not form a Hessian. frequencies_out and measured_out are as in gpr_htst_half and may be NULL; otherwise n_coords must be the search's moving coordinates. A negative n_coords is GPR_ERR_INVALID_ARG whether or not the buffers are NULL.
| int gpr_search_prefactor_checked | ( | int | point, |
| gpr_htst_half_t * | half, | ||
| double * | frequencies_out, | ||
| size_t | frequencies_len, | ||
| int * | measured_out, | ||
| size_t | measured_len, | ||
| int | n_coords ) |
Extent-checked gpr_search_prefactor.