Running RPMD and PIMD simulations on Graphics Cards using OpenMM

Ring Polymer Molecular Dynamics (RPMD) provides an efficient and accurate approach to include nuclear quantum effects in molecular simulations. When used to calculate static equilibrium properties, RPMD reduces to Path Integral Molecular Dynamics (PIMD) and gives an exact description of the effect of the quantum fluctuations of the nuclei for a given potential energy model. For dynamical properties RPMD is no longer exact but has shown to be a good approximation in many cases.

Details on the RPMD integration scheme implemented in OpenMM can be found in this paper. The path integral calculation can be thermostatted using the Path integral Langevin equation (PILE) stochastic thermostattting scheme which is described in the same paper.

Example using PIMD to get static equilibrium properties of q-TIP4P/F water

This is a quick example of how to run a PIMD simulation of the q-TIP4P/F water model using the OpenMM RPMD plugin. This water model gives good agreement with many properties of water and has also been shown to accurately reproduce the hydrogen/deuterium fractionation ratios between water and ice.

  1. Download the latest version of OpenMM from the downloads page and install it. Versions of OpenMM prior to 5.1 had a bug which caused errors using the RPMD plugin with models with virtual sites (such as q-TIP4P/F) so are not recommended.
  2. Download the example q-TIP4P/F input file, parameter file and structure file from here.
  3. Execute the input file by typing: "python" (without the quotes) at the console.
  4. The script will run a 10 ps simulation of 1000 q-TIP4P/F water molecules using RPMD with 32 beads. VMD can be used to visualize the trajectory (trajectory.pdb) and compute the radial distribution functions. The results can be compared with the benchmark results in this paper.

Using RPMD to get dynamical properties of q-TIP4P/F water

The RPMD approach to get approximate quantum dynamics is defined as evolving under the same choice of Hamiltonian as for the PIMD implementation in OpenMM but with no thermostats turned on. To turn off the thermostats add the line: "integrator.setApplyThermostat(False)" to the python script for the PIMD example above. The dynamics generated from these NVE trajectories will now be RPMD dynamics. Note however, that due to the ergodicity problems associated with the path integral Hamiltonian one must launch trajectories from many different choices of the initial momenta i.e. do a thermostatted PIMD run and then launch lots of NVE RPMD trajectories from the configurations generated.


Using a single Nvidia GTX680 graphics card with OpenMM version 5.1 for 1000 water molecules gives 1.7 nanoseconds per day of PIMD simulation. With 2000 water molecules about 1.2 nanoseconds per day is obtained. If you see speeds much lower than this ensure that you are running the calculation on the CUDA platform not the reference platform. OpenMM also includes the ring polymer contraction approach which can be used to obtain significant speed-ups for PIMD and RPMD simulations. Examples showing how to use this feature will be provided as soon as we have time.

Ab initio path integral simulations

For performing PIMD or RPMD simulations using on-the-fly electronic structure theory to generate the potential energy surface (ab initio molecular dynamics) we highly recommend the i-PI package of Ceriotti and co-workers.


This test example is provided on an "as-is" basis. If you need help with using OpenMM please consult the OpenMM public forum . Additional documentation for the RPMD plugin can be found in the OpenMM users guide and RPMD integrator class reference page.

For setting up classical simulations the OpenMM Script Builder is highly recommended.