Accelerated Weight Histogram method¶
Here we learn how to calculate the potential of mean force (PMF) along a reaction coordinate (RC) using the accelerated weight histogram method (AWH) in GROMACS. We will go through both how to set up the input files, as well as how to extract and analyze the output after the simulation is complete. AWH applies a time-dependent bias potential along the chosen RC, which is tuned during the simulation such that it “flattens” the barriers of the PMF to improve sampling along the RC.
The tutorial is provided as an interactive Jupyter notebook based on GROMACS. You can run the tutorial online in your browser without installing anything, or download it to run locally with your own installed software.
Running this tutorial online¶
These tutorials are provided online for you for free thanks to mybinder.org and their sponsors.
Click to run a free online interactive binder at MyBinder.org. It will take several minutes to launch.
Alternatively, click to run a free online interactive binder at BioExcel-Binder, which will also take several minutes to launch. Note that a GitHub account is required to access BioExcel-Binder.
Running the tutorial offline¶
You will need to install some software on the terminal command line to be able to run the tutorial offline. Jupyter notebooks are built on Python, and the GROMACS tutorial content needs various other Python packages as well. Please follow the instructions below for your operating system to get a suitable terminal.
For MacOS users¶
You can use the standard Terminal app. You can launch a terminal via spotlight search, either click the magnifying glass icon in the top-left corner or press the Command-space key combination. Then type “Terminal” and press Return, and a terminal window will appear for you to use.
For Windows users¶
We strongly recommend to use (and install if necessary) the Windows Subsystem for Linux, WSL. Inside it, you will need Python 3 and the conda Python environment manager. A useful guide to doing this is found at https://github.com/kapsakcj/win10-linux-conda-how-to.
For Linux users¶
You can use the standard terminal. Press the ‘Ctrl-Alt-T` key combination and a terminal window will appear for you to use.
For all users once you have a terminal¶
First, install miniconda for Python 3 by following https://docs.conda.io/en/latest/miniconda.html#linux-installers
Then download an archive of the notebook and supporting files from this link
Save it to e.g. the “Downloads” folder in your home folder.
Open a command-line terminal, make a folder to run the tutorial, and change into it:
mkdir awh-tutorial cd awh-tutorial
Unpack the files with
If this fails, you may need to install the unzip program, e.g. with sudo apt-get install unzip and then try again.
Now, use miniconda to make the environment for the GROMACS tutorials with:
# For all users, Linux, MacOS, and Windows users conda env create --name awh-tutorial --file environment.yml
Activate it with:
conda activate awh-tutorial
Finally, you can launch the Jupyter notebook for the tutorial in your browser with