sparc.socketio module
A i-PI compatible socket protocol implemented in SPARC
- class sparc.socketio.SPARCProtocol(socket, txt=None)[source]
Bases:
IPIProtocol
Extending the i-PI protocol to support extra routines
- recv_object(include_header=True)[source]
Return a decoded file
include_header: should we receive the header or not
- class sparc.socketio.SPARCSocketClient(host='localhost', port=None, unixsocket=None, timeout=None, log=None, parent_calc=None)[source]
Bases:
SocketClient
- class sparc.socketio.SPARCSocketServer(port=None, unixsocket=None, timeout=None, log=None, parent=None)[source]
Bases:
SocketServer
We only implement the unix socket version due to simplicity
parent: the SPARC parent calculator
- calculate_origin_protocol(atoms)[source]
Send geometry to client and return calculated things as dict.
This will block until client has established connection, then wait for the client to finish the calculation.
- property proc
- send_atoms_and_params(atoms, params)[source]
Update the atoms and parameters for the SPARC calculator The params should be assignable to SPARC.set
The calc for atoms is stripped for simplicity
- property socket_filename