eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
ServeRpcServer.h
Go to the documentation of this file.
1
/*
2
** This file is part of eOn.
3
**
4
** SPDX-License-Identifier: BSD-3-Clause
5
**
6
** Copyright (c) 2010--present, eOn Development Team
7
** All rights reserved.
8
**
9
** Repo:
10
** https://github.com/TheochemUI/eOn
11
*/
12
#pragma once
13
14
#include <cstdint>
15
#include <functional>
16
#include <memory>
17
#include <string>
18
#include <vector>
19
20
namespace
eonc
{
21
36
using
ForceCallback
= std::function<void(
long
nAtoms,
const
double
*positions,
37
const
int
*atomicNrs,
double
*forces,
38
double
*energy,
const
double
*box)>;
39
50
void
startRpcServer
(
ForceCallback
callback,
const
std::string &host,
51
uint16_t port);
52
61
void
startPooledRpcServer
(std::vector<ForceCallback> pool,
62
const
std::string &host, uint16_t port);
63
64
}
// namespace eonc
65
66
using
eonc::ForceCallback
;
67
using
eonc::startPooledRpcServer
;
68
using
eonc::startRpcServer
;
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:19
eonc::ForceCallback
std::function< void(long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, const double *box)> ForceCallback
Callback type for potential energy/force evaluation.
Definition
ServeRpcServer.h:36
eonc::startPooledRpcServer
void startPooledRpcServer(std::vector< ForceCallback > pool, const std::string &host, uint16_t port)
Start a blocking Cap'n Proto RPC server backed by a pool of force callbacks dispatched round-robin.
Definition
ServeRpcServer.cpp:185
eonc::startRpcServer
void startRpcServer(ForceCallback callback, const std::string &host, uint16_t port)
Start a blocking Cap'n Proto RPC server using a force callback.
Definition
ServeRpcServer.cpp:103
include
eon
ServeRpcServer.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf