next up previous contents
Next: 4 Performances Up: 3 Using PWscf Previous: 3.5 Direct interface with   Contents

Subsections

3.6 Socket interface with i-PI

The i-PI universal force engine performs advanced Molecular Dynamics (MD) (such as Path Integral Molecular Dynamics, Thermodynamic Integration, Suzuki-Chin path integral, Multiple Time Step molecular dynamics) and other force related computations (see ipi-code.orgfor more information about i-PI).

PWscf users wishing to learn how to use i-PI should refer to the i-PI website.

3.6.0.1 Practicalities

The communication between PWscf and i-PI relies on a socket interface. This allows running i-PI and PWscf on different computers provided that the two computers have an Internet connection. Basically, i-PI works as a server waiting for a connection of a suitable software (for example PWscf). When this happens, i-PI injects atomic positions and cell parameters into the software, that will return forces and stress tensor to i-PI.

The file containing the interface is run_driver.f90. The files socket.c and fsocket.f90 provide the necessary infrastructure to the socket interface.

3.6.0.2 How to use the i-PI inteface

Since the communication goes through the Internet, the PWscf instance needs to know the address of the i-PI server that can be specified with the command line option --ipi (or -ipi) followed by the address of the computer running i-PI and the port number where i-PI is listening, e.g.
pw.x --ipi localhost:3142 -in pw.input > pw.out
If i-PI and PWscf are running on the same machine, a UNIX socket is preferable since allows faster communications, e.g.
pw.x --ipi socketname:UNIX -in pw.input > pw.out
In the last case, UNIX is a keyword that tells to PWscf to look for an UNIX socket connection instead of an INET one. More extensive examples and tutorials can be found at ipi-code.org.

The PWscf input file must contain all the information to perform a single point calculation (calculation = "scf") which are also used to initialize the PWscf run. Thus, it is important that the PWscf input contains atomic positions and cell parameters which are as close as possible to those specified in the i-PI input.


next up previous contents
Next: 4 Performances Up: 3 Using PWscf Previous: 3.5 Direct interface with   Contents
Filippo Spiga 2016-10-04