diff --git a/user-doc/figs/belfast-7-ptmetadh.pdf b/user-doc/figs/belfast-7-ptmetadh.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1bab5709d3e739350f590a9f7353dc0e2a655291 Binary files /dev/null and b/user-doc/figs/belfast-7-ptmetadh.pdf differ diff --git a/user-doc/figs/belfast-7-ptmetadhidd.pdf b/user-doc/figs/belfast-7-ptmetadhidd.pdf new file mode 100644 index 0000000000000000000000000000000000000000..49aac7c2cec91c29df12420b942663f8647d88fe Binary files /dev/null and b/user-doc/figs/belfast-7-ptmetadhidd.pdf differ diff --git a/user-doc/tutorials/belfast-7.txt b/user-doc/tutorials/belfast-7.txt index 9804871f256a63e08655c52c62c85be4c9830a0b..2211674f29b3a883e43e60583398d133462129cf 100644 --- a/user-doc/tutorials/belfast-7.txt +++ b/user-doc/tutorials/belfast-7.txt @@ -148,7 +148,7 @@ As we did in our previous tutorial, we can now use the script analyze_FES.sh to difference between basin A (-3.0<phi<-1.0) and basin B (0.5<phi<1.5), as a function of simulation time. \anchor belfast-7-ptfes-fig -\image html belfast-7-ptfes.png "Free-energy difference between basin A and B as a function of simulation time." +\image html belfast-7-ptfes.png "Free-energy difference at 300K between basin A and B as a function of simulation time." The estimate of the free-energy difference between these two basins seems to be converged. This consideration, along with the observation that the system is exploring all the relevant free-energy basins, might lead us to declare @@ -246,10 +246,10 @@ We need to create the replica_temp.xvg and replica_index.xvg: demux.pl md0.log \endverbatim -and plot the content of replica_temp.xvg. Here how it should look for replica 0: +and plot the content of replica_temp.xvg. Here how it should look for Replica 0: \anchor belfast-7-pt2temp-fig -\image html belfast-7-pt2temp.png "Temperature index of the first replica as a function of simulation time." +\image html belfast-7-pt2temp.png "Temperature index of Replica 0 as a function of simulation time." From this analysis, we can conclude that replicas are diffusing effectively in temperature. Now, we need to monitor the space sampled by each replica while diffusing in temperature space @@ -271,13 +271,80 @@ while efficiently diffusing in temperature. We can then calculate the free-energ basin A and B as a function of simulation time at 300K: \anchor belfast-7-pt2fes-fig -\image html belfast-7-pt2fes.png "Free-energy difference between basin A and B as a function of simulation time." - +\image html belfast-7-pt2fes.png "Free-energy difference at 300K between basin A and B as a function of simulation time." and conclude that in this case the PT simulation is converged. \subsection belfast-7-exercise-3 Exercise 3. Setup and run a PTMetaD simulation +In this exercise we will learn how to combine PT with metadynamics. +We will use the setup of the previous exercise, and run a PT simulations with +4 replicas at the following temperatures: 300K, 400K, 600K, and 1000K. +Each simulation will perform a well-tempered metadynamics calculation, using the dihedral +psi alone as CV and a biasfactor equal to 10 (see \ref belfast-6-exercise-5). + +Previously, we prepared a single PLUMED input file to run a PT simulation. This was enough, +since in that case the same task was performed at all temperatures. Here instead we need to have a slightly +different PLUMED input file for each simulation, since we need to use the keyword TEMP to +specify the temperature on the line of the \ref METAD directory. We will thus prepare 4 input +files, called plumed.dat.0, plumed.dat.1, plumed.dat.2, and plumed.dat.3, with a different +value for the keyword TEMP. Here how plumed.dat.3 should look like: + +\verbatim +# set up two variables for Phi and Psi dihedral angles +phi: TORSION ATOMS=5,7,9,15 +psi: TORSION ATOMS=7,9,15,17 +# +# Activate metadynamics in psi +# depositing a Gaussian every 500 time steps, +# with height equal to 1.2 kJoule/mol, +# and width 0.35 rad. +# Well-tempered metadynamics is activated, +# and the biasfactor is set to 10.0 +# +metad: METAD ARG=psi PACE=500 HEIGHT=1.2 SIGMA=0.35 FILE=HILLS BIASFACTOR=10.0 TEMP=1000.0 + +# monitor the two variables and the metadynamics bias potential +PRINT STRIDE=10 ARG=phi,psi,metad.bias FILE=COLVAR + +\endverbatim +(see \ref TORSION, \ref METAD, and \ref PRINT). + +The PTMetaD simulation is executed in the same way as the PT: + +\verbatim + mpirun -np 4 mdrun_mpi -s TOPO/topol -plumed -multi 4 -replex 100 +\endverbatim + +and it will produce one COLVAR and HILLS file per temperature (COLVAR.0, HILLS.0, ...). +The analysis of the results requires what we have learned in the previous exercise +for the PT case (analysis of the replica diffusion in temperature and demuxing of each +replica trajectory), and the post-processing of a well-tempered metadynamics simulation +(FES calculation using \ref sum_hills and convergence analysis). + +Since in the previous tutorial we performed the same well-tempered metadynamics simulation +without the use of PT (see \ref belfast-6-exercise-5), here we can focus on the differences with +the PTMetaD simulation. Let's compare the behavior of the biased variable psi in the two simulations: + +\anchor belfast-7-ptmetadh-fig +\image html belfast-7-ptmetadh.pdf "Time serie of the biased CV psi in a well-tempered metadynamics and PTMetaD simulations." + +In well-tempered metadynamics (left panel), the biased variable psi looked stuck early in the simulation (t=3 ns). +The reason was the transition of the other hidden degree of freedom phi from one free-energy basin +to the other. In the PTMetaD case (right panel), this seems not to happen. To better appreciate the difference, +we can plot the time evolution of the hidden degree of freedom phi in the two cases. + +\anchor belfast-7-ptmetadhidd-fig +\image html belfast-7-ptmetadhidd.pdf "Time serie of the CV phi in a well-tempered metadynamics and PTMetaD simulations." + +Thanks to the excursions at high temperature, in the PTMetaD simulation the transition of the CV phi +between the two basins is accelerate. As a result, the convergence of the reconstructed free energy in psi +will be accelerated. This simple exercise demonstrates how PTMetaD can be used to cure a bad choice of metadynamics CVs +and the neglecting of slow degrees of freedom. + + + + \subsection belfast-7-exercise-4 Exercise 4. The Well-Tempered Ensemble