Skip to content

Lagrangian formulation of Doob's h-transform allowing for efficient rare event sampling

License

Notifications You must be signed in to change notification settings

plainerman/Variational-Doob

Repository files navigation

Doob’s Lagrangian: A Sample-Efficient Variational Approach to Transition Path Sampling

In this work, we propose a novel variational approach to transition path sampling (TPS) based on the Doob’s h-transform. Our method can be used to sample transition paths between two meta-stable states of molecular systems.

Visualization of alanine dipeptide transitioning between two meta-stable states

Setup

You can use the environment.yml file to setup this project. However, it only works on CPU.

conda env create -f environment.yml

Getting started

The best way to get started is to look at the jupyter notebooks which contain code for the Müller-Brown potential. There is one for the first order Langevin dynamics and one for the second order Langevin dynamics.

Running the baselines

To run the baselines (i.e., TPS with shooting) you can run

python tps_baseline_mueller.py
python eval/evaluate_mueller.py

and

python tps_baseline.py --mechanism two-way-shooting --num_paths 1000 --states phi-psi
# num_steps compiles multiple MD steps into a single one, making sampling faster. But this makes startup longer. Only really worth it for long running simulations
python tps_baseline.py --mechanism two-way-shooting --num_paths 100 --fixed_length 1000 --states phi-psi --num_steps 50
python tps_baseline.py --mechanism two-way-shooting --num_paths 1000 --states rmsd
python eval/evaluate_tps.py

respectively. In both cases, you might need to change the paths that you want to evaluate.

Run our method

To sample trajectories with our method, we provide ready to go config files in configs/. You can run them with

python main.py --config configs/toy/mueller_single_gaussian.yaml
python main.py --config configs/toy/dual_channel_single_gaussian.yaml
python main.py --config configs/toy/dual_channel_two_gaussian.yaml

for the toy examples and

python main.py --config configs/aldp_diagonal_single_gaussian.yaml

for real molecular systems.