This repository contains a compact Python implementation of the Ring Polymer Molecular Dynamics (RPMD) method for computing approximate quantum rate constants in dissipative systems with linear and nonlinear friction. The code is used to simulate the dynamics of a ring polymer in a 1D potential, under the influence of a bath of harmonic oscillators to emulate a condensed phase environment.
RPMD results produced from this code contributed to the paper "Quantum Rates in Dissipative Systems with Spatially Varying Friction", Bridge et al., J. Chem. Phys. (2024). For experimental data (including ML-MCTDH results), and plotting scripts for the figures in the paper, please see the paper's GitLab repository.
To clone the repository, run the following:
git clone https://github.com/olibridge01/NonlinearDissipativeSystems.git
cd NonlinearDissipativeSystems
For package management, set up a conda environment (called nl_rpmd
as an example) and install the required packages as follows:
conda create -n nl_rpmd python=3.10 anaconda
conda activate nl_rpmd
pip install -r requirements.txt
The code is designed to be run from the command line. To run a simulation, use the run_experiment.py
script in the scripts/
directory. For example, to run a simulation with a linear friction bath, use the following command:
python scripts/run_experiment.py -t [temp] --n_bathmodes [nmodes] -g [gamma] -n [nbeads] -c config.yaml -l
where [temp]
is the temperature (K), [nmodes]
is the number of bath modes, [gamma]
is the friction coefficient, [nbeads]
is the number of ring polymer beads, config.yaml
is the configuration file, and -l
is a flag that specifies linear friction.
For a nonlinear bath, omit the -l
flag:
python scripts/run_experiment.py -t [temp] --n_bathmodes [nmodes] -g [gamma] -n [nbeads] -c config.yaml
The directory structure is as follows:
.
├── figs/
├── results/
├── src/
│ ├── autocorrelation.py
│ ├── bath.py
│ ├── rate.py
│ ├── system.py
│ └── utils.py
├── scripts/
│ ├── run_experiment.py
│ └── plotters.py
├── thesis/
├── acf_example.ipynb
└── README.md
-
figs/
: Thesis figures. -
results/
: Stores simulation results. -
src/
: RPMD code.autocorrelation.py
: Code for reproducing the original RPMD paper results.bath.py
: Linear and nonlinearBathMode()
classes.rate.py
: RPMD rate constant calculation.system.py
: Linear and nonlinearSystem()
classes.utils.py
: General functions for constant temperature RPMD simulations.
-
scripts/
: Scripts for running simulations, plotting etc. -
thesis/
: Contains my Part III thesis for reference. -
acf_example.ipynb
: Example implementation ofautocorrelation.py
.
The ring polymer Hamiltonian for a 1D potential is given by
where
The
where
The Bennett-Chandler method is a useful method for computing rate constants when the event of a reactive crossing is rare. We start by expressing the RPMD rate coefficient in terms of thermal averages:
This can be written as a product of two terms:
where
where we define
where
Oli Bridge (olibridge@rocketmail.com) - St Catharine's College, Cambridge
This work is from my Part III project in the Althorpe group at the University of Cambridge, and has contributed to a publication in the Journal of Chemical Physics. If you use this code, please cite the following:
@article{bridge_quantum_2024,
title = {Quantum rates in dissipative systems with spatially varying friction},
volume = {161},
issn = {0021-9606},
url = {https://doi.org/10.1063/5.0216823},
doi = {10.1063/5.0216823},
pages = {024110},
number = {2},
journaltitle = {The Journal of Chemical Physics},
author = {Bridge, Oliver and Lazzaroni, Paolo and Martinazzo, Rocco and Rossi, Mariana and Althorpe, Stuart C. and Litman, Yair},
date = {2024-07},
}