ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
socket_handlers.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_RELAX_SOCKET_HANDLERS_H
2#define ABACUS_SOURCE_RELAX_SOCKET_HANDLERS_H
3
6
7#include <fstream>
8#include <string>
9#include <vector>
10
11class UnitCell;
12
13namespace ModuleESolver
14{
15class ESolver;
16}
17class Input_para;
18
19namespace SocketHandlers
20{
33
34// Reads the next i-PI header on the root rank and broadcasts it to all ranks.
35// Returns an empty string when the peer closed the connection while no frame
36// is pending. Calls WARNING_QUIT on unrecoverable I/O failure.
37std::string read_header_bcast(IpiSocket &socket, const SocketUtils::DriverState state);
38
39void handle_status(IpiSocket &socket, const SocketUtils::DriverState state);
40
41void handle_init(IpiSocket &socket, DriverContext &context, std::ofstream &ofs_running);
42
43void handle_posdata(IpiSocket &socket, DriverContext &context, std::ofstream &ofs_running);
44
45void handle_getforce(IpiSocket &socket, DriverContext &context);
46
47void handle_exit(std::ofstream &ofs_running);
48} // namespace SocketHandlers
49
50#endif
Definition socket_ipi.h:17
Definition esolver.h:13
Provide the basic information about unitcell.
Definition unitcell.h:16
The First-Principles (FP) Energy Solver Class.
Definition opt_test_tools.cpp:93
Definition socket_handlers.cpp:21
void handle_exit(std::ofstream &ofs_running)
Definition socket_handlers.cpp:488
void handle_posdata(IpiSocket &socket, DriverContext &context, std::ofstream &ofs_running)
Definition socket_handlers.cpp:415
void handle_getforce(IpiSocket &socket, DriverContext &context)
Definition socket_handlers.cpp:448
void handle_status(IpiSocket &socket, const DriverState state)
Definition socket_handlers.cpp:78
void handle_init(IpiSocket &socket, DriverContext &context, std::ofstream &ofs_running)
Definition socket_handlers.cpp:108
std::string read_header_bcast(IpiSocket &socket, const DriverState state)
Definition socket_handlers.cpp:49
DriverState
Definition socket_utils.h:26
@ NeedInit
Definition socket_utils.h:27
Definition input_parameter.h:13
Definition socket_handlers.h:22
SocketUtils::ComputedFrame published
Definition socket_handlers.h:29
SocketUtils::DriverState state
Definition socket_handlers.h:26
UnitCell * ucell
Definition socket_handlers.h:24
int nat_return
Definition socket_handlers.h:28
const Input_para * inp
Definition socket_handlers.h:25
int istep
Definition socket_handlers.h:27
ModuleESolver::ESolver * esolver
Definition socket_handlers.h:23
bool checked_initial_positions
Definition socket_handlers.h:31
std::vector< double > reference_cell
Definition socket_handlers.h:30
Definition socket_utils.h:33