exercises:common:mtd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:common:mtd [2024/02/22 13:58] – [Introduction] fnunes | exercises:common:mtd [2024/06/18 10:51] (current) – [Second task: metadynamics of the dynamic equilibrium between formic acid and water on rutile (110)] fnunes | ||
---|---|---|---|
Line 10: | Line 10: | ||
* Metadynamics simulation to trigger the replacement of an adsorbed formate/ | * Metadynamics simulation to trigger the replacement of an adsorbed formate/ | ||
+ | All relevant files can be downloaded {{ : | ||
===== First task: dynamics of formic acid and water molecules on rutile (110) ===== | ===== First task: dynamics of formic acid and water molecules on rutile (110) ===== | ||
- | ===== Exercise | + | |
+ | In the proposed example, formic acid molecules are initially adsorbed onto the rutile surface as formate and H$^+$, with some water molecules co-adsorbed and some others in the vicinity of the system. HCOO$^-$ is bound either in a bridged, bidentate way to surface titanium atoms or in a monodentate manner, with only one of its oxygen atoms bonded to a lattice Ti. The corresponding proton is attached to a lattice oxygen atom forming a hydroxyl. | ||
+ | |||
+ | The model we are using is fully periodic, and enough space must be left above the free water molecules to avoid interactions with the images along the z-direction. Here, we added a ~20 Å vacuum. | ||
+ | |||
+ | < | ||
+ | &CELL | ||
+ | ABC 19.659 17.806 33.110 | ||
+ | ALPHA_BETA_GAMMA 90 90 90 | ||
+ | PERIODIC XYZ | ||
+ | &END CELL | ||
+ | </ | ||
+ | |||
+ | The first step is to perform simple MD simulations for a few picoseconds at a constant temperature to monitor possible rearrangements of the adsorbates. In this case, the initial equilibration of the whole system is obtained by a short MD run of 10 ps, at 300 K. A top view of the surface after MD is shown in the figure below, and the corresponding coordinates of the system are given in {{ : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The next step is to set up a few collective variables (CV) that can be later used for the metadynamics (MTD) simulations. These CVs have to be carefully chosen and must describe the relevant configuration changes one aims to describe. It might also be useful to study the typical behavior of the selected CVs along an unbiased MD run by performing preliminary runs to monitor the dynamics of these variables. To do so, an MTD simulation needs to be set up without the addition of any type of bias. | ||
+ | |||
+ | < | ||
+ | & | ||
+ | & | ||
+ | DO_HILLS .FALSE. | ||
+ | … | ||
+ | &END METADYN | ||
+ | &END FREE_ENERGY | ||
+ | </ | ||
+ | |||
+ | The evolution of the chosen variables is then monitored while the system explores the configurations around the initial structure, i.e., belonging to the initial minimum on the free energy surface (FES). Understanding the typical fluctuation amplitudes of the CVs is important for two reasons: i) one learns which variations of the CV can occur spontaneously and would not need to be biased, and in which cases the CV cannot move without activation, and ii) one would be able to appropriately set up the width of the Gaussian hills that will build up the potential along the biased MTD simulation. | ||
+ | |||
+ | To save computational resources, the previously obtained trajectory can be used by simply setting up a [[https:// | ||
+ | |||
+ | < | ||
+ | &MD | ||
+ | ENSEMBLE REFTRAJ | ||
+ | STEPS 20596 | ||
+ | & | ||
+ | TRAJ_FILE_NAME trajectory_MD-300K.xyz | ||
+ | STRIDE 1 | ||
+ | EVAL_ENERGY_FORCES .FALSE. | ||
+ | &END REFTRAJ | ||
+ | &END MD | ||
+ | </ | ||
+ | |||
+ | The input {{ : | ||
+ | |||
+ | < | ||
+ | & | ||
+ | & | ||
+ | ATOMS_FROM 453 ! oxygen from formate | ||
+ | ATOMS_TO 286 ! index of Ti kind | ||
+ | R0 [angstrom] 2.9 | ||
+ | ND 12 | ||
+ | NN 8 | ||
+ | &END COORDINATION | ||
+ | &END COLVAR | ||
+ | </ | ||
+ | |||
+ | NN and ND determine the curvature of the function used to compute the CN, and R$_0$ is the reference O-Ti distance, CN$_{O-Ti} | ||
+ | |||
+ | The second CV describes the interaction between the oxygen atom of one specific water molecule and the same titanium atom used in the description of the other CV. We also use the CN between these species to define this collective variable, and its value should also lie between zero and one. | ||
+ | |||
+ | < | ||
+ | & | ||
+ | & | ||
+ | ATOMS_FROM 501 ! oxygen from water | ||
+ | ATOMS_TO 286 ! index of Ti kind | ||
+ | R0 [angstrom] 2.9 | ||
+ | ND 12 | ||
+ | NN 8 | ||
+ | &END COORDINATION | ||
+ | &END COLVAR | ||
+ | </ | ||
+ | |||
+ | Although no bias is added at this time, for each defined COLVAR an MTD variable is initialized. The [[https:// | ||
+ | |||
+ | By plotting the instantaneous values of the CVs along the 10 ps MD run, the amplitude of the equilibrium fluctuations can be evaluated and then used to set up the size of the Gaussian hills that build up the biasing potential during the MTD simulation. With the NN and ND values of 8 and 12, respectively, | ||
+ | |||
+ | ===== Second task: metadynamics of the dynamic equilibrium between formic acid and water on rutile (110) ===== | ||
+ | |||
+ | The MTD simulation employs the above described CVs, and the input file can be found in {{ : | ||
+ | |||
+ | < | ||
+ | & | ||
+ | & | ||
+ | DO_HILLS .TRUE. | ||
+ | NT_HILLS 60 | ||
+ | WW 0.5E-03 | ||
+ | |||
+ | & | ||
+ | COLVAR 1 | ||
+ | SCALE 0.05 | ||
+ | &END METAVAR | ||
+ | |||
+ | & | ||
+ | COLVAR 2 | ||
+ | SCALE 0.05 | ||
+ | &END METAVAR | ||
+ | |||
+ | & | ||
+ | & | ||
+ | | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | &END COLVAR | ||
+ | |||
+ | & | ||
+ | | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | &END HILLS | ||
+ | &END PRINT | ||
+ | &END METADYN | ||
+ | &END FREE_ENERGY | ||
+ | </ | ||
+ | |||
+ | One Gaussian hill is deposited every NT_HILLS timesteps, with the height of the hill given by WW, in Hartree. Together with the width of the Gaussian hills, given by SCALE, these parameters determine the accuracy of the description of the FES through the MTD biasing potential. Since each variable has, in principle, different dimensions and dynamics, the shape of the hills filling up the N$_{CV}$-dimensional configurations space, as defined by the chosen CVs, is not isotropic. The parameter SCALE, associated with the i-th MTD variable, determines the amplitude of the Gaussian in the i-th space-direction of the N$_{CV}$-dimensional configuration space. All three parameters (WW, NT_HILLS, and SCALE) can be modified along the same MTD run by simply restarting the simulations employing different values in the input file. This is a very useful feature in case the dynamics of one or more variables changes after some event has occurred. | ||
+ | |||
+ | For an efficient and accurate exploration of the configurations space, it is important that the added hills are not too large, otherwise, important features of the topography of the FES might not be sufficiently well-resolved, | ||
+ | |||
+ | The printing of the HILLS file is controlled by [[https:// | ||
+ | |||
+ | The resulting trajectory is about 34 ps long and shows the desorption of one formate as formic acid, with subsequent adsorption of a water molecule to the freed titanium site. Additionally, | ||
+ | |||
+ | Finally, by using this information, | ||
+ | |||
+ | < | ||
+ | graph.psmp -i HILLS -stride 10 -ndim 2 -ndw 1 2 -cp2k -integrated_fes | ||
+ | </ | ||
+ | |||
+ | Where HILLS is the last *.restart file printed during the metadynamics simulation. |
exercises/common/mtd.1708610331.txt.gz · Last modified: 2024/02/22 13:58 by fnunes