i-PI: A Python interface for ab initio path integral molecular dynamics simulations☆
Introduction
Molecular dynamics simulations are becoming increasingly capable not only of assisting the interpretation of experiments, but also of predicting the properties and the behaviour of new materials and compounds [1]. Besides the increase in available computer power, these developments have been made possible by an increasingly accurate treatment of the interactions between the atoms, in particular by an explicit treatment of the electronic structure problem [2], [3]. However, as the methods that are used to treat the quantum nature of the electrons improve, it becomes increasingly clear that in the presence of light atoms, such as hydrogen or lithium, the error due to approximating the nuclei as classical particles is at least as large as the errors due to the approximate modelling of the electrons. The importance of nuclear quantum effects (NQEs) is evident from the fact that the zero-point energy associated with a typical O–H stretching mode is in excess of 200 meV. This has significant implications: for example, one can show by extrapolating the experimental values for isotopically pure light, heavy and tritiated water that a hypothetical liquid with classical nuclei would have a 50% higher heat capacity than H2O and a pH of about 8.5.
Within the Born–Oppenheimer approximation, NQEs can be modelled using the imaginary time path integral formalism [4], [5], [6], [7]. This formalism maps the quantum mechanical partition function for a set of distinguishable nuclei onto the classical partition function of a so-called ring polymer, composed of replicas (beads) of the physical system connected by harmonic springs. The number of replicas needed to achieve a converged result is typically a small multiple of , where is the inverse temperature and is the largest vibrational frequency in the system. For the archetypical case of room-temperature liquid water, most properties are reasonably well converged with —making the path integral simulation 32 times more expensive than a classical simulation.
As a consequence of this large overhead, NQEs were for many years only rarely considered in the context of ab initio molecular dynamics [8], [9], [10]. However, with the advent of massively parallel computers, including these effects has become somewhat more affordable [11], [12], and their simulation has also been facilitated by new methodological developments. In particular, it has recently been realised that an approximate modelling of NQEs can be obtained by applying a coloured (correlated)-noise Langevin equation thermostat to classical molecular dynamics [13], [14], [15]. Moreover, this idea can be turned into a systematically convergent, accurate method [16], [17] by combining coloured noise with path integral molecular dynamics (PIMD). To give an example, the PIGLET method [17] makes it possible to treat NQEs in liquid water at 300 K with as few as 6 beads, which promises to make accurate ab initio PIMD calculations almost routine.
Unfortunately, most ab initio electronic structure codes only contain rudimentary implementations of PIMD, if any at all. We have developed i-PI in order to reduce the effort of introducing the latest PIMD developments into electronic structure codes, so as to make them readily available to a broader community. The framework we have adopted is a server–client model, in which i-PI acts as a server passing atomic coordinates to (multiple instances of) an electronic structure client program, and receiving the energy and forces in return. This allows all of the PIMD machinery to be confined to the Python server side, and minimises the modifications that have to be made to the electronic structure code.
Section snippets
Program overview
i-PI has been developed with the awareness that the cost of an ab initio PIMD simulation will be dominated by the electronic structure problem, and with a few clear goals:
- •
to minimise the effort required to modify the client ab initio electronic structure code,
- •
to include no feature specific to a particular client code,
- •
to be modular, simple to extend and with a structure that reflects the underlying physics,
- •
to be efficient, but never at the cost of clarity.
In order to achieve these goals we have
Program features
Integrating the PIMD equations of motion involves a number of technicalities. Fortunately, these can be kept to a minimum by using stochastic thermostatting [18] — which avoids the complication of integrating Nosé–Hoover chain thermostats — and by formulating the time evolution using a symmetric Trotter splitting algorithm [19]. This is the approach we have adopted in the i-PI program.
The program implements the most recent developments in path integral and coloured-noise molecular dynamics,
Constant-pressure path integral molecular dynamics
Most of the techniques listed above have been discussed in detail elsewhere. However, our implementation of PIMD in the NPT ensemble has not been described before now. The approach we have adopted for this is a relatively straightforward combination of ideas taken from path integral Langevin equation thermostats [18], stochastic barostats for conventional MD [34], and previous work on constant-pressure PIMD [35]. We report it here as this combination is robust, transparent and streamlined,
An example application: high-pressure water
To highlight some of the more advanced features available in i-PI, we have used it to perform an illustrative ab initio PIGLET [17] simulation of supercritical water at 750 K and 10 GPa. This simulation is both technically challenging and physically interesting. We shall use it to reveal the importance of NQEs under conditions similar to those explored in the pioneering work of Ref. [39], in which calculations were performed at constant volume and without quantum effects in the nuclear motion.
Conclusions
In this paper we have introduced i-PI, a Python interface designed to facilitate including nuclear quantum effects in ab initio path integral molecular dynamics simulations. Our program delegates the calculation of the potential, forces and virial tensor to an external code, keeping the electronic structure calculation and the propagation of the nuclear dynamics separate. Communication between the codes is achieved using internet sockets, which exchange just the essential information, thereby
Acknowledgements
We would like to thank the early adopters of i-PI, including J. Cuny, E. Davidson, R. DiStasio, D. Donadio, F. Giberti, A. Hassanali, T. Markland, M. Rossi, B. Santra, D. Selassie, T. Spura, L. Wang, and D. Wilkins, who have helped immensely debugging the code and testing it on a variety of problems. A special thanks goes to A. Michaelides, who helped us to decide an acronym for the interface. We also acknowledge generous allocations of computer time from CSCS (project ID s338) and the Oxford
References (52)
- et al.
A refined ring polymer contraction scheme for systems with electrostatic interactions
Chem. Phys. Lett.
(2008) - et al.
The -thermostat: selective normal-modes excitation by colored-noise Langevin dynamics
Procedia Comput. Sci.
(2010) - et al.
Predicting crystal structure by merging data mining with quantum mechanics
Nat. Mater.
(2006) - et al.
Unified approach for molecular dynamics and density-functional theory
Phys. Rev. Lett.
(1985) Perspective on density functional theory
J. Chem. Phys.
(2012)- et al.
Exploiting the isomorphism between quantum theory and classical statistical mechanics of polyatomic fluids
J. Chem. Phys.
(1981) - et al.
Study of an F center in molten KCl
J. Chem. Phys.
(1984) Path integrals in the theory of condensed helium
Rev. Modern Phys.
(1995)- et al.
Quantum Mechanics and Path Integrals
(1964) - et al.
Efficient and general algorithms for path integral Car{–}Parrinello molecular dynamics
J. Chem. Phys.
(1996)
Ab initio path integral molecular dynamics: Basic ideas
J. Chem. Phys.
The nature of the hydrated excess proton in water
Nature
Proton transport in triflic acid hydrates studied via path integral car-parrinello molecular dynamics
J. Phys. Chem. B
Nature of proton transport in a water-filled carbon nanotube and in liquid water
PCCP
Computation of the temperature dependence of the heat capacity of complex molecular systems using random color noise
Phys. Rev. E
Nuclear quantum effects in solids using a colored-noise thermostat
Phys. Rev. Lett.
Quantum thermal bath for molecular dynamics simulation
Phys. Rev. Lett.
Accelerating the convergence of path integral dynamics with a generalized Langevin equation
J. Chem. Phys.
Efficient first-principles calculation of the quantum kinetic energy and momentum distribution of nuclei
Phys. Rev. Lett.
Efficient stochastic thermostatting of path integral molecular dynamics
J. Chem. Phys.
Reversible multiple time scale molecular dynamics
J. Chem. Phys.
An efficient ring polymer contraction scheme for imaginary time path integral simulations
J. Chem. Phys.
Canonical sampling through velocity rescaling
J. Chem. Phys.
Langevin equation with colored noise for constant-temperature molecular dynamics simulations
Phys. Rev. Lett.
Colored-noise thermostats à la Carte
J. Chem. Theory Comput.
Cited by (253)
Revisiting first principles van der Waals corrections based on maximally localized Wannier functions
2024, Chemical Physics LettersHydrogen trapping and embrittlement in metals – A review
2024, International Journal of Hydrogen EnergyCRYSTALpytools: A Python infrastructure for the CRYSTAL code
2023, Computer Physics CommunicationsPath-integral molecular dynamics predictions of equilibrium H and O isotope fractionations between brucite and water
2023, Geochimica et Cosmochimica ActaFortnet, a software package for training Behler-Parrinello neural networks
2023, Computer Physics CommunicationsThree-Center Tight-Binding Together with Multipolar Auxiliary Functions
2024, Journal of Chemical Theory and Computation
- ☆
This paper and its associated computer program are available via the Computer Physics Communication homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655).