class gpr::neb::EonRelaxClient¶
Overview¶
dlopen client for the eOn tier-2 relaxation engine: the host hands a band and a surface callback to eOn, which owns NudgedElasticBand / MinModeSaddleSearch. More…
#include <gpr/neb/EonRelaxClient.h>
class EonRelaxClient {
public:
// construction
EonRelaxClient();
EonRelaxClient(const EonRelaxClient&);
~EonRelaxClient();
// methods
EonRelaxClient& operator=(const EonRelaxClient&);
bool load(const std::string& path = {});
bool loaded() const;
bool create(const void* config = nullptr, std::size_t config_len = 0);
bool created() const;
int run(eon_relax_band_t& band, eon_relax_surface_fn surface, void* user, eon_relax_outcome_t& outcome);
int step(eon_relax_band_t& band, eon_relax_surface_fn surface, void* user, eon_relax_outcome_t& outcome);
int reset();
int setSurfaceEpoch(std::uint64_t epoch);
int lastError() const;
void destroy();
const std::string& lastMessage() const;
eon_relax_version_t stamp() const;
};
Detailed Documentation¶
dlopen client for the eOn tier-2 relaxation engine: the host hands a band and a surface callback to eOn, which owns NudgedElasticBand / MinModeSaddleSearch. The GP stays the surface; the saddle mechanics leave the tree.
Discovery: an explicit path, else the GPR_EON_RELAX_ENGINE environment variable. The ABI stamp is checked on load: a major or layout mismatch refuses the library (closed contract, no silent fallback).
Methods¶
bool load(const std::string& path = {})
Load the engine library. Empty path consults GPR_EON_RELAX_ENGINE. Returns false with a reason in lastMessage() on failure.
bool create(const void* config = nullptr, std::size_t config_len = 0)
Create the engine instance from a Cap’n Proto RelaxEngineParams flat-array message; NULL/empty config selects the engine’s documented defaults (kind=NEB).
int run(eon_relax_band_t& band, eon_relax_surface_fn surface, void* user, eon_relax_outcome_t& outcome)
Run the bound engine over a caller-owned band. Returns the raw eon_relax_rc_t; on 0 the outcome is filled and band positions are updated in place.
int step(eon_relax_band_t& band, eon_relax_surface_fn surface, void* user, eon_relax_outcome_t& outcome)
One eOn NEB optimizer step. Surface and user must stay the same across steps until reset().