Skip to content
Snippets Groups Projects
Commit 0724fc99 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

BELFAST tutorials 1 and 8

parent 49a81bb6
No related branches found
No related tags found
No related merge requests found
user-doc/figs/belfast-8-mg1.png

122 KiB

...@@ -262,8 +262,7 @@ PRINT ARG=abeta.less_than,dd.mean,dd.min,dd.max,dd.moment-2 STRIDE=1 FILE=COLVAR ...@@ -262,8 +262,7 @@ PRINT ARG=abeta.less_than,dd.mean,dd.min,dd.max,dd.moment-2 STRIDE=1 FILE=COLVAR
HISTOGRAM ... HISTOGRAM ...
ARG=abeta.less_than,dd.mean ARG=abeta.less_than,dd.mean
USE_ALL_DATA USE_ALL_DATA
FREQUENCY KERNEL=discrete
KERNEL=NONE
GRID_MIN=0,0.8 GRID_MIN=0,0.8
GRID_MAX=4,1.2 GRID_MAX=4,1.2
GRID_BIN=40,40 GRID_BIN=40,40
...@@ -276,10 +275,9 @@ ENDPLUMED ...@@ -276,10 +275,9 @@ ENDPLUMED
NOTE: HISTOGRAM ... means that what follow is part of the \ref HISTOGRAM function, the same can be done for any action NOTE: HISTOGRAM ... means that what follow is part of the \ref HISTOGRAM function, the same can be done for any action
in PLUMED. in PLUMED.
The above input tells PLUMED to accumulate the two collective variables on a GRID. Histogram can be accumulated The above input tells PLUMED to accumulate the two collective variables on a GRID. In addition the
to obtain a probability density instead of the frequence by removing the keyword FREQUENCY. In addition the probability can be converted to a free-energy using the flag FREE-ENERGY and setting the temperature using TEMP (i.e. 300K).
frequency can be converted to a free-energy using the flag FREE-ENERGY and setting the temperature using TEMP (i.e. 300K). Histograms can be accumulated in a smoother way by using a KERNEL function, a kernel is a normalised function,
Histogram can be accumulated in a smoother way by using a KERNEL function, a kernel is a normalised function,
for example a normalised gaussian is the default kernel in PLUMED, that is added to the histogram centered in the position of the data. for example a normalised gaussian is the default kernel in PLUMED, that is added to the histogram centered in the position of the data.
Estimating a probability density using kernels can in principle give more accurate results, on the other hand in Estimating a probability density using kernels can in principle give more accurate results, on the other hand in
addition to the choice of the binning one has to choose a parameter that is the WIDTH of the kernel function. addition to the choice of the binning one has to choose a parameter that is the WIDTH of the kernel function.
...@@ -290,7 +288,6 @@ and the BANDWIDTH should be smaller (i.e. one order of magnitude) than the varia ...@@ -290,7 +288,6 @@ and the BANDWIDTH should be smaller (i.e. one order of magnitude) than the varia
HISTOGRAM ... HISTOGRAM ...
ARG=abeta.less_than,dd.mean ARG=abeta.less_than,dd.mean
USE_ALL_DATA USE_ALL_DATA
FREQUENCY
GRID_MIN=0,0.8 GRID_MIN=0,0.8
GRID_MAX=4,1.2 GRID_MAX=4,1.2
GRID_SPACING=0.04,0.004 GRID_SPACING=0.04,0.004
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
\section Aims \section Aims
The aim of this tutorial is to introduce the users to the use of Bias-Exchange Metadynamics. We will go through the writing of The aim of this tutorial is to introduce the users to the use of Bias-Exchange Metadynamics. We will go through the writing of
the input files for BEMETA for a simple case of three alanines and we will use METAGUI to to analyse them. We will compare the input files for BEMETA for a simple case of three peptide and we will use METAGUI to to analyse them. We will compare
the results of WT-BEMETA and STANDARD-BEMETA with four independent runs on the four Collective Variables. Finally we will the results of WT-BEMETA and STANDARD-BEMETA with four independent runs on the four Collective Variables. Finally we will
use a simplified version of BEMETA that is Multiple Walkers Metadynamics. use a simplified version of BEMETA that is Multiple Walkers Metadynamics.
...@@ -18,10 +18,10 @@ Once this tutorial is completed students will: ...@@ -18,10 +18,10 @@ Once this tutorial is completed students will:
\section Resources \section Resources
The <a href="tutorial-resources/belfast-8.tar.gz" download="belfast-8.tar.gz"> tarball </a> for this project contains the following files: The <a href="tutorial-resources/belfast-8.tgz" download="belfast-8.tgz"> tarball </a> for this project contains the following files:
- trajectory-short.xyz : a (short) trajectory for a 16 residue protein in xyz format. All calculations with plumed driver use this trajectory. - system folder: a starting structure for Val-Ile-Leu system
- template.pdb : a single frame from the trajectory that can be used in conjuction with the \ref MOLINFO command - WTBX: a run of Well-Tempered Bias-Exchange Metadynamics ready for the analysis
\section Instructions \section Instructions
...@@ -59,7 +59,7 @@ Each trajectory evolves through the high dimensional free energy landscape in th ...@@ -59,7 +59,7 @@ Each trajectory evolves through the high dimensional free energy landscape in th
different metadynamics potentials acting on one CV at each time. different metadynamics potentials acting on one CV at each time.
The results of the simulation are N one-dimensional projections of the free energy. The results of the simulation are N one-dimensional projections of the free energy.
In the following example, a bias-exchange simulation is performed on a Val-Ile-Leu peptide (zwitterionic form, in vacuum with In the following example, a bias-exchange simulation is performed on a VIL peptide (zwitterionic form, in vacuum with
\f$ \epsilon=80 \f$, force field amber03), using the four backbone dihedral angles as CVs. \f$ \epsilon=80 \f$, force field amber03), using the four backbone dihedral angles as CVs.
Four replicas of the system are employed, each one biased on a different CV, Four replicas of the system are employed, each one biased on a different CV,
...@@ -104,13 +104,181 @@ The four replicas start from the same GROMACS topology file replicated four time ...@@ -104,13 +104,181 @@ The four replicas start from the same GROMACS topology file replicated four time
Finally, GROMACS is launched as a parallel run on 4 cores, with one replica per core, with the command Finally, GROMACS is launched as a parallel run on 4 cores, with one replica per core, with the command
\verbatim \verbatim
mpirun -np 4 mdrun_mpi -s topol -plumed plumed -multi 4 -replex 1000 >& log & mpirun -np 4 mdrun_mpi -s topol -plumed plumed -multi 4 -replex 2000 >& log &
\endverbatim \endverbatim
where -replex 1000 indicates that every 1000 molecular-dynamics steps where -replex 2000 indicates that every 2000 molecular-dynamics steps
all replicas are randomly paired (e.g. 0-2 and 1-3) and exchanges are attempted all replicas are randomly paired (e.g. 0-2 and 1-3) and exchanges are attempted
between each pair (as printed in the GROMACS *.log files). between each pair (as printed in the GROMACS *.log files).
The same simulation can be run using WELLTEMPERED metadynamics.
\subsection bxcon Convergence of the Simulations
In the resources for this tutorial you can find the results for a 40ns long Well-Tempered Bias Exchange simulation. First of all we
can try to assess the convergence of the simulations by looking at the profiles. In the "convergence" folder there is a script that
calculates the free energy from the HILLS.0 file at incresing simulation lengths (i.e. every more 0.8 ns of simulation). The
scripts also generate two measures of the evolution of the profiles in time:
1. time-diff.HILLS.0: where it is stored the average deviation between two successive profiles
2. KL.HILLS.0: where it is stored the average deviation between profiles correctly weigheted for the free energy of the profiles themselves (Symmetrized Kullback-Lieber divergence)
From both plots one can deduce that after 8 ns the profiles don't change significantly thus suggesting that averaging over the range 8-40ns should result in
a accurate profile (we will test this using metagui).
\subsection metagui Bias-Exchange Analysis with METAGUI
In principle Bias-Exchange Metadynamics can give as a results only N 1D free energy profiles. But the information
contained in all the replicas can be used to recover multidensional free energy surfaces in >=N dimensions. A simple
way to perform this analysis is to use METAGUI. METAGUI performs the following operations:
1. Clusterizes the trajectories on a multidimensional GRID defined by at least the biased coordinates.
2. By using the 1D free energy profiles and the clustering assigns a free energy to the cluster using a WHAM procedure.
3. Lets the user visualize the clusters.
4. Approximates the kinetics among clusters.
METAGUI (Biarnes et. al) is a plugin for VMD that implements the approch developed by Marinelli et. al 2009. It can be
downloaded from the PLUMED website.
In order for the colvar and hills file to be compatible with METAGUI their header must be formatted as following:
COLVAR.#:
\verbatim
#! FIELDS time cv1 cv2 cv3 cv4
#! ACTIVE 1 1 A
#! ..
...
\endverbatim
NOTE:
1. the COLVAR.# files should contain ALL the collective variables employed (all those biased in at least one replica plus those additionaly analysed). They MUST be named cv1 ... cvN.
2. the COLVAR.# files must be synchronised with the trajectories, this means that for each frame in the trajectory at time t there must be a line in each colvar at time t and viceversa. The best option is usually to analyse the trajectories a posteriori using plumed driver.
3. a keyword #! ACTIVE NBIASEDCV BIASEDCV LABEL is needed, where NBIASEDCV is the number of biased cv in that replica (not overall), BIASEDCV is the index of the biased cv in that replica (i.e. 1 for the first replica and so on); LABEL is a letter that identify the replica (usually is simply A for the first, B for the second and so on) this is usufull if two replicas are biasing the same collective variable:
\verbatim
COLVAR.0:
#! FIELDS time cv1 cv2 cv3
#! ACTIVE 1 1 A
#! ..
...
COLVAR.1:
#! FIELDS time cv1 cv2 cv3
#! ACTIVE 1 2 B
#! ..
...
COLVAR.2:
#! FIELDS time cv1 cv2 cv3
#! ACTIVE 1 2 C
#! ..
...
COLVAR.3:
#! FIELDS time cv1 cv2 cv3
#! ACTIVE 0
#! ..
...
\endverbatim
In the above case Replica 0 biases cv1; replicas 1 and 2 biases cv2 while replica 3 is a neutral (unbiased) replica. cv3 is unbiased in all the replicas.
The ACTIVE keyword must be the FIRST LINE in the HILLS.# files:
HILLS.#:
\verbatim
#! ACTIVE 1 1 A
#! FIELDS time cv1 sigma_cv1 height biasf
#! ..
...
\endverbatim
The above notes hold for the HILLS files as well. In the folder metagui the script check_for_metagui.sh checks if the header of your file is compatible
with METAGUI, but remember that this is not enough! Synchronisation of COLVAR and trajctory files is also needed. HILLS files can be written with a
different frequency but times must be consistent.
\verbatim
./check_for_metagui.sh ../COLVAR.0
\endverbatim
will tell you that the ACTIVE keyword is missing, you need to modify all the header BEFORE proceeding with the tutorial!!
In the metagui folder there is a metagui.input file:
\verbatim
WHAM_EXE wham_bemeta.x
BASINS_EXE kinetic_basins.x
KT 2.4900
HILLS_FILE ../HILLS.0
HILLS_FILE ../HILLS.1
HILLS_FILE ../HILLS.2
HILLS_FILE ../HILLS.3
GRO_FILE VIL.pdb
COLVAR_FILE ../COLVAR.0 ../traj0.xtc "psi-1"
COLVAR_FILE ../COLVAR.1 ../traj1.xtc "phi-2"
COLVAR_FILE ../COLVAR.2 ../traj2.xtc "psi-2"
COLVAR_FILE ../COLVAR.3 ../traj3.xtc "phi-3"
TRAJ_SKIP 10
CVGRID 1 -3.1415 3.1415 15 PERIODIC
CVGRID 2 -3.1415 3.1415 15 PERIODIC
CVGRID 3 -3.1415 3.1415 15 PERIODIC
CVGRID 4 -3.1415 3.1415 15 PERIODIC
ACTIVE 4 1 2 3 4
T_CLUSTER 0.
T_FILL 8000.
DELTA 4
GCORR 1
TR_N_EXP 5
\endverbatim
where are defined the temperature in energy units, the place where to find COLVAR, HILLS and trajectory files. A reference gro or pdb file
is needed to load the trajectories. The definition of the ranges and the number of bins for the available collective variables.
Now let's start with the analysis:
1. run VMD and load metagui
2. in metagui load the metagui.input file \ref belfast-8-mg1-fig
3. In the left section of the interface "load all" the trajectories
4. Find the Microstates
In order to visualise the microstate it is convenient to align all the structures using the VMD RMSD Trajectory tool that can be found
in Extensions->Analysis.
One or more microstates can be visualised by selecting them and clicking show.
You can sort the microstate using the column name tabs, for example by clicking on size the microstates will be ordered from the larger
to the smaller. If you look at the largest one it is possible to observe that by using the four selected collective variables the backbone
conformation of the peptide is well defined while the sidechains can populate different rotameric states.
The equilibrium time in the analysis panel should be such that by averaging over the two halves of the remind of the simulation the profiles
are the same (i.e the profile averaged between Teq and Teq+(Ttot-Teq)/2 should be the same of that averaged from Teq+(Ttot-Teq)/2 and Ttot).
By clicking on COMPUTE FREE ENERGIES, the program will first generate the 1D free energy profiles from the HILLS files and then run
the WHAM analysis on the microstates. Once the analysis is done it is possible to visually check the convergence of the 1D profiles one by
one by clicking on the K bottons next to the HILLS.# files. The BLUE and the RED profiles are the two profiles just defined, while the GREEN
is the average of the two. Now it is possible for example to sort the microstates as a function of the free energy and save them by dumping
the structures for further analysis.
\anchor belfast-8-mg1-fig
\image html belfast-8-mg1.png "METAGUI Interface after loading metagui.input file"
If you look in the metagui folder you will see a lot of files, some of them can be very usefull:
metagui/MICROSTATES: is the content of the microstates list table
metagui/WHAM_RUN/VG_HILLS.#: are the opposite of the free energies calculated from the hills files
metagui/WHAM_RUN/*.gnp: are gnuplot input files to plot the VG_HILLS.# files (i.e. gnuplot -> load "convergence..")
metagui/WHAM_RUN/FES: is the result of the WHAM, for each cluster there is its free energy and the error estimate from WHAM
\verbatim
gnuplot> plot [0:40]'FES' u 2:3
\endverbatim
plots the microstate error in the free energy estimate as a function of the microstates free energy.
\Reference
This tutorial is freely inspired to the work of Biarnes et al.
More materials can be found in
1. Marinelli, F., Pietrucci, F., Laio, A. & Piana, S. A kinetic model of trp-cage folding from multiple biased molecular dynamics simulations. PLoS Comput. Biol. 5, e1000452 (2009).
2. Biarnés, X., Pietrucci, F., Marinelli, F. & Laio, A. METAGUI. A VMD interface for analyzing metadynamics and molecular dynamics simulations. Comput. Phys. Commun. 183, 203–211 (2012).
3. Baftizadeh, F., Cossio, P., Pietrucci, F. & Laio, A. Protein folding and ligand-enzyme binding from bias-exchange metadynamics simulations. Current Physical Chemistry 2, 79–91 (2012).
*/ */
...@@ -118,4 +286,5 @@ link: @subpage belfast-8 ...@@ -118,4 +286,5 @@ link: @subpage belfast-8
description: Bias exchange and multiple walkers description: Bias exchange and multiple walkers
additional-files: belfast-8.tgz
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment