Getting Began with PLUMED
Set up:
Not gonna lie, this will get a little bit annoying, it must be patched into your MD engine. In case you’re not fascinated with GROMACS as your MD engine, right here’s a hyperlink to the plumed principal web page since you’re by yourself concerning set up:
In any other case, right here’s the right way to set up them each and correctly patch them. Comply with all of those instructions when 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 GROMACSwget http://ftp.gromacs.org/pub/gromacs/gromacs-2021.2.tar.gztar xfz gromacs-2021.2.tar.gzcd gromacs-2021.2
#Set up and supply GROMACSmkdir buildcd buildcmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ONmakesudo make installsource /usr/native/gromacs/bin/GMXRC
#Obtain PLUMEDwget https://github.com/plumed/plumed2/releases/obtain/v2.7.1/plumed-2.7.1.tgztar xfz plumed-2.7.1.tgzcd plumed-2.7.1
#set up PLUMED./configure –prefix=/usr/native/plumedmakesudo make set up
#Patch GROMACScd gromacs-2021.2plumed patch -p
#rebuilld GROMACScd buildcmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_PLUMED=onmakesudo make set up
#Test installationgmx mdrun -plumed
You’ll discover I’ve picked an older model of gromacs; that is simply to present us a greater likelihood that there aren’t any unforseen bugs transferring by way of these articles, you’re greater than welcome to make use of a newer model at your discretion, simply make positive that it’s PLUMED-compatible.
Fundamental Configuration:
Create a PLUMED enter file to outline the collective variables (CVs) that describe the system’s vital 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 collection, 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 embrace distances between atoms, angles, dihedrals, or extra complicated capabilities.
# Outline collective variables# Distance between atoms 1 and 10DISTANCE ATOMS=1,10 LABEL=d1
# Dihedral angle involving atoms 4, 6, 8, and 10TORSION ATOMS=4,6,8,10 LABEL=t1
# Print collective variables to a filePRINT ARG=d1,t1 FILE=COLVAR STRIDE=100
# Apply metadynamics biasMETAD …ARG=d1,t1 # The collective variables to biasPACE=500 # Add a Gaussian hill each 500 stepsHEIGHT=0.3 # Top of the Gaussian hillSIGMA=0.1,0.1 # Width of the Gaussian hill for every CVFILE=HILLS # File to retailer the hillsBIASFACTOR=10 # Bias issue for well-tempered metadynamicsTEMP=300 # Temperature in Kelvin… METAD
# Print the bias potential to a filePRINT ARG=d1,t1,bias FILE=BIAS STRIDE=500
The feedback in that code block ought to be intensive sufficient for a fundamental understanding of all the pieces occurring, however I’ll get to all of this in article 3, and we’ll even delve past into complicated capabilities!
Anyway, after getting this enter file (usually 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 may 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 a number of the extra helpful ones for each in Half 3 of this collection of articles alongside with some of the scripts I’ve written for extra superior runs, and you’ll 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 device to reconstruct the free power floor.
You may 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 pltimport numpy as npimport plumedfrom matplotlib import cm, ticker
# Configure fontplt.rc(‘font’, weight=’regular’, measurement=14)
# Learn information from PLUMED outputdata = plumed.read_as_pandas(“/path/to/COLVAR”)
# Extract and reshape information for contour plot# Modify the reshape parameters as wanted, They need to multiply to the# variety of bins and be as shut to one another as possibled1 = information[“d1”].values.reshape(-1, 100)t1 = information[“t1”].values.reshape(-1, 100) bias = information[“bias”].values.reshape(-1, 100)
# Plot contour linesplt.contour(d1, t1, bias, ranges=np.arange(np.min(bias), np.max(bias), 10), linewidths=0.3, colours=’okay’)
# Plot crammed contourcntr = plt.contourf(d1, t1, bias, ranges=np.arange(0, 100), cmap=cm.jet)
# Add colorbarplt.colorbar(cntr, label=”u0394G [kJ/mol]”)
# Set plot limits and labelsplt.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 plotplt.present()
The output ought to look just like the topographical graph I posted earlier on (I can’t offer you what your FESwill seem like since you had the liberty of selecting your individual system).
You also needs to visualize the outcomes utilizing in style visualization software program like VMD to realize insights into the molecular conduct in low power and metastable states.
Conclusion
Metadynamics, powered by PLUMED, affords a strong 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 by way of conventional MD as a consequence of 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 neglect to take a look at my upcoming two articles that will help 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 resembling 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).