class rgpot::IPIDriver¶
Overview¶
Client side of the i-PI socket protocol. More…
#include <IPIDriver.hpp>
class IPIDriver {
public:
// construction
IPIDriver(const IPIDriverConfig& config, IPIEvaluator evaluate);
IPIDriver(const IPIDriver&);
~IPIDriver();
// methods
IPIDriver& operator=(const IPIDriver&);
void connect();
bool step();
void run();
void close();
const IPIDriverConfig& config() const;
const std::string& endpoint() const;
bool connected() const;
int32_t bead() const;
const std::string& initString() const;
uint64_t evaluations() const;
};
Detailed Documentation¶
Client side of the i-PI socket protocol.
Construction¶
IPIDriver(const IPIDriverConfig& config, IPIEvaluator evaluate)
Validates the config and the species; does not connect.
Methods¶
void connect()
Connects, retrying a refused or missing socket for connect_timeout_s.
bool step()
Handles one server message. Returns false after EXIT.
void run()
Connects if needed, then handles messages until EXIT.
void close()
Closes the connection without sending anything.
const std::string& endpoint() const
unix:<path> or tcp:<host>:<port> the driver connects to.
int32_t bead() const
Bead index of the last INIT, -1 before one.
const std::string& initString() const
Init string of the last INIT.
uint64_t evaluations() const
Number of POSDATA messages evaluated.