User Tools

Site Tools


howto:ipi

This is an old revision of the document!


This a short tutorial on how to run I-PI with CP2K.

i-PI is a Python interface for ab initio path integral molecular dynamics simulations. i-PI is composed of a Python server (i-pi itself, that does not need to be compiled but only requires a relatively recent version of Python and Numpy) that propagates the (path integral) dynamics of the nuclei, and of an external code that acts as a client and computes the electronic energy and forces.

Download i-PI from Github

git clone https://github.com/i-pi/i-pi.git

To run i-PI, one need to source the environment file from the i-PI directory

source ${PATH_TO_IPI}/env.sh

Then one can run i-PI by using

i-pi input.xml > log &

There are many input examples in i-pi/examples/ folder, which contains different methods, e.g. NVE, NVT, NPT, PIMD, REMP, etc.

There are two ways of communication between I-PI and CP2K.

Run i-PI with INET socket

To use CP2K as the client code using an internet domain socket on the host address “host_address” and on the port number “port” the following lines must be added to its input file:

&MOTION 
...
   &DRIVER
      HOST host_address
      PORT port
   &END DRIVER
...
&END MOTION   

In the input.xml, one need to use the same host_address and port to CP2K input.

  <ffsocket mode='inet' name='driver'>
    <address>host_address</address>
    <port>port</port>
    <latency>0.01</latency>
    <timeout>5000</timeout>
  </ffsocket>

Run i-PI with UNIX socket

If instead a unix domain socket is required then the following modification is necessary:

&MOTION 
...
   &DRIVER
      HOST host_address
      PORT port
      UNIX
   &END DRIVER
   ...
&END MOTION

In the input.xml, one to specify the mode=unix to enable the communication via UNIX socket.

  <ffsocket mode='unix' name='driver'>
    <address>host_address</address>
    <port>port</port>
    <latency>0.01</latency>
    <timeout>5000</timeout>
  </ffsocket>

Run I-PI with CP2K in a supercomputer

howto/ipi.1618580614.txt.gz · Last modified: 2021/04/16 13:43 by jglan