HomeAIUnveiling Metadynamics. Unlock the facility of metadynamics with… | by Don Robert...

Unveiling Metadynamics. Unlock the facility of metadynamics with… | by Don Robert Stimpson | Jun, 2024


Getting Began with PLUMED

Set up:

TrendWired Solutions
IGP [CPS] WW
Managed VPS Hosting from KnownHost
Aiseesoft FoneLab - Recover data from iPhone, iPad, iPod and iTunes

Not gonna lie, this will get slightly annoying, it must be patched into your MD engine. In the event you’re not keen on GROMACS as your MD engine, right here’s a hyperlink to the plumed primary web page since you’re by yourself relating to set up:

In any other case, right here’s the best way to set up them each and correctly patch them. Comply with all of those instructions you probably have neither however ignore the GROMACS set up if you have already got it put in and dealing. These instructions needs 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 offer us a greater probability that there aren’t any unforseen bugs shifting by these articles, you’re greater than welcome to make use of a more moderen model at your discretion, simply make positive that it’s PLUMED-compatible.

Primary 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 sequence, however for now we’ll begin by trying on the conformational state of a set of atoms by utilizing distance and torsion as our CVs. Different potential CVs embody distances between atoms, angles, dihedrals, or extra complicated capabilities.

# 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 needs to be in depth sufficient for a fundamental understanding of every thing 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 (have a look at gmx grompp documentation for producing that file), you’ll be able to 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 further 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 have a look at the documentation for any others.

After the simulation, use PLUMED’s evaluation instruments to reconstruct the free vitality floor and determine related metastable states and transition pathways. Most ubiquitous is the usage of PLUMED’s sum_hills instrument to reconstruct the free vitality floor.

You’ll be able to check out the free vitality floor (FES) after that command utilizing this python code which can let you know 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', dimension=14)

# Learn knowledge from PLUMED output
knowledge = plumed.read_as_pandas("/path/to/COLVAR")

# Extract and reshape knowledge 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 attainable
d1 = knowledge["d1"].values.reshape(-1, 100)
t1 = knowledge["t1"].values.reshape(-1, 100)
bias = knowledge["bias"].values.reshape(-1, 100)

# Plot contour traces
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 much like the topographical graph I posted earlier on (I can’t provide you with what your FESwill seem like since you had the liberty of selecting your personal system).

You must also visualize the outcomes utilizing fashionable visualization software program like VMD to achieve insights into the molecular habits in low vitality and metastable states.

Conclusion

Metadynamics, powered by PLUMED, affords a strong framework for exploring complicated molecular programs. By effectively sampling the free vitality panorama, we will uncover hidden mechanisms in molecular programs that may’t be achieved by 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 will help you go from newbie to knowledgeable!

Article 2 will unveil the mathematical ideas behind including metadynamics elements to an MD engine, and Article 3 will expose you to superior strategies in metadynamics comparable to 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 strategies to visualise and quantitatively analyze your system outcomes (with loads of pattern code).



Supply hyperlink

latest articles

TurboVPN WW
Wicked Weasel WW

explore more