User Tools

Site Tools


exercises:2015_cecam_tutorial:mtd1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
exercise:simple_metadynamics_simulation_using_the_coordination_numbers_as_variables [2015/07/23 12:38] tmuellerexercises:2015_cecam_tutorial:mtd1 [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 3: Line 3:
 Problem: Dissociation reaction of nitric acid on graphene and atomic rearrangements of a <chem>Si6H8</chem> cluster described using coordination numbers Problem: Dissociation reaction of nitric acid on graphene and atomic rearrangements of a <chem>Si6H8</chem> cluster described using coordination numbers
  
-======= Introduction =======+  * Original author: Marcella Iannuzzi 
 +  * Complete source and output files: [[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1.tar.xz|MTD1.tar.xz]] 
 + 
 +===== Introduction =====
  
 For this tutorial some input and output files are given in order to present a complete procedure to solve the given problem. Some hints are also given to help in the analysis of the results. In order to be able to run these examples, some paths need to be correctly set in the input files (i.e. set the variables ''LIBPATH'', ''XYZPATH'', ''RUNPATH''). The coordinates are always read from xyz files. All the coordinate files needed for these exercises are collected in ''XYZ'', whereas ''LIB_TOOLS'' contains the PP, basis sets and DFTB parameter file. For this tutorial some input and output files are given in order to present a complete procedure to solve the given problem. Some hints are also given to help in the analysis of the results. In order to be able to run these examples, some paths need to be correctly set in the input files (i.e. set the variables ''LIBPATH'', ''XYZPATH'', ''RUNPATH''). The coordinates are always read from xyz files. All the coordinate files needed for these exercises are collected in ''XYZ'', whereas ''LIB_TOOLS'' contains the PP, basis sets and DFTB parameter file.
Line 16: Line 19:
   * Metadynamics simulation aimed at observing atomic rearrangements of the cluster bay changing the coordination of both Si and H species.                                                                                                               * Metadynamics simulation aimed at observing atomic rearrangements of the cluster bay changing the coordination of both Si and H species.                                                                                                            
                                                                                                                                                                                                                                                                      
-======= First task: dynamics of two HNO3 molecules over a graphene sheet =======                                                 +===== First task: dynamics of two HNO3 molecules over a graphene sheet =====                                                 
                                                                                                                                                                                                                                                                      
 The examples on this system are in the directory ''GR_2HNO3''. The goal is to simulate the dissociation of the <chem>HNO3</chem> molecules with formation of products like <chem>H2O</chem> and/or <chem>NO</chem> or <chem>NO2</chem> fragments. These reaction can occur in gas phase. The examples on this system are in the directory ''GR_2HNO3''. The goal is to simulate the dissociation of the <chem>HNO3</chem> molecules with formation of products like <chem>H2O</chem> and/or <chem>NO</chem> or <chem>NO2</chem> fragments. These reaction can occur in gas phase.
 However, the reaction should be catalyzed in presence of C particles (sooth). In the proposed example, the molecules are located in the vicinity of graphene, that should mimic the role of sooth. Graphene indeed is not very reactive, better models can be considered using defective or functionalized graphene.                                                         However, the reaction should be catalyzed in presence of C particles (sooth). In the proposed example, the molecules are located in the vicinity of graphene, that should mimic the role of sooth. Graphene indeed is not very reactive, better models can be considered using defective or functionalized graphene.                                                        
                                                                                                                                                                                                                                                                      
-The initial coordinates are given in ''grly5x3_2hno3.xyz''. The study is started with a simple MD simulation at constant              temperature (300 K), to learn about the dynamics of the two molecules over graphene. The DFTB description is employed to speed up the simulation, even if this might not be the optimal choice to faithfully describe the dissociation reaction. The provided input file ''gr2hno3_nvt.inp'' contains all the instructions to run with either DFT, or DFTB, or PM6. It is sufficient to set the input variable ''METHOD_TO_USE'' giving the name of the method to be used, and the parts of the input related to the selected method are activated. In the present case DFTB is selected and the relevant part of the input is+The initial coordinates are given in ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/XYZ/grly5x3_2hno3.xyz|XYZ/grly5x3_2hno3.xyz]]''. The study is started with a simple MD simulation at constant              temperature (300 K), to learn about the dynamics of the two molecules over graphene. The DFTB description is employed to speed up the simulation, even if this might not be the optimal choice to faithfully describe the dissociation reaction. The provided input file ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/gr2hno3_nvt.inp|GR_2HNO3/gr2hno3_nvt.inp]]'' contains all the instructions to run with either DFT, or DFTB, or PM6. It is sufficient to set the input variable ''METHOD_TO_USE'' giving the name of the method to be used, and the parts of the input related to the selected method are activated. In the present case DFTB is selected and the relevant part of the input is
  
 <code> <code>
Line 58: Line 61:
   &END   &END
 </code> </code>
-Otherwise the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION.html|MOTION]]'' section is quite standard for NVT simulations with a Nose-Hoover thermostat. Since the total number of degrees of freedom is small, even with the thermostat the equilibration to the desired temperature might result difficult. Hence, the rescaling of temperature is activated by the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/MD.html#TEMP_TOL|TEMP_TOL]]'' keyword, whenever the difference between the instantaneous temperature and the desired value exceeds the given tolerance.+Otherwise the ''[[inp>MOTION]]'' section is quite standard for NVT simulations with a Nose-Hoover thermostat. Since the total number of degrees of freedom is small, even with the thermostat the equilibration to the desired temperature might result difficult. Hence, the rescaling of temperature is activated by the ''[[inp>MOTION/MD#TEMP_TOL]]'' keyword, whenever the difference between the instantaneous temperature and the desired value exceeds the given tolerance.
  
-The output of this short simulation (5 ps) is stored in ''DFTB_NVT''. Kinetic energy (3rd col.), temperature (4th col.), potential energy (5th col), and total energy (6th col) can be monitored from ''gr2hno3_nvt-1.ener''. By visualizing the short trajectory, it is observed that the two molecule move very fast, and explore a large space of configurations, being often far from each other and far from graphene. In order to restrict the exploration to region where the dissociation catalyzed by graphene might occur, and thus avoid configurations that are not interesting for the specific study, it is necessary to limit the movement of the two molecules. To this purpose, an external potential defining a spherical potential centered on the center of the system coordinates is added, which acts only on the two molecules. In order to simplify the definition of the external potential, the coordinates are first centered in zero (''grly5x3_2hno3_cc.xyz''). The new input file invoking the interaction with the spherical potential is ''gr2hno3_nvt_epot.inp'', where the only difference in the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL.html|FORCE_EVAL]]'' section is+The output of this short simulation (5 ps) is stored in ''DFTB_NVT''. Kinetic energy (3rd col.), temperature (4th col.), potential energy (5th col), and total energy (6th col) can be monitored from ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/DFTB_NVT/gr2hno3_nvt-1.ener|GR_2HNO3/DFTB_NVT/gr2hno3_nvt-1.ener]]''. By visualizing the short trajectory, it is observed that the two molecule move very fast, and explore a large space of configurations, being often far from each other and far from graphene. In order to restrict the exploration to region where the dissociation catalyzed by graphene might occur, and thus avoid configurations that are not interesting for the specific study, it is necessary to limit the movement of the two molecules. To this purpose, an external potential defining a spherical potential centered on the center of the system coordinates is added, which acts only on the two molecules. In order to simplify the definition of the external potential, the coordinates are first centered in zero (''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/XYZ/grly5x3_2hno3_cc.xyz|XYZ/grly5x3_2hno3_cc.xyz]]''). The new input file invoking the interaction with the spherical potential is ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/gr2hno3_nvt_epot.inp|GR_2HNO3/gr2hno3_nvt_epot.inp]]'', where the only difference in the ''[[inp>FORCE_EVAL]]'' section is
  
 <code> <code>
Line 82: Line 85:
 The next step is to set up a few collective variables (CV) that can be later used for metadynamics (MTD) simulations. It is important to select good CV that can describe the relevant configuration along the reaction path. Moreover, it is useful to learn about the typical behavior of the selected CV along an unbiased MD run. Hence, after selecting a set of CV, preliminary runs should be performed in order to monitor the dynamics of these variables. This can be done setting up MTD simulations, where in facts no bias is added. The evolution of the variables is then monitored while the system explores the configurations around the initial one, i.e. belonging to the same (initial) basin of attraction on the free energy surface (FES). The evaluation of typical fluctuation amplitudes of the CV is particularly important in order to set the width of the Gaussian beads that are going to build up the penalty potential along the “real” MTD run. Moreover, it is important to learn which variations in the CV can occur spontaneously, i.e. do not need any bias, and where the CV cannot move without activation. The next step is to set up a few collective variables (CV) that can be later used for metadynamics (MTD) simulations. It is important to select good CV that can describe the relevant configuration along the reaction path. Moreover, it is useful to learn about the typical behavior of the selected CV along an unbiased MD run. Hence, after selecting a set of CV, preliminary runs should be performed in order to monitor the dynamics of these variables. This can be done setting up MTD simulations, where in facts no bias is added. The evolution of the variables is then monitored while the system explores the configurations around the initial one, i.e. belonging to the same (initial) basin of attraction on the free energy surface (FES). The evaluation of typical fluctuation amplitudes of the CV is particularly important in order to set the width of the Gaussian beads that are going to build up the penalty potential along the “real” MTD run. Moreover, it is important to learn which variations in the CV can occur spontaneously, i.e. do not need any bias, and where the CV cannot move without activation.
  
-The input ''gr2hno3_mtd_4cv_h0_p1.inp'' has been prepared with the definition of four CV. The first is the coordination number (CN) of O to graphene+The input ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/gr2hno3_mtd_4cv_h0_p1.inp|GR_2HNO3/gr2hno3_mtd_4cv_h0_p1.inp]]'' has been prepared with the definition of four CV. The first is the coordination number (CN) of O to graphene
  
 <code> <code>
Line 151: Line 154:
            
 </code> </code>
-This last CV controls the distance of the molecules from the layer, which is an important factor to determine whether the dissociation is somehow favored by the presence of graphene. The output of the unbiased MD that monitors the behavior of these 4 CV is in ''DFTB_MTD_4CV_H0''. It is obtained by invoking a MTD run where no penalty potential is added. Hence, the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY.html|FREE_ENERGY]]'' subsection is added within the section ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION.html|MOTION]]''. The MTD rum is controlled from the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN.html|METADYN]]'' subsection. In the present example, where no bias has to be added, the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN.html|METADYN]]'' section contains very few parameters+This last CV controls the distance of the molecules from the layer, which is an important factor to determine whether the dissociation is somehow favored by the presence of graphene. The output of the unbiased MD that monitors the behavior of these 4 CV is in ''DFTB_MTD_4CV_H0''. It is obtained by invoking a MTD run where no penalty potential is added. Hence, the ''[[inp>MOTION/FREE_ENERGY]]'' subsection is added within the section ''[[inp>MOTION]]''. The MTD run is controlled from the ''[[inp>MOTION/FREE_ENERGY/METADYN]]'' subsection. In the present example, where no bias has to be added, the ''[[inp>MOTION/FREE_ENERGY/METADYN]]'' section contains very few parameters
  
 <code> <code>
Line 190: Line 193:
      
 </code> </code>
-With ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN.html#desc_DO_HILLS|DO_HILLS]]'' set to ''.FALSE.'', it is required that no bias is added. Then for each defined COLVAR a MTD variable is initialized. The PRINT%COLVAR section controls the printing of the COLVAR output file, containing the instantaneous values of the CV as well as other parameters when needed. For the run without bias, no other information are needed, and the only interesting data in the output ''gr2hno3_mtd_4cv_h0_p1-COLVAR.metadynLog'' are the second, third, fourth, and fifth columns, which are the instantaneous values of the CV at the indicated time (in fs, first column).+With ''[[inp>MOTION/FREE_ENERGY/METADYN#DO_HILLS]]'' set to ''.FALSE.'', it is required that no bias is added. Then for each defined COLVAR a MTD variable is initialized. The PRINT%COLVAR section controls the printing of the COLVAR output file, containing the instantaneous values of the CV as well as other parameters when needed. For the run without bias, no other information are needed, and the only interesting data in the output ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/DFTB_MTD_4CV_H0/gr2hno3_mtd_4cv_h0_p1-COLVAR.metadynLog|GR_2HNO3/DFTB_MTD_4CV_H0/gr2hno3_mtd_4cv_h0_p1-COLVAR.metadynLog]]'' are the second, third, fourth, and fifth columns, which are the instantaneous values of the CV at the indicated time (in fs, first column).
  
 By plotting the CV as recorded along the short MD trajectory (3 ps), 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. The first CV fluctuates close to zero, with fluctuations smaller than 0.2. The second is around 2.8. The fluctuations are smaller due to the stiffness of the three NO bonds. The coordination of H to C is also typically zero, but it can change a lot when the molecules approach the layer, even if there is no dissociation of H and no binding to C. This indicates that this variable is difficult to control and might turn out to be tricky to use it to distinguish among different states of the reaction process. The point to plane distance shows quite large fluctuations and it is clearly not suited to distinguish a specific state along the reaction path. Moreover, its minima, when the two molecules are closer to the layer, correspond to the maxima of the third CV, i.e. the CN of H to C. At least before dissociation, the information that this variable provide is redundant. It might be interesting to run again this preliminary simulation after modifying the definition of the CV. For example, by changing the two exponents or even the reference distance of the CN, the range of the function can be made shorter or longer. It is maybe important to remind that the function defining the CV must have a gradient different from zero to affect the behavior of the system in a MTD run. Namely, the MTD force term affecting the dynamics of the atoms involved in the definition of the CV is proportional to the gradient of the CV function. By plotting the CV as recorded along the short MD trajectory (3 ps), 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. The first CV fluctuates close to zero, with fluctuations smaller than 0.2. The second is around 2.8. The fluctuations are smaller due to the stiffness of the three NO bonds. The coordination of H to C is also typically zero, but it can change a lot when the molecules approach the layer, even if there is no dissociation of H and no binding to C. This indicates that this variable is difficult to control and might turn out to be tricky to use it to distinguish among different states of the reaction process. The point to plane distance shows quite large fluctuations and it is clearly not suited to distinguish a specific state along the reaction path. Moreover, its minima, when the two molecules are closer to the layer, correspond to the maxima of the third CV, i.e. the CN of H to C. At least before dissociation, the information that this variable provide is redundant. It might be interesting to run again this preliminary simulation after modifying the definition of the CV. For example, by changing the two exponents or even the reference distance of the CN, the range of the function can be made shorter or longer. It is maybe important to remind that the function defining the CV must have a gradient different from zero to affect the behavior of the system in a MTD run. Namely, the MTD force term affecting the dynamics of the atoms involved in the definition of the CV is proportional to the gradient of the CV function.
  
-======= Second task: Metadynamics of the dissociation of HNO3 over a graphene sheet =======+===== Second task: Metadynamics of the dissociation of HNO3 over a graphene sheet =====
  
-The presented MTD run employs as CV only the three CN described above. The related input file is ''gr2hno3_mtd_3cv_p1.inp'' and the output is stored in ''DFTB_MTD_3CV''. The ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN.html|METADYN]]'' input section has been modified to activate the MTD algorithm.+The presented MTD run employs as CV only the three CN described above. The related input file is ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/GR_2HNO3/gr2hno3_mtd_3cv_p1.inp|GR_2HNO3/gr2hno3_mtd_3cv_p1.inp]]'' and the output is stored in ''DFTB_MTD_3CV''. The ''[[inp>MOTION/FREE_ENERGY/METADYN]]'' input section has been modified to activate the MTD algorithm.
  
 <code> <code>
Line 237: Line 240:
 One Gaussian hill is spawned every NT_HILLS MD steps, while the height of the hill in hartree is given by WW. These parameters together with the width of the Gaussian hills are important to determine the accuracy of the description of the FES through the MTD biasing potential. Since each variable has in principle different dimensions and different dynamics, the shape of the hills filling up the $N_{\text{CV}}$-dimensional configurations space, as defined by the selected CVs, is not isotropic. The parameter SCALE associated to the $i$-th MTD variable determines the amplitude of the Gaussian in the $i$-th space-direction of the $N_{\text{CV}}$-dimensional configuration space. This parameter, as well as the hill’s height and the frequency of collocation, can be changed along the same MTD run by restarting with different values in the input. This feature is useful when the dynamics of some variable changes after some event has occurred (e.g. the fluctuation of a distance become larger after a bond breaking), or to modulate the resolution of the biasing potential (coarser or finer) in different regions of the space (e.g. coarser at the bottom of the FES basin and finer in the vicinity of the transition state). For an efficient exploration of the configurations space, it is important to spawn hills that are not too big, otherwise important features of the topography of the FES might be not sufficiently well resolved, or even the MTD-trajectory could follow the wrong path, missing the minimum energy path (MEP). On the other hand, filling up the whole space with too small hills might require excessively long simulation time. Given the hill size (height and width) and knowing approximately the size of the space spanned by the CVs and the barrier height, it is possible to estimate the number of hills needed to fill the basin of the FES and move to the next minimum. One Gaussian hill is spawned every NT_HILLS MD steps, while the height of the hill in hartree is given by WW. These parameters together with the width of the Gaussian hills are important to determine the accuracy of the description of the FES through the MTD biasing potential. Since each variable has in principle different dimensions and different dynamics, the shape of the hills filling up the $N_{\text{CV}}$-dimensional configurations space, as defined by the selected CVs, is not isotropic. The parameter SCALE associated to the $i$-th MTD variable determines the amplitude of the Gaussian in the $i$-th space-direction of the $N_{\text{CV}}$-dimensional configuration space. This parameter, as well as the hill’s height and the frequency of collocation, can be changed along the same MTD run by restarting with different values in the input. This feature is useful when the dynamics of some variable changes after some event has occurred (e.g. the fluctuation of a distance become larger after a bond breaking), or to modulate the resolution of the biasing potential (coarser or finer) in different regions of the space (e.g. coarser at the bottom of the FES basin and finer in the vicinity of the transition state). For an efficient exploration of the configurations space, it is important to spawn hills that are not too big, otherwise important features of the topography of the FES might be not sufficiently well resolved, or even the MTD-trajectory could follow the wrong path, missing the minimum energy path (MEP). On the other hand, filling up the whole space with too small hills might require excessively long simulation time. Given the hill size (height and width) and knowing approximately the size of the space spanned by the CVs and the barrier height, it is possible to estimate the number of hills needed to fill the basin of the FES and move to the next minimum.
  
-The ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/PRINT/HILLS.html|PRINT%HILLS]]'' print key controls the printing of the ''HILLS'' file where the information on the spawned hills is stored: timestep, coordinates of the center in the CVs space (3 CV $=$ 3 columns), width in each dimension of the space (3 more columns), height (last column).+The ''[[inp>MOTION/FREE_ENERGY/METADYN/PRINT/HILLS]]'' print key controls the printing of the ''HILLS'' file where the information on the spawned hills is stored: timestep, coordinates of the center in the CVs space (3 CV $=$ 3 columns), width in each dimension of the space (3 more columns), height (last column).
  
 The provided trajectory is about 100 ps long and indeed it shows the dissociation of the two molecules into <chem>NO2</chem> and <chem>OH</chem>, whose <chem>OH</chem> fragments tend to interact with the graphene layer. From the behavior of the first and second CN the evolution of the system can be somehow deduced. In particular the are clear changes in the NO coordination, that becomes larger when the to molecules get closer, and becomes smaller when the OH is dissociated. Soon after the dissociation, the coordination is again close to 3, because the lost O is compensated by the fact that the two <chem>NO2</chem> fragments stay close together, i.e. each N sees the O of the other fragments. The coordination of O to C, becomes larger when the molecules are closer to the layer, and fluctuates a lot due to the rapid movement of the molecules. After the dissociation, higher values of the CN are kept for longer time, indicating some more stable interaction of O with C. A better choice of the parameters defining this CN might help in resolving more clearly the two states, O interacting and O not interacting with the layer. As predicted the very large fluctuations of the H to C CN are of difficult interpretation and make this variable not very useful for the description of the process. A CN N to H, describing the dissociation of H from <chem>HNO3</chem> be a better choice as third CV. The provided trajectory is about 100 ps long and indeed it shows the dissociation of the two molecules into <chem>NO2</chem> and <chem>OH</chem>, whose <chem>OH</chem> fragments tend to interact with the graphene layer. From the behavior of the first and second CN the evolution of the system can be somehow deduced. In particular the are clear changes in the NO coordination, that becomes larger when the to molecules get closer, and becomes smaller when the OH is dissociated. Soon after the dissociation, the coordination is again close to 3, because the lost O is compensated by the fact that the two <chem>NO2</chem> fragments stay close together, i.e. each N sees the O of the other fragments. The coordination of O to C, becomes larger when the molecules are closer to the layer, and fluctuates a lot due to the rapid movement of the molecules. After the dissociation, higher values of the CN are kept for longer time, indicating some more stable interaction of O with C. A better choice of the parameters defining this CN might help in resolving more clearly the two states, O interacting and O not interacting with the layer. As predicted the very large fluctuations of the H to C CN are of difficult interpretation and make this variable not very useful for the description of the process. A CN N to H, describing the dissociation of H from <chem>HNO3</chem> be a better choice as third CV.
  
-Other quantities that can be monitored from the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/PRINT/COLVAR.html|COLVAR]]'' output, beside the instantaneous values of the three CVs (2nd, 3rd, and 4th col.) are : the instantaneous gradient of the bias potential computed with respect to CV (5th, 6th, 7th col.), the gradients wit respect to the CVs of wall potentials, if present, (8th,9th,10th col), the instantaneous value of the bias potential, and the instantaneous values of the wall potentials.+Other quantities that can be monitored from the ''[[inp>MOTION/FREE_ENERGY/METADYN/PRINT/COLVAR]]'' output, beside the instantaneous values of the three CVs (2nd, 3rd, and 4th col.) are : the instantaneous gradient of the bias potential computed with respect to CV (5th, 6th, 7th col.), the gradients wit respect to the CVs of wall potentials, if present, (8th,9th,10th col), the instantaneous value of the bias potential, and the instantaneous values of the wall potentials.
  
-======= Third task: dynamics of Si6H8 =======+===== Third task: dynamics of Si6H8 =====
  
 The data file for this example are in ''SI6_CLU''. In this case, a small Si cluster of 6 Si atoms saturated by 8 H atoms is studied. Si clusters show different arrangements. The equilibrium structure should be such that Si atoms keep the preferred tetrahedral coordination. In the presence of H saturating the dangling Si bonds, the structure can be open, like the chair structure that is used here as starting conformation. By loosing H atoms, through the formation of molecular hydrogen, the cluster undergoes some rearrangement. The structure should become more compact in order to saturate the Si coordination shell. The data file for this example are in ''SI6_CLU''. In this case, a small Si cluster of 6 Si atoms saturated by 8 H atoms is studied. Si clusters show different arrangements. The equilibrium structure should be such that Si atoms keep the preferred tetrahedral coordination. In the presence of H saturating the dangling Si bonds, the structure can be open, like the chair structure that is used here as starting conformation. By loosing H atoms, through the formation of molecular hydrogen, the cluster undergoes some rearrangement. The structure should become more compact in order to saturate the Si coordination shell.
  
-As in the previous example, preliminary MD runs are carried out to study the dynamics of the system. The electronic structure is computed at the DFT level, using the PBE functional. A standard constant temperature MD is simulated running the input ''si6_clu_nvt.inp''. The temperature is set at 300 K and it is controlled by applying the Nose-Hoover thermostat and the temperature rescaling (the small number of degrees of freedom does not allow thermalization within a few ps). The output of this simulation is in NVT. The energy curve over the 6 ps of simulation time and the visualization of the trajectory confirm that the cluster with the initial stoichiometry can be easily equilibrated in the chair structure.+As in the previous example, preliminary MD runs are carried out to study the dynamics of the system. The electronic structure is computed at the DFT level, using the PBE functional. A standard constant temperature MD is simulated running the input ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_nvt.inp|SI6_CLU/si6_clu_nvt.inp]]''. The temperature is set at 300 K and it is controlled by applying the Nose-Hoover thermostat and the temperature rescaling (the small number of degrees of freedom does not allow thermalization within a few ps). The output of this simulation is in NVT. The energy curve over the 6 ps of simulation time and the visualization of the trajectory confirm that the cluster with the initial stoichiometry can be easily equilibrated in the chair structure.
  
-Possible changes in stoichiometry (loosing H) and structure are going to induce variations in the coordination shell of the Si atoms. Therefore, three CN are selected as CV : Si to Si, Si to H, and H to H. These variables are monitored over the equilibrium trajectory by running the input ''si6_clu_mtd_h0_p1.inp''. As in the previous example, this is a MTD input where the the variable ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN.html#desc_DO_HILLS|DO_HILLS]]'' is set to false, so that no biasing potential is added. The output obtained running this test is in ''MTD_H0''. By monitoring the three CN along the 10 ps log trajectory (2nd, 3rd and 4th col. of ''si6_clu_mtd_h0-COLVAR.metadynLog''), it is observed that the three variables are well equilibrate, with relatively small fluctuations around the average. Given the chosen parameters+Possible changes in stoichiometry (loosing H) and structure are going to induce variations in the coordination shell of the Si atoms. Therefore, three CN are selected as CV : Si to Si, Si to H, and H to H. These variables are monitored over the equilibrium trajectory by running the input ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_h0_p1.inp|SI6_CLU/si6_clu_mtd_h0_p1.inp]]''. As in the previous example, this is a MTD input where the the variable ''[[inp>MOTION/FREE_ENERGY/METADYN#DO_HILLS]]'' is set to false, so that no biasing potential is added. The output obtained running this test is in ''MTD_H0''. By monitoring the three CN along the 10 ps log trajectory (2nd, 3rd and 4th col. of ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/MTD_H0/si6_clu_mtd_h0-COLVAR.metadynLog|SI6_CLU/MTD_H0/si6_clu_mtd_h0-COLVAR.metadynLog]]''), it is observed that the three variables are well equilibrate, with relatively small fluctuations around the average. Given the chosen parameters
  
 <code> <code>
Line 264: Line 267:
 the Si-Si CN oscillates around 2. Actually, in the chair configuration 4 Si are three fold coordinated with neighboring Si atoms and 2 are two fold coordinated. The bond length is about 2.4 Å. By changing the curvature of the function, the average value of the CN can be easily moved towards 3 and it can become more sensitive to fluctuations of the Si-Si bond length. The fluctuations of the two other CN are even smaller. Si-H fluctuates around 1.4 and H-H is very close to zero, since in the initial configuration the H atoms do not see each other. the Si-Si CN oscillates around 2. Actually, in the chair configuration 4 Si are three fold coordinated with neighboring Si atoms and 2 are two fold coordinated. The bond length is about 2.4 Å. By changing the curvature of the function, the average value of the CN can be easily moved towards 3 and it can become more sensitive to fluctuations of the Si-Si bond length. The fluctuations of the two other CN are even smaller. Si-H fluctuates around 1.4 and H-H is very close to zero, since in the initial configuration the H atoms do not see each other.
  
-The output of a second simulation that monitors the same three CVs is in MTD_L_H0, and the corresponding input is ''si6_clu_mtd_l_h0_p1.inp''. Nothing has been changed in the definition of the CVs, but the Lagrangian MTD formalism has been used. With this scheme, an auxiliary variable is associated to each CV, and when the biasing potential is added, it is defined as function of the auxiliary variables rather than of the CVs. The auxiliary variable behaves as additional degree of freedom. Therefore, an inertial mass is associated to it and its dynamics is determined by integrating the same type of equations of motion as for all the other degrees of freedom. The variable is coupled to the corresponding CV through a harmonic potential, and the forces acting on it are those derived from the harmonic potential and from the MTD biasing potential, when it is present. Hence, in the ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR.html|METAVAR]]'' input section, two additional parameters are needed, which are the mass of the auxiliary variable and the coupling constant for the harmonic potential:+The output of a second simulation that monitors the same three CVs is in MTD_L_H0, and the corresponding input is ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_l_h0_p1.inp|SI6_CLU/si6_clu_mtd_l_h0_p1.inp]]''. Nothing has been changed in the definition of the CVs, but the Lagrangian MTD formalism has been used. With this scheme, an auxiliary variable is associated to each CV, and when the biasing potential is added, it is defined as function of the auxiliary variables rather than of the CVs. The auxiliary variable behaves as additional degree of freedom. Therefore, an inertial mass is associated to it and its dynamics is determined by integrating the same type of equations of motion as for all the other degrees of freedom. The variable is coupled to the corresponding CV through a harmonic potential, and the forces acting on it are those derived from the harmonic potential and from the MTD biasing potential, when it is present. Hence, in the ''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR]]'' input section, two additional parameters are needed, which are the mass of the auxiliary variable and the coupling constant for the harmonic potential:
  
 <code> <code>
Line 277: Line 280:
 A temperature is associated to the auxiliary variables and can be controlled by temperature rescaling. The use of thermostats for such few degrees of freedom is questionable. The Lagrangian MTD formalism is used in order to better control the kinetics of the CV. This control is obtained through the coupled to the auxiliary variables, whose dynamics depends on the mass and the temperature, besides the intensity of two contribution to the force. Hence, by tuning properly the coupling constant and the mass, the desired effect can be obtained. This might become important in order to collect the correct probability distribution in the configurations space defined by the CV, it is important that the system visits all the accessible conformations. By controlling the dynamics of the selected variables, a sort of adiabatic separation can be imposed between the relevant reaction parameters and all the other degrees of freedom. A temperature is associated to the auxiliary variables and can be controlled by temperature rescaling. The use of thermostats for such few degrees of freedom is questionable. The Lagrangian MTD formalism is used in order to better control the kinetics of the CV. This control is obtained through the coupled to the auxiliary variables, whose dynamics depends on the mass and the temperature, besides the intensity of two contribution to the force. Hence, by tuning properly the coupling constant and the mass, the desired effect can be obtained. This might become important in order to collect the correct probability distribution in the configurations space defined by the CV, it is important that the system visits all the accessible conformations. By controlling the dynamics of the selected variables, a sort of adiabatic separation can be imposed between the relevant reaction parameters and all the other degrees of freedom.
  
-Whenever a ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR.html|METAVAR]]'' is defined (also in a not Lagrangian scheme), it is possible to limit the range of values that are going to be explored by setting a so called WALL potential. This is typically done to avoid the time-consuming exploration of regions of the configurations space that are not relevant for the process that is under investigation. When auxiliary variables are employed, the WALL potential can also be activated in order to avoid the exploration of unphysical values, that can happen by too large fluctuations away from the corresponding CV. In the case of the CN, negative values are unphysical and must be avoided. For this reason the subsection ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR/WALL.html|WALL]]'' is added ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR.html|METAVAR]]'' coupled to the H-H CN, which is known to oscillate close to zero in the initial state:+Whenever a ''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR]]'' is defined (also in a not Lagrangian scheme), it is possible to limit the range of values that are going to be explored by setting a so called WALL potential. This is typically done to avoid the time-consuming exploration of regions of the configurations space that are not relevant for the process that is under investigation. When auxiliary variables are employed, the WALL potential can also be activated in order to avoid the exploration of unphysical values, that can happen by too large fluctuations away from the corresponding CV. In the case of the CN, negative values are unphysical and must be avoided. For this reason the subsection ''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR/WALL]]'' is added ''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR]]'' coupled to the H-H CN, which is known to oscillate close to zero in the initial state:
  
 <code> <code>
Line 290: Line 293:
    
 </code> </code>
-In this case the potential function is $f(s)=K (s-s_0) ^4$, and it is activated whenever the variable becomes lower (''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR/WALL/QUARTIC.html#desc_DIRECTION|DIRECTION WALL_MINUS]]'') than the given $s_0$ (POSITION).+In this case the potential function is $f(s)=K (s-s_0) ^4$, and it is activated whenever the variable becomes lower (''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR/WALL/QUARTIC#DIRECTION|DIRECTION WALL_MINUS]]'') than the given $s_0$ (POSITION).
  
 When such Lagrangian scheme is used more columns appear in the COLVAR, which contain all the relevant information. The 1st column is always the time in fs, the next $N_{\text{CV}}$ columns are the instantaneous values of the auxiliary variables, followed by $N_{\text{CV}}$ columns where the instantaneous values of the CVs are reported. The next columns report the values of the potential gradients: $N_{\text{CV}}$ columns for the gradients of the harmonic potential, $N_{\text{CV}}$ for the gradients of the MTD biasing potential, and $N_{\text{CV}}$ for the gradient of the WALL potential (these are zeros when the corresponding potential is not activated). The following $N_{\text{CV}}$ are the velocities of the auxiliary variables. Then there are the instantaneous values of the harmonic potential, of the MTD potential, and of the WALL potential. The last column is the temperature of the auxiliary variables. When such Lagrangian scheme is used more columns appear in the COLVAR, which contain all the relevant information. The 1st column is always the time in fs, the next $N_{\text{CV}}$ columns are the instantaneous values of the auxiliary variables, followed by $N_{\text{CV}}$ columns where the instantaneous values of the CVs are reported. The next columns report the values of the potential gradients: $N_{\text{CV}}$ columns for the gradients of the harmonic potential, $N_{\text{CV}}$ for the gradients of the MTD biasing potential, and $N_{\text{CV}}$ for the gradient of the WALL potential (these are zeros when the corresponding potential is not activated). The following $N_{\text{CV}}$ are the velocities of the auxiliary variables. Then there are the instantaneous values of the harmonic potential, of the MTD potential, and of the WALL potential. The last column is the temperature of the auxiliary variables.
  
-The dynamics of the CVs along the two simulations, with and without Lagrangian MTD scheme, is equivalent. The CV and the auxiliary variables, in the Lagrangian MTD simulation, closely follow each other, which points to a strong enough coupling (could be also a bei looser). The masses assigned to the auxiliary variables seem not to affect significantly the time evolution at equilibrium, i.e. the inertia effect is quite small, also because the temperature of the auxiliary variables is also set at 300 K. In order to slowdown the oscillations of the three CN, and sample better the accessible configurations at each point of the in the CV space, the parameters to be tuned are then the mass and the temperature of the auxiliary variables. In the input ''si6_clu_mtd_l_h0_p2.inp'', the definition of the Si-Si CN has been slightly changed, and the mass of the auxiliary variables has been increased. The effect f these changes can be investigated by running this input and comparing the results with the previous results (both the input can be run at a lower level of theory, just to explore the effects of the different parameters on the dynamics of the CV). A third input is proposed, where the MTD temperature is reduced to 100 K, ''si6_clu_mtd_l_h0_p3.inp''.+The dynamics of the CVs along the two simulations, with and without Lagrangian MTD scheme, is equivalent. The CV and the auxiliary variables, in the Lagrangian MTD simulation, closely follow each other, which points to a strong enough coupling (could be also a bei looser). The masses assigned to the auxiliary variables seem not to affect significantly the time evolution at equilibrium, i.e. the inertia effect is quite small, also because the temperature of the auxiliary variables is also set at 300 K. In order to slowdown the oscillations of the three CN, and sample better the accessible configurations at each point of the in the CV space, the parameters to be tuned are then the mass and the temperature of the auxiliary variables. In the input ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_l_h0_p2.inp|SI6_CLU/si6_clu_mtd_l_h0_p2.inp]]'', the definition of the Si-Si CN has been slightly changed, and the mass of the auxiliary variables has been increased. The effect f these changes can be investigated by running this input and comparing the results with the previous results (both the input can be run at a lower level of theory, just to explore the effects of the different parameters on the dynamics of the CV). A third input is proposed, where the MTD temperature is reduced to 100 K, ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_l_h0_p3.inp|SI6_CLU/si6_clu_mtd_l_h0_p3.inp]]''.
  
-======= Fourth task: Lagrangian MTD of the atomic rearrangement of Si6H8 =======+===== Fourth task: Lagrangian MTD of the atomic rearrangement of Si6H8 =====
  
-''MTD_L_P2'' contains the output of the MTD run performed with the parameters tested by running ''si6_clu_mtd_l_h0_p2.inp''. The corresponding input is ''si6_clu_mtd_l_p2.inp''. The ''[[http://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/FREE_ENERGY/METADYN/METAVAR.html#desc_SCALE|SCALE]]'' parameter is the same for the three variables, since the fluctuations of the three CN are going to be quite similar. The collocation rate is every 100 MD steps, which is quite often, but reasonable, also because the hill size is not too big (about 1 Kcal/mol for the height).+''MTD_L_P2'' contains the output of the MTD run performed with the parameters tested by running ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_l_h0_p2.inp|SI6_CLU/si6_clu_mtd_l_h0_p2.inp]]''. The corresponding input is ''[[http://cp2k.org/static/exercises/2015_cecam_tutorial/MTD1/SI6_CLU/si6_clu_mtd_l_p2.inp|SI6_CLU/si6_clu_mtd_l_p2.inp]]''. The ''[[inp>MOTION/FREE_ENERGY/METADYN/METAVAR#SCALE]]'' parameter is the same for the three variables, since the fluctuations of the three CN are going to be quite similar. The collocation rate is every 100 MD steps, which is quite often, but reasonable, also because the hill size is not too big (about 1 Kcal/mol for the height).
exercises/2015_cecam_tutorial/mtd1.1437655127.txt.gz · Last modified: 2020/08/21 10:14 (external edit)