openmaterials.ai / codes / i-PI

i-PI: path integral molecular dynamics with forces over a socket

A Python force engine that moves the nuclei, classical or as ring polymers, while an external code returns energies and forces over a socket.

What it is and how it works

Ring polymers from any force code

i-PI is the server. It sends positions and cell vectors to clients, receives energy, forces and stress, and moves the atoms. With several beads, one forcefield serves several clients in parallel (Litman 2024).

Sampling methods

MD and PIMD in the NVE, NVT, NPT and NsT ensembles, GLE and PIGLET thermostats, RPMD, CMD, TRPMD, ring polymer instantons, replica exchange, metadynamics (Litman 2024).

Socket protocol

UNIX domain sockets on one host or TCP/IP across a network. Clients start on their own and must keep the atom count and order fixed for the whole run (Litman 2024).

Clients

Examples ship for ASE, CASTEP, CP2K, LAMMPS, DFTB+, FHI-aims, Quantum ESPRESSO and VASP. A new Python interface is one small file under drivers/py/pes/ (Litman 2024).

Overhead per step

i-PI 3.0 cut the base NVE overhead from 0.47 ms to 0.09 ms per step and the TCP/IP constant from 21.54 ms to 1.26 ms by disabling Nagle's algorithm (Litman 2024).

Committee models

An ffcommittee block averages several potentials and reports their spread as the error, with a weighted baseline model and a store of high-error structures (Litman 2024).

What people do with it

  • 2.16ns/day, 4096 H2O, DeePMD, 8 V100 GPUs, via i-PILitman 2024
  • 0.09 msbase overhead per NVE step in i-PI 3.0Litman 2024
  • 0.6%CH4+H tunneling factors vs an independent codeKapil 2019

Infrared spectrum of liquid water

Thermostatted RPMD in i-PI with LAMMPS, 216 q-TIP4P/F waters and 32 beads, washes out the RPMD resonances. The OH stretch peak sits about 75 cm-1 below the classical one (Rossi 2014). Rossi 2014

Fourth-order path integrals for ice

Finite-difference Suzuki-Chin PIMD, implemented in i-PI, reaches an error of a few meV per molecule for hexagonal ice at 100 K with 48 beads. Trotter PIMD needs more than 128 (Kapil 2016). Kapil 2016

Melting point of ab initio water

i-PI with LAMMPS and a revPBE0-D3 neural network potential gives Tm = 267(2) K for H2O and 275(2) K for D2O, against 273.15 K and 276.97 K measured (Cheng 2019). Cheng 2019

How it is used

  1. Write the XML input

    One XML file with <system>, <ensemble>, <ffsocket> blocks and a <motion> mode.

  2. Start i-PI

    i-PI opens its sockets and waits for clients to connect.

  3. Launch the clients

    Start the force code (LAMMPS fix_ipi, the ASE driver, a DFT code) at the socket address.

  4. Run and restart

    Each step trades positions for energy, forces and stress. Restart files are written.

  5. Post-process

    Print properties and trajectories (x_centroid, f_centroid) and run the i-pi tools.