Functions | |
| int | gpr_minimize (gpr_oracle_fn oracle, void *user_data, const double *R_init, int n_coords, gpr_atoms_t atoms, const gpr_minimize_config_t *config, double *R_final, double *E_final, double *G_final, int *converged, int *n_oracle_calls) |
| GP-accelerated geometry minimization. | |
| int gpr_minimize | ( | gpr_oracle_fn | oracle, |
| void * | user_data, | ||
| const double * | R_init, | ||
| int | n_coords, | ||
| gpr_atoms_t | atoms, | ||
| const gpr_minimize_config_t * | config, | ||
| double * | R_final, | ||
| double * | E_final, | ||
| double * | G_final, | ||
| int * | converged, | ||
| int * | n_oracle_calls ) |
GP-accelerated geometry minimization.
The GP-predicted gradient only proposes a stop; converged is set when an actual oracle evaluation at that exact position has gradient norm below conv_tol. 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): the converged point, or the lowest-energy evaluation when the search did not converge. Every oracle call counts toward max_oracle_calls, which is never exceeded. Each outer cycle (bounded by max_iter) runs up to 200 inner surrogate L-BFGS steps by default, or the cap set by gpr_minimize_request_max_inner_steps() on this thread.
| oracle | Energy/gradient callback |
| user_data | Opaque pointer |
| R_init | Initial positions (n_coords) |
| n_coords | Coordinate dimension |
| atoms | Atomic configuration (for GP kernel) |
| config | Minimizer configuration |
| R_final | Output optimized positions (n_coords) |
| E_final | Output final energy |
| G_final | Output final gradient (n_coords), may be NULL |
| converged | Output 1=converged 0=not, may be NULL |
| n_oracle_calls | Output total oracle evaluations, may be NULL |