class gpr::neb::RgsaddleClient

Overview

Call site for the linked librgsaddle. More…

#include <gpr/neb/RgsaddleClient.h>
 
class RgsaddleClient {
public:
    // typedefs
 
    typedef RgsaddleBand* Band;
    typedef RgsaddleSellaMin* SellaMin;
    typedef RgsaddleSellaSaddle* SellaSaddle;
    typedef RgsaddleMinMode* MinMode;
    typedef RgsaddleIndex1* Index1;
    typedef RgsaddleIrc* Irc;
 
    // fields
 
    static uint32_t kMinimumAbiMinor = 71;
 
    // construction
 
    RgsaddleClient();
    RgsaddleClient(const RgsaddleClient&);
    ~RgsaddleClient();
 
    // methods
 
    RgsaddleClient& operator=(const RgsaddleClient&);
    bool load(const std::string& path = {});
    bool loaded() const;
    Band bandCreate(const rgsaddle_band_config_t* cfg, int64_t n_images, int64_t n_atoms, const double* positions);
    int bandStep(Band band, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int bandPositions(Band band, double* out);
    int bandSetPositions(Band band, const double* positions);
    int bandReset(Band band);
    int bandSetForceGate(Band band, rgsaddle_force_gate_t gate);
    bool hasBandExpPrecon() const;
    int bandSetExpPrecon(Band band, double a, double c_stab, double mu, double r_cut_factor);
    void bandFree(Band band);
    SellaMin sellaMinCreate(const rgsaddle_sella_min_config_t* cfg, int64_t n_atoms, const double* position, const double* masses);
    int sellaMinStep(SellaMin sess, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int sellaMinPosition(SellaMin sess, double* out);
    void sellaMinFree(SellaMin sess);
    SellaSaddle sellaSaddleCreate(const rgsaddle_sella_saddle_config_t* cfg, int64_t n_atoms, const double* position, const double* masses);
    int sellaSaddleStep(SellaSaddle sess, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int sellaSaddlePosition(SellaSaddle sess, double* out);
    void sellaSaddleFree(SellaSaddle sess);
    Index1 index1Create(const rgsaddle_index1_config_t* cfg, int64_t n_atoms, const double* position, const double* hessian, const double* masses);
    int index1Step(Index1 sess, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int index1Position(Index1 sess, double* out);
    void index1Free(Index1 sess);
    bool hasIndex1() const;
    bool hasSellaSaddle() const;
    MinMode minModeCreate(const rgsaddle_minmode_config_t* cfg, int64_t n_atoms, const double* position, const double* mode);
    int minModeStep(MinMode sess, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int minModePosition(MinMode sess, double* out);
    int minModeSetForceGate(MinMode sess, rgsaddle_force_gate_t gate);
    void minModeFree(MinMode sess);
    bool hasMinMode() const;
    bool hasIrc() const;
    bool hasIrcFromSurface() const;
    bool hasIrcControls() const;
    int ircSetLengths(Irc session, double kick, double max_step, double min_step, int adaptive);
    Irc ircCreate(const rgsaddle_irc_config_t* cfg, int64_t n_atoms, const double* saddle, const double* masses, const double* mode);
    Irc ircCreateFromSurface(const rgsaddle_irc_config_t* cfg, int64_t n_atoms, const double* saddle, const double* masses, const double* seed, rgsaddle_surface_fn surface, void* user);
    int ircStep(Irc session, rgsaddle_surface_fn surface, void* user, rgsaddle_report_t* out);
    int ircPosition(const Irc session, double* out);
    int ircSetDirection(Irc session, int32_t direction);
    int ircReset(Irc session);
    void ircFree(Irc session);
    const std::string& lastMessage() const;
    bool hasPathSeeds() const;
    int idppFixedPath(int64_t n_images, int64_t n_atoms, const double* reactant, const double* product, const double* cell, const uint8_t* mask, int64_t max_iterations, double grad_tol, double max_move, double* out);
    int sidppAlternatingPath(bool inverse_distance, int64_t n_images, int64_t n_atoms, const double* reactant, const double* product, const double* cell, const uint8_t* mask, double alpha, int64_t short_iterations, int64_t final_iterations, double force_tol, double max_move, double spring, double* out);
    bool hasKappaDimer() const;
    int kappaDimerForce(const rgsaddle_kappa_config_t* config, int64_t dof, const double* gradient, const double* mode, int64_t n_excluded, const double* excluded, rgsaddle_hessian_fn hessian, void* user, double* force, rgsaddle_kappa_report_t* report);
    bool hasHessianBofill() const;
    int hessianBofill(int64_t n, const double* step, const double* dgradient, double* hessian);
    uint32_t abiMajor() const;
    uint32_t abiMinor() const;
    int orderOneSessionKind() const;
};

Detailed Documentation

Call site for the linked librgsaddle. The library is a build dependency, so the symbols are bound at link time. load checks the ABI stamp and ignores a path.

Methods

bool hasBandExpPrecon() const

rgsaddle_band_set_exp_precon (ABI minor 22) is in the library.

int bandSetExpPrecon(Band band, double a, double c_stab, double mu, double r_cut_factor)

Per-image exponential metric on the band solver. Nonpositive a, c_stab, r_cut_factor take the dest defaults; mu <= 0 is estimated.

bool hasIrc() const

rgsaddle_irc_create, rgsaddle_irc_step and rgsaddle_irc_set_direction are in the linked library.

bool hasIrcFromSurface() const

rgsaddle_irc_create_from_surface. The Lanczos kick needs it.

bool hasIrcControls() const

rgsaddle_irc_set_lengths. Adaptive Morokuma, the separate kick length and the mass-weighted force gate are in the linked library.

bool hasPathSeeds() const

The IDPP and alternating S-IDPP path seeds (ABI minor 71) are in the library.

int idppFixedPath(int64_t n_images, int64_t n_atoms, const double* reactant, const double* product, const double* cell, const uint8_t* mask, int64_t max_iterations, double grad_tol, double max_move, double* out)

rgsaddle_idpp_fixed_path. mask is NULL or one byte per atom, 1 for an atom held at the reactant coordinates. out holds n_images rows.

int sidppAlternatingPath(bool inverse_distance, int64_t n_images, int64_t n_atoms, const double* reactant, const double* product, const double* cell, const uint8_t* mask, double alpha, int64_t short_iterations, int64_t final_iterations, double force_tol, double max_move, double spring, double* out)

rgsaddle_sidpp_alternating_path, or its inverse-distance variant.

bool hasHessianBofill() const

rgsaddle_hessian_bofill is in the linked library.

int hessianBofill(int64_t n, const double* step, const double* dgradient, double* hessian)

Row-major n by n Hessian, updated only when the runtime accepts.

int orderOneSessionKind() const

1 when the last created order-one session is Sella, 2 when it is the index-1 Newton session. 0 before either create succeeds.