Getting Began with PLUMED
Set up:
Not gonna lie, this will get a bit of annoying, it must be patched into your MD engine. For those who’re not serious about GROMACS as your MD engine, right here’s a hyperlink to the plumed essential web page since you’re by yourself relating to set up:
In any other case, right here’s how one can set up them each and correctly patch them. Comply with all of those instructions if in case you have neither however ignore the GROMACS set up if you have already got it put in and dealing. These instructions ought to be executed one-by-one in your terminal/command line.
#Obtain GROMACS
wget http://ftp.gromacs.org/pub/gromacs/gromacs-2021.2.tar.gz
tar xfz gromacs-2021.2.tar.gz
cd gromacs-2021.2#Set up and supply GROMACS
mkdir construct
cd construct
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
make
sudo make set up
supply /usr/native/gromacs/bin/GMXRC
#Obtain PLUMED
wget https://github.com/plumed/plumed2/releases/obtain/v2.7.1/plumed-2.7.1.tgz
tar xfz plumed-2.7.1.tgz
cd plumed-2.7.1
#set up PLUMED
./configure --prefix=/usr/native/plumed
make
sudo make set up
#Patch GROMACS
cd gromacs-2021.2
plumed patch -p
#rebuilld GROMACS
cd construct
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_PLUMED=on
make
sudo make set up
#Examine set up
gmx mdrun -plumed
You’ll discover I’ve picked an older model of gromacs; that is simply to present us a greater probability that there are not any unforseen bugs transferring via these articles, you’re greater than welcome to make use of a newer model at your discretion, simply make certain that it’s PLUMED-compatible.
Fundamental Configuration:
- Create a PLUMED enter file to outline the collective variables (CVs) that describe the system’s necessary levels of freedom.
Right here’s an instance file. I’ll go into extra element on some fancier choices in Half 3 of this text sequence, however for now we’ll begin by trying on the conformational state of a set of atoms through the use of distance and torsion as our CVs. Different potential CVs embody distances between atoms, angles, dihedrals, or extra complicated features.
# Outline collective variables
# Distance between atoms 1 and 10
DISTANCE ATOMS=1,10 LABEL=d1# Dihedral angle involving atoms 4, 6, 8, and 10
TORSION ATOMS=4,6,8,10 LABEL=t1
# Print collective variables to a file
PRINT ARG=d1,t1 FILE=COLVAR STRIDE=100
# Apply metadynamics bias
METAD ...
ARG=d1,t1 # The collective variables to bias
PACE=500 # Add a Gaussian hill each 500 steps
HEIGHT=0.3 # Top of the Gaussian hill
SIGMA=0.1,0.1 # Width of the Gaussian hill for every CV
FILE=HILLS # File to retailer the hills
BIASFACTOR=10 # Bias issue for well-tempered metadynamics
TEMP=300 # Temperature in Kelvin
... METAD
# Print the bias potential to a file
PRINT ARG=d1,t1,bias FILE=BIAS STRIDE=500
The feedback in that code block ought to be intensive sufficient for a fundamental understanding of the whole lot happening, however I’ll get to all of this in article 3, and we’ll even delve past into complicated features!
Anyway, upon getting this enter file (sometimes named plumed.dat) and the .tpr file required for an MD run utilizing GROMACS (take a look at gmx grompp documentation for producing that file), you possibly can run the metadynamics simulation by going to the working listing and typing into the command line:
gmx mdrun -s topol.tpr -plumed plumed.dat
Each PLUMED and GROMACS settle for additional arguments. I’ll go over among the extra helpful ones for each in Half 3 of this sequence of articles alongside with some of the scripts I’ve written for extra superior runs, and you may take a look at the documentation for any others.
After the simulation, use PLUMED’s evaluation instruments to reconstruct the free power floor and determine related metastable states and transition pathways. Most ubiquitous is the usage of PLUMED’s sum_hills
instrument to reconstruct the free power floor.
You possibly can check out the free power floor (FES) after that command utilizing this python code which is able to inform you how values of 1 CV relate to the opposite.
import matplotlib.pyplot as plt
import numpy as np
import plumed
from matplotlib import cm, ticker# Configure font
plt.rc('font', weight='regular', measurement=14)
# Learn information from PLUMED output
information = plumed.read_as_pandas("/path/to/COLVAR")
# Extract and reshape information for contour plot
# Regulate the reshape parameters as wanted, They need to multiply to the
# variety of bins and be as shut to one another as doable
d1 = information["d1"].values.reshape(-1, 100)
t1 = information["t1"].values.reshape(-1, 100)
bias = information["bias"].values.reshape(-1, 100)
# Plot contour strains
plt.contour(d1, t1, bias, ranges=np.arange(np.min(bias), np.max(bias), 10), linewidths=0.3, colours='okay')
# Plot stuffed contour
cntr = plt.contourf(d1, t1, bias, ranges=np.arange(0, 100), cmap=cm.jet)
# Add colorbar
plt.colorbar(cntr, label="u0394G [kJ/mol]")
# Set plot limits and labels
plt.xlim(np.min(d1), np.max(d1))
plt.ylim(np.min(t1), np.max(t1))
plt.xlabel("Distance between atoms 1 and 10 (d1) [nm]")
plt.ylabel("Dihedral angle involving atoms 4, 6, 8, and 10 (t1) [degrees]")
# Present plot
plt.present()
The output ought to look just like the topographical graph I posted earlier on (I can’t provide you with what your FESwill appear like since you had the liberty of selecting your individual system).
You must also visualize the outcomes utilizing well-liked visualization software program like VMD to achieve insights into the molecular conduct in low power and metastable states.
Conclusion
Metadynamics, powered by PLUMED, gives a sturdy framework for exploring complicated molecular programs. By effectively sampling the free power panorama, we are able to uncover hidden mechanisms in molecular programs that may’t be achieved via conventional MD attributable to computational constraints.
Whether or not you’re a novice or an skilled researcher, mastering PLUMED can considerably improve your computational chemistry toolkit, so don’t overlook to take a look at my upcoming two articles that can assist you go from newbie to professional!
Article 2 will unveil the mathematical ideas behind including metadynamics elements to an MD engine, and Article 3 will expose you to superior methods in metadynamics reminiscent of a number of walker metadynamics, condensing greater than 2 variables right into a readable format, using metadynamics on high-performance clusters, and extra in-depth analytical methods to visualise and quantitatively analyze your system outcomes (with loads of pattern code).