From 6971f12c5342bb0704bc9db118799e7775ccc02b Mon Sep 17 00:00:00 2001 From: Massimiliano Bonomi Date: Sun, 2 Apr 2023 16:23:49 +0200 Subject: [PATCH 1/6] rename files --- user-doc/tutorials/a-master-ISDD-1.txt | 14 ++-- ...-master-ISDD-2.txt => a-master-ISDD-3.txt} | 76 +++++++++--------- .../diala.pdb | 0 .../do_block_fes.py | 0 .../topol.tpr | Bin 5 files changed, 45 insertions(+), 45 deletions(-) rename user-doc/tutorials/{a-master-ISDD-2.txt => a-master-ISDD-3.txt} (92%) rename user-doc/tutorials/{master-ISDD-2 => master-ISDD-3}/diala.pdb (100%) rename user-doc/tutorials/{master-ISDD-2 => master-ISDD-3}/do_block_fes.py (100%) rename user-doc/tutorials/{master-ISDD-2 => master-ISDD-3}/topol.tpr (100%) diff --git a/user-doc/tutorials/a-master-ISDD-1.txt b/user-doc/tutorials/a-master-ISDD-1.txt index e6a7ed765d..8d16fdb525 100644 --- a/user-doc/tutorials/a-master-ISDD-1.txt +++ b/user-doc/tutorials/a-master-ISDD-1.txt @@ -1,13 +1,13 @@ /** -\page master-ISDD-1 Master ISDD tutorial 2021: Brief introduction to PLUMED +\page master-ISDD-1 Master ISDD tutorial 2023: Brief introduction to PLUMED \section master-ISDD-1-aims Aim The aim of this tutorial is to introduce users to the PLUMED syntax. We will go through the preparation of input files to calculate and print simple collective variables on a pre-calculated trajectory. This tutorial has been prepared by Max Bonomi -(adapting a lot of material from other tutorials) for +(adapting a lot of material from other tutorials and Masterclass) for the Master In Silico Drug Design, held -at Universite' de Paris on October 26th, 2021. +at Universite' de Paris on March 6th, 2023. \section master-ISDD-1-lo Objectives @@ -52,14 +52,14 @@ Now we can create a `conda` environment for the ISDD tutorial using the followin \verbatim # create environment -conda create --name ISDD-tutorial-2021 +conda create --name ISDD-tutorial-2023 \endverbatim and activate it with: \verbatim # activate environment -conda activate ISDD-tutorial-2021 +conda activate ISDD-tutorial-2023 \endverbatim Finally, we can proceed with the installation of the required software: @@ -72,10 +72,10 @@ conda install --strict-channel-priority -c plumed/label/masterclass -c conda-for The `--strict-channel-priority` might be necessary in case your `conda` install is configured to download packages from the `bioconda` channel. Indeed, `bioconda` contains a version of GROMACS that is **not** patched with PLUMED and would thus not work here. Keep in mind that every time you open a new shell, in order to use PLUMED and GROMACS you need to -activate the `ISDD-tutorial-2021` environment using the following command: +activate the `ISDD-tutorial-2023` environment using the following command: \verbatim -conda activate ISDD-tutorial-2021 +conda activate ISDD-tutorial-2023 \endverbatim \subsection master-ISDD-1-plumed PLUMED overview diff --git a/user-doc/tutorials/a-master-ISDD-2.txt b/user-doc/tutorials/a-master-ISDD-3.txt similarity index 92% rename from user-doc/tutorials/a-master-ISDD-2.txt rename to user-doc/tutorials/a-master-ISDD-3.txt index 25d7581078..e2e1d05a73 100644 --- a/user-doc/tutorials/a-master-ISDD-2.txt +++ b/user-doc/tutorials/a-master-ISDD-3.txt @@ -1,14 +1,14 @@ -/** -\page master-ISDD-2 Master ISDD tutorial 2021: Metadynamics simulations with PLUMED +a-master-ISDD-3.txt/** +\page master-ISDD-3 Master ISDD tutorial 2023: Metadynamics simulations with PLUMED -\section master-ISDD-2-aims Aim +\section master-ISDD-3-aims Aim The aim of this tutorial is to train users to perform and analyze metadynamics simulations with PLUMED. This tutorial has been prepared by Max Bonomi (adapting a lot of material from other tutorials) for the Master In Silico Drug Design, held -at Universite' de Paris on October 26th, 2021. +at Universite' de Paris on March 6th, 2023. -\section master-ISDD-2-objectives Objectives +\section master-ISDD-3-objectives Objectives Once this tutorial is completed users will be able to: @@ -18,9 +18,9 @@ Once this tutorial is completed users will be able to: - Estimate the error in the reconstructed free energies using block analysis. - Assess the convergence of metadynamics simulations. -\section master-ISDD-2-resources Resources +\section master-ISDD-3-resources Resources -The \tarball{master-ISDD-2} for this tutorial contains the following files: +The \tarball{master-ISDD-3} for this tutorial contains the following files: - `diala.pdb`: a PDB file for alanine dipeptide in vacuo. - `topol.tpr`: a GROMACS run (binary) file to perform MD simulations of alanine dipeptide. - `do_block_fes.py`: a python script to perform error analysis of metadynamics simulations. @@ -28,15 +28,15 @@ The \tarball{master-ISDD-2} for this tutorial contains the following files: After dowloading the compressed archive to your local machine, you can unpack it using the following command: \verbatim -tar xvzf master-ISDD-2.tar.gz +tar xvzf master-ISDD-3.tar.gz \endverbatim -Once unpacked, all the files can be found in the `master-ISDD-2` directory. To keep things clean, -it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-2`. +Once unpacked, all the files can be found in the `master-ISDD-3` directory. To keep things clean, +it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-3`. \note This tutorial has been tested with PLUMED version 2.7.2 and GROMACS version 2019.6. -\section master-ISDD-2-intro Introduction +\section master-ISDD-3-intro Introduction In the previous tutorial, we have seen that PLUMED can be used to compute collective variables (CVs) on a pre-calculated trajectory. However, PLUMED is most often use to add forces on the CVs during a MD simulation, for example, @@ -110,21 +110,21 @@ Additional information can be found in the several review papers on metadynamics \endhidden We will play with a toy system, alanine dipeptide simulated in vacuo using the AMBER99SB-ILDN -force field (see Fig. \ref master-ISDD-2-ala-fig). +force field (see Fig. \ref master-ISDD-3-ala-fig). This rather simple molecule is useful to understand data analysis and free-energy methods. This system is a nice example because it presents two metastable states separated by a high free-energy barrier. It is conventional use to characterize the two states in terms of Ramachandran dihedral angles, which are denoted with \f$ \phi \f$ -(phi) and \f$ \psi \f$ (psi) in Fig. \ref master-ISDD-2-transition-fig. +(phi) and \f$ \psi \f$ (psi) in Fig. \ref master-ISDD-3-transition-fig. -\anchor master-ISDD-2-ala-fig +\anchor master-ISDD-3-ala-fig \image html belfast-2-ala.png "The molecule of the day: alanine dipeptide." -\anchor master-ISDD-2-transition-fig +\anchor master-ISDD-3-transition-fig \image html belfast-2-transition.png "Two metastable states of alanine dipeptide are characterized by their Ramachandran dihedral angles." -\section master-ISDD-2-ex Exercises +\section master-ISDD-3-ex Exercises -\subsection master-ISDD-2-ex-1 Exercise 1: My first metadynamics simulation +\subsection master-ISDD-3-ex-1 Exercise 1: My first metadynamics simulation In this exercise we will setup and perform a well-tempered metadynamics run using the backbone dihedral \f$ \phi \f$ as collective variable. During the calculation, we will also monitor the behavior of the other backbone dihedral \f$ \psi \f$. @@ -190,10 +190,10 @@ We can use `gnuplot` to visualize the behavior of the metadynamics CV \f$ \phi \ gnuplot> p "COLVAR" u 1:2 \endverbatim -\anchor master-ISDD-2-phi-fig +\anchor master-ISDD-3-phi-fig \image html munster-metad-phi.png "Time evolution of the metadynamics CV during the first 2 ns of a metadynamics simulation of alanine dipeptide in vacuum." -By inspecting Figure \ref master-ISDD-2-phi-fig, we can see that the system is initialized in one of the two metastable +By inspecting Figure \ref master-ISDD-3-phi-fig, we can see that the system is initialized in one of the two metastable states of alanine dipeptide. After a while (t=0.1 ns), the system is pushed by the metadynamics bias potential to visit the other local minimum. As the simulation continues, the bias potential fills the underlying free-energy landscape, and the system is able to diffuse in the @@ -214,7 +214,7 @@ the simulation time, the instantaneous value of \f$ \phi \f$, the Gaussian width We can use the `HILLS` file to visualize the decrease of the Gaussian height during the simulation, according to the well-tempered recipe: -\anchor master-ISDD-2-phihills-fig +\anchor master-ISDD-3-phihills-fig \image html munster-metad-phihills.png "Time evolution of the Gaussian height." If we look carefully at the scale of the y-axis, we will notice that in the beginning the value @@ -225,7 +225,7 @@ in well-tempered metadynamics relates the bias potential to the free energy. \warning The fact that the Gaussian height is decreasing to zero should not be used as a measure of convergence of your metadynamics simulation! -\subsection master-ISDD-2-ex-2 Exercise 2: Estimating the free energy as a function of the metadynamics CVs +\subsection master-ISDD-3-ex-2 Exercise 2: Estimating the free energy as a function of the metadynamics CVs One can estimate the free energy as a function of the metadynamics CVs directly from the metadynamics bias potential. In order to do so, the utility \ref sum_hills can be used to sum the Gaussian kernels @@ -251,7 +251,7 @@ as well as the boundaries and bin size of the grid, by using the following \ref The result should look like this: -\anchor master-ISDD-2-metad-phifes-fig +\anchor master-ISDD-3-metad-phifes-fig \image html munster-metad-phifes.png "Estimate of the free energy as a function of the dihedral phi from a 10ns-long well-tempered metadynamics simulation." To give a preliminary assessment of the convergence of a metadynamics simulation, one can calculate the estimate of the free energy as a function @@ -267,19 +267,19 @@ plumed sum_hills --hills HILLS --stride 100 --mintozero one free energy is calculated every 100 Gaussian kernels deposited, and the global minimum is set to zero in all profiles. The resulting plot should look like the following: -\anchor master-ISDD-2-metad-phifest-fig +\anchor master-ISDD-3-metad-phifest-fig \image html munster-metad-phifest.png "Estimates of the free energy as a function of the dihedral phi calculated every 100 Gaussian kernels deposited." These two qualitative observations: -1. the system is diffusing rapidly in the entire CV space (Figure \ref master-ISDD-2-phi-fig) -2. the estimated free energy does not significantly change as a function of time (Figure \ref master-ISDD-2-metad-phifest-fig) +1. the system is diffusing rapidly in the entire CV space (Figure \ref master-ISDD-3-phi-fig) +2. the estimated free energy does not significantly change as a function of time (Figure \ref master-ISDD-3-metad-phifest-fig) suggest that the simulation __might__ be converged. \warning The two conditions listed above are necessary, but not sufficient to declare convergence. -For a quantitative analysis of the convergence of metadynamics simulations, please have a look below at \ref master-ISDD-2-ex-4. +For a quantitative analysis of the convergence of metadynamics simulations, please have a look below at \ref master-ISDD-3-ex-4. -\subsection master-ISDD-2-ex-3 Exercise 3: Reweighting (unbiasing) a metadynamics simulation +\subsection master-ISDD-3-ex-3 Exercise 3: Reweighting (unbiasing) a metadynamics simulation In the previous exercise we biased \f$\phi\f$ and computed the free energy as a function of the same variable directly from the metadynamics bias potential using the \ref sum_hills utility. @@ -397,23 +397,23 @@ gnuplot> p "ffpsi.dat" u 1:2 w lp \endverbatim You can now compare the free energies as a function of \f$ \phi \f$ calculated: -1. directly from the metadynamics bias potential using \ref sum_hills as done in \ref master-ISDD-2-ex-2; +1. directly from the metadynamics bias potential using \ref sum_hills as done in \ref master-ISDD-3-ex-2; 2. using the reweighting procedure introduced in this exercise. -The results should be identical (see Fig. \ref master-ISDD-2-fescomp-fig). +The results should be identical (see Fig. \ref master-ISDD-3-fescomp-fig). -\anchor master-ISDD-2-fescomp-fig -\image html master-ISDD-2-fescomp-fig.png "Comparison between the free energy as a function of the dihedral phi calculated from the metadynamics bias potential (bias) and by reweighting (rew)". +\anchor master-ISDD-3-fescomp-fig +\image html master-ISDD-3-fescomp-fig.png "Comparison between the free energy as a function of the dihedral phi calculated from the metadynamics bias potential (bias) and by reweighting (rew)". -\subsection master-ISDD-2-ex-4 Exercise 4: Estimating the error in free energies using block-analysis +\subsection master-ISDD-3-ex-4 Exercise 4: Estimating the error in free energies using block-analysis In the previous exercise, we calculated the _final_ bias \f$ V(s) \f$ on the entire metadynamics trajectory and we used this quantity to calculate the correct statistical weight of each frame that we need to reweight the biased simulation. In this exercise, we will see how this information can be used to calculate the error in the reconstructed free energies and assess whether our simulation is converged or not. Let's first calculate the un-biasing weights \f$w\propto\exp\left(\frac{V(s)}{k_BT}\right)\f$ from the `COLVAR_REWEIGHT` -file obtained at the end of \ref master-ISDD-2-ex-3: +file obtained at the end of \ref master-ISDD-3-ex-3: \verbatim # Find maximum value of bias to avoid numerical errors when calculating the un-biasing weights @@ -480,14 +480,14 @@ gnuplot> p "err.blocks" u 1:2 w lp \endverbatim As expected, the error increases with the block size until it reaches a plateau in correspondence of a dimension -of the block that exceeds the correlation between data points (Fig. \ref master-ISDD-2-block-phi). +of the block that exceeds the correlation between data points (Fig. \ref master-ISDD-3-block-phi). -\anchor master-ISDD-2-block-phi +\anchor master-ISDD-3-block-phi \image html trieste-4-block-phi.png "Block analysis of a metadynamics simulation using phi as CV" __What can we learn from this analysis about the convergence of the metadynamics simulation?__ -\section master-ISDD-2-conclusions Conclusions +\section master-ISDD-3-conclusions Conclusions In summary, in this tutorial you should have learned how to use PLUMED to: - Setup and run a metadynamics calculation. @@ -497,8 +497,8 @@ In summary, in this tutorial you should have learned how to use PLUMED to: */ -link: @subpage master-ISDD-2 +link: @subpage master-ISDD-3 description: This tutorial explains how to use PLUMED to run metadynamics simulations -additional-files: master-ISDD-2 +additional-files: master-ISDD-3 diff --git a/user-doc/tutorials/master-ISDD-2/diala.pdb b/user-doc/tutorials/master-ISDD-3/diala.pdb similarity index 100% rename from user-doc/tutorials/master-ISDD-2/diala.pdb rename to user-doc/tutorials/master-ISDD-3/diala.pdb diff --git a/user-doc/tutorials/master-ISDD-2/do_block_fes.py b/user-doc/tutorials/master-ISDD-3/do_block_fes.py similarity index 100% rename from user-doc/tutorials/master-ISDD-2/do_block_fes.py rename to user-doc/tutorials/master-ISDD-3/do_block_fes.py diff --git a/user-doc/tutorials/master-ISDD-2/topol.tpr b/user-doc/tutorials/master-ISDD-3/topol.tpr similarity index 100% rename from user-doc/tutorials/master-ISDD-2/topol.tpr rename to user-doc/tutorials/master-ISDD-3/topol.tpr From 169a2f26f3d8839f80281469e0001d7a714a9b03 Mon Sep 17 00:00:00 2001 From: Massimiliano Bonomi Date: Sun, 2 Apr 2023 17:24:13 +0200 Subject: [PATCH 2/6] changed my mind about filenames --- ...-master-ISDD-3.txt => a-master-ISDD-2.txt} | 74 +++++++++--------- .../diala.pdb | 0 .../do_block_fes.py | 0 .../topol.tpr | Bin 4 files changed, 37 insertions(+), 37 deletions(-) rename user-doc/tutorials/{a-master-ISDD-3.txt => a-master-ISDD-2.txt} (92%) rename user-doc/tutorials/{master-ISDD-3 => master-ISDD-2}/diala.pdb (100%) rename user-doc/tutorials/{master-ISDD-3 => master-ISDD-2}/do_block_fes.py (100%) rename user-doc/tutorials/{master-ISDD-3 => master-ISDD-2}/topol.tpr (100%) diff --git a/user-doc/tutorials/a-master-ISDD-3.txt b/user-doc/tutorials/a-master-ISDD-2.txt similarity index 92% rename from user-doc/tutorials/a-master-ISDD-3.txt rename to user-doc/tutorials/a-master-ISDD-2.txt index e2e1d05a73..67b0bcd986 100644 --- a/user-doc/tutorials/a-master-ISDD-3.txt +++ b/user-doc/tutorials/a-master-ISDD-2.txt @@ -1,14 +1,14 @@ -a-master-ISDD-3.txt/** -\page master-ISDD-3 Master ISDD tutorial 2023: Metadynamics simulations with PLUMED +a-master-ISDD-2.txt/** +\page master-ISDD-2 Master ISDD tutorial 2023: Metadynamics simulations with PLUMED -\section master-ISDD-3-aims Aim +\section master-ISDD-2-aims Aim The aim of this tutorial is to train users to perform and analyze metadynamics simulations with PLUMED. This tutorial has been prepared by Max Bonomi (adapting a lot of material from other tutorials) for the Master In Silico Drug Design, held at Universite' de Paris on March 6th, 2023. -\section master-ISDD-3-objectives Objectives +\section master-ISDD-2-objectives Objectives Once this tutorial is completed users will be able to: @@ -18,9 +18,9 @@ Once this tutorial is completed users will be able to: - Estimate the error in the reconstructed free energies using block analysis. - Assess the convergence of metadynamics simulations. -\section master-ISDD-3-resources Resources +\section master-ISDD-2-resources Resources -The \tarball{master-ISDD-3} for this tutorial contains the following files: +The \tarball{master-ISDD-2} for this tutorial contains the following files: - `diala.pdb`: a PDB file for alanine dipeptide in vacuo. - `topol.tpr`: a GROMACS run (binary) file to perform MD simulations of alanine dipeptide. - `do_block_fes.py`: a python script to perform error analysis of metadynamics simulations. @@ -28,15 +28,15 @@ The \tarball{master-ISDD-3} for this tutorial contains the following files: After dowloading the compressed archive to your local machine, you can unpack it using the following command: \verbatim -tar xvzf master-ISDD-3.tar.gz +tar xvzf master-ISDD-2.tar.gz \endverbatim -Once unpacked, all the files can be found in the `master-ISDD-3` directory. To keep things clean, -it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-3`. +Once unpacked, all the files can be found in the `master-ISDD-2` directory. To keep things clean, +it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-2`. \note This tutorial has been tested with PLUMED version 2.7.2 and GROMACS version 2019.6. -\section master-ISDD-3-intro Introduction +\section master-ISDD-2-intro Introduction In the previous tutorial, we have seen that PLUMED can be used to compute collective variables (CVs) on a pre-calculated trajectory. However, PLUMED is most often use to add forces on the CVs during a MD simulation, for example, @@ -110,21 +110,21 @@ Additional information can be found in the several review papers on metadynamics \endhidden We will play with a toy system, alanine dipeptide simulated in vacuo using the AMBER99SB-ILDN -force field (see Fig. \ref master-ISDD-3-ala-fig). +force field (see Fig. \ref master-ISDD-2-ala-fig). This rather simple molecule is useful to understand data analysis and free-energy methods. This system is a nice example because it presents two metastable states separated by a high free-energy barrier. It is conventional use to characterize the two states in terms of Ramachandran dihedral angles, which are denoted with \f$ \phi \f$ -(phi) and \f$ \psi \f$ (psi) in Fig. \ref master-ISDD-3-transition-fig. +(phi) and \f$ \psi \f$ (psi) in Fig. \ref master-ISDD-2-transition-fig. -\anchor master-ISDD-3-ala-fig +\anchor master-ISDD-2-ala-fig \image html belfast-2-ala.png "The molecule of the day: alanine dipeptide." -\anchor master-ISDD-3-transition-fig +\anchor master-ISDD-2-transition-fig \image html belfast-2-transition.png "Two metastable states of alanine dipeptide are characterized by their Ramachandran dihedral angles." -\section master-ISDD-3-ex Exercises +\section master-ISDD-2-ex Exercises -\subsection master-ISDD-3-ex-1 Exercise 1: My first metadynamics simulation +\subsection master-ISDD-2-ex-1 Exercise 1: My first metadynamics simulation In this exercise we will setup and perform a well-tempered metadynamics run using the backbone dihedral \f$ \phi \f$ as collective variable. During the calculation, we will also monitor the behavior of the other backbone dihedral \f$ \psi \f$. @@ -190,10 +190,10 @@ We can use `gnuplot` to visualize the behavior of the metadynamics CV \f$ \phi \ gnuplot> p "COLVAR" u 1:2 \endverbatim -\anchor master-ISDD-3-phi-fig +\anchor master-ISDD-2-phi-fig \image html munster-metad-phi.png "Time evolution of the metadynamics CV during the first 2 ns of a metadynamics simulation of alanine dipeptide in vacuum." -By inspecting Figure \ref master-ISDD-3-phi-fig, we can see that the system is initialized in one of the two metastable +By inspecting Figure \ref master-ISDD-2-phi-fig, we can see that the system is initialized in one of the two metastable states of alanine dipeptide. After a while (t=0.1 ns), the system is pushed by the metadynamics bias potential to visit the other local minimum. As the simulation continues, the bias potential fills the underlying free-energy landscape, and the system is able to diffuse in the @@ -214,7 +214,7 @@ the simulation time, the instantaneous value of \f$ \phi \f$, the Gaussian width We can use the `HILLS` file to visualize the decrease of the Gaussian height during the simulation, according to the well-tempered recipe: -\anchor master-ISDD-3-phihills-fig +\anchor master-ISDD-2-phihills-fig \image html munster-metad-phihills.png "Time evolution of the Gaussian height." If we look carefully at the scale of the y-axis, we will notice that in the beginning the value @@ -225,7 +225,7 @@ in well-tempered metadynamics relates the bias potential to the free energy. \warning The fact that the Gaussian height is decreasing to zero should not be used as a measure of convergence of your metadynamics simulation! -\subsection master-ISDD-3-ex-2 Exercise 2: Estimating the free energy as a function of the metadynamics CVs +\subsection master-ISDD-2-ex-2 Exercise 2: Estimating the free energy as a function of the metadynamics CVs One can estimate the free energy as a function of the metadynamics CVs directly from the metadynamics bias potential. In order to do so, the utility \ref sum_hills can be used to sum the Gaussian kernels @@ -251,7 +251,7 @@ as well as the boundaries and bin size of the grid, by using the following \ref The result should look like this: -\anchor master-ISDD-3-metad-phifes-fig +\anchor master-ISDD-2-metad-phifes-fig \image html munster-metad-phifes.png "Estimate of the free energy as a function of the dihedral phi from a 10ns-long well-tempered metadynamics simulation." To give a preliminary assessment of the convergence of a metadynamics simulation, one can calculate the estimate of the free energy as a function @@ -267,19 +267,19 @@ plumed sum_hills --hills HILLS --stride 100 --mintozero one free energy is calculated every 100 Gaussian kernels deposited, and the global minimum is set to zero in all profiles. The resulting plot should look like the following: -\anchor master-ISDD-3-metad-phifest-fig +\anchor master-ISDD-2-metad-phifest-fig \image html munster-metad-phifest.png "Estimates of the free energy as a function of the dihedral phi calculated every 100 Gaussian kernels deposited." These two qualitative observations: -1. the system is diffusing rapidly in the entire CV space (Figure \ref master-ISDD-3-phi-fig) -2. the estimated free energy does not significantly change as a function of time (Figure \ref master-ISDD-3-metad-phifest-fig) +1. the system is diffusing rapidly in the entire CV space (Figure \ref master-ISDD-2-phi-fig) +2. the estimated free energy does not significantly change as a function of time (Figure \ref master-ISDD-2-metad-phifest-fig) suggest that the simulation __might__ be converged. \warning The two conditions listed above are necessary, but not sufficient to declare convergence. -For a quantitative analysis of the convergence of metadynamics simulations, please have a look below at \ref master-ISDD-3-ex-4. +For a quantitative analysis of the convergence of metadynamics simulations, please have a look below at \ref master-ISDD-2-ex-4. -\subsection master-ISDD-3-ex-3 Exercise 3: Reweighting (unbiasing) a metadynamics simulation +\subsection master-ISDD-2-ex-3 Exercise 3: Reweighting (unbiasing) a metadynamics simulation In the previous exercise we biased \f$\phi\f$ and computed the free energy as a function of the same variable directly from the metadynamics bias potential using the \ref sum_hills utility. @@ -397,23 +397,23 @@ gnuplot> p "ffpsi.dat" u 1:2 w lp \endverbatim You can now compare the free energies as a function of \f$ \phi \f$ calculated: -1. directly from the metadynamics bias potential using \ref sum_hills as done in \ref master-ISDD-3-ex-2; +1. directly from the metadynamics bias potential using \ref sum_hills as done in \ref master-ISDD-2-ex-2; 2. using the reweighting procedure introduced in this exercise. -The results should be identical (see Fig. \ref master-ISDD-3-fescomp-fig). +The results should be identical (see Fig. \ref master-ISDD-2-fescomp-fig). -\anchor master-ISDD-3-fescomp-fig -\image html master-ISDD-3-fescomp-fig.png "Comparison between the free energy as a function of the dihedral phi calculated from the metadynamics bias potential (bias) and by reweighting (rew)". +\anchor master-ISDD-2-fescomp-fig +\image html master-ISDD-2-fescomp-fig.png "Comparison between the free energy as a function of the dihedral phi calculated from the metadynamics bias potential (bias) and by reweighting (rew)". -\subsection master-ISDD-3-ex-4 Exercise 4: Estimating the error in free energies using block-analysis +\subsection master-ISDD-2-ex-4 Exercise 4: Estimating the error in free energies using block-analysis In the previous exercise, we calculated the _final_ bias \f$ V(s) \f$ on the entire metadynamics trajectory and we used this quantity to calculate the correct statistical weight of each frame that we need to reweight the biased simulation. In this exercise, we will see how this information can be used to calculate the error in the reconstructed free energies and assess whether our simulation is converged or not. Let's first calculate the un-biasing weights \f$w\propto\exp\left(\frac{V(s)}{k_BT}\right)\f$ from the `COLVAR_REWEIGHT` -file obtained at the end of \ref master-ISDD-3-ex-3: +file obtained at the end of \ref master-ISDD-2-ex-3: \verbatim # Find maximum value of bias to avoid numerical errors when calculating the un-biasing weights @@ -480,14 +480,14 @@ gnuplot> p "err.blocks" u 1:2 w lp \endverbatim As expected, the error increases with the block size until it reaches a plateau in correspondence of a dimension -of the block that exceeds the correlation between data points (Fig. \ref master-ISDD-3-block-phi). +of the block that exceeds the correlation between data points (Fig. \ref master-ISDD-2-block-phi). -\anchor master-ISDD-3-block-phi +\anchor master-ISDD-2-block-phi \image html trieste-4-block-phi.png "Block analysis of a metadynamics simulation using phi as CV" __What can we learn from this analysis about the convergence of the metadynamics simulation?__ -\section master-ISDD-3-conclusions Conclusions +\section master-ISDD-2-conclusions Conclusions In summary, in this tutorial you should have learned how to use PLUMED to: - Setup and run a metadynamics calculation. @@ -497,8 +497,8 @@ In summary, in this tutorial you should have learned how to use PLUMED to: */ -link: @subpage master-ISDD-3 +link: @subpage master-ISDD-2 description: This tutorial explains how to use PLUMED to run metadynamics simulations -additional-files: master-ISDD-3 +additional-files: master-ISDD-2 diff --git a/user-doc/tutorials/master-ISDD-3/diala.pdb b/user-doc/tutorials/master-ISDD-2/diala.pdb similarity index 100% rename from user-doc/tutorials/master-ISDD-3/diala.pdb rename to user-doc/tutorials/master-ISDD-2/diala.pdb diff --git a/user-doc/tutorials/master-ISDD-3/do_block_fes.py b/user-doc/tutorials/master-ISDD-2/do_block_fes.py similarity index 100% rename from user-doc/tutorials/master-ISDD-3/do_block_fes.py rename to user-doc/tutorials/master-ISDD-2/do_block_fes.py diff --git a/user-doc/tutorials/master-ISDD-3/topol.tpr b/user-doc/tutorials/master-ISDD-2/topol.tpr similarity index 100% rename from user-doc/tutorials/master-ISDD-3/topol.tpr rename to user-doc/tutorials/master-ISDD-2/topol.tpr From ccdfa92907e88bbae616c12489342a5bf8493e94 Mon Sep 17 00:00:00 2001 From: Massimiliano Bonomi Date: Sun, 2 Apr 2023 18:38:05 +0200 Subject: [PATCH 3/6] plumed version --- user-doc/tutorials/a-master-ISDD-1.txt | 6 +++--- user-doc/tutorials/a-master-ISDD-2.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/user-doc/tutorials/a-master-ISDD-1.txt b/user-doc/tutorials/a-master-ISDD-1.txt index 8d16fdb525..821be318d5 100644 --- a/user-doc/tutorials/a-master-ISDD-1.txt +++ b/user-doc/tutorials/a-master-ISDD-1.txt @@ -1,4 +1,4 @@ -/** +a-master-ISDD-1.txt /** \page master-ISDD-1 Master ISDD tutorial 2023: Brief introduction to PLUMED \section master-ISDD-1-aims Aim @@ -20,7 +20,7 @@ Once this tutorial is completed, users will be able to: \section master-ISDD-1-software Software -In this and in the next tutorial, we will use two pieces of software: PLUMED version 2.7.2 and +In this and in the next tutorial, we will use two pieces of software: PLUMED version 2.8.2 and GROMACS version 2019.6. First, we need to install the software on your machine using `conda`. \subsection master-ISDD-1-install Installation @@ -205,7 +205,7 @@ tar xvzf master-ISDD-1.tar.gz Once unpacked, all the files can be found in the `master-ISDD-1` directory. To keep things clean, it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-1`. -\note This tutorial has been tested with PLUMED version 2.7.2. +\note This tutorial has been tested with PLUMED version 2.8.2. \section master-ISDD-1-ex Exercises diff --git a/user-doc/tutorials/a-master-ISDD-2.txt b/user-doc/tutorials/a-master-ISDD-2.txt index 67b0bcd986..bbb875f5be 100644 --- a/user-doc/tutorials/a-master-ISDD-2.txt +++ b/user-doc/tutorials/a-master-ISDD-2.txt @@ -34,7 +34,7 @@ tar xvzf master-ISDD-2.tar.gz Once unpacked, all the files can be found in the `master-ISDD-2` directory. To keep things clean, it is recommended to run each exercise in a separate sub-directory that you can create inside `master-ISDD-2`. -\note This tutorial has been tested with PLUMED version 2.7.2 and GROMACS version 2019.6. +\note This tutorial has been tested with PLUMED version 2.8.2 and GROMACS version 2019.6. \section master-ISDD-2-intro Introduction From eba8bfa4932fe7428e75a80443420fcd1d9c3bac Mon Sep 17 00:00:00 2001 From: Massimiliano Bonomi Date: Sun, 2 Apr 2023 20:05:47 +0200 Subject: [PATCH 4/6] =?UTF-8?q?Universit=C3=A9=20Paris=20Cit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user-doc/tutorials/a-master-ISDD-1.txt | 2 +- user-doc/tutorials/a-master-ISDD-2.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user-doc/tutorials/a-master-ISDD-1.txt b/user-doc/tutorials/a-master-ISDD-1.txt index 821be318d5..f786ad0ef8 100644 --- a/user-doc/tutorials/a-master-ISDD-1.txt +++ b/user-doc/tutorials/a-master-ISDD-1.txt @@ -7,7 +7,7 @@ The aim of this tutorial is to introduce users to the PLUMED syntax. We will go and print simple collective variables on a pre-calculated trajectory. This tutorial has been prepared by Max Bonomi (adapting a lot of material from other tutorials and Masterclass) for the Master In Silico Drug Design, held -at Universite' de Paris on March 6th, 2023. +at Université Paris Cité on March 6th, 2023. \section master-ISDD-1-lo Objectives diff --git a/user-doc/tutorials/a-master-ISDD-2.txt b/user-doc/tutorials/a-master-ISDD-2.txt index bbb875f5be..0ce0515ddf 100644 --- a/user-doc/tutorials/a-master-ISDD-2.txt +++ b/user-doc/tutorials/a-master-ISDD-2.txt @@ -6,7 +6,7 @@ a-master-ISDD-2.txt/** The aim of this tutorial is to train users to perform and analyze metadynamics simulations with PLUMED. This tutorial has been prepared by Max Bonomi (adapting a lot of material from other tutorials) for the Master In Silico Drug Design, held -at Universite' de Paris on March 6th, 2023. +at Université Paris Cité on March 6th, 2023. \section master-ISDD-2-objectives Objectives From 64abf1f194ab521b52dac7cf34fd7615b667f9e4 Mon Sep 17 00:00:00 2001 From: Massimiliano Bonomi Date: Wed, 5 Apr 2023 17:44:41 +0200 Subject: [PATCH 5/6] remove Ex. 3 --- user-doc/tutorials/a-master-ISDD-1.txt | 54 +------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/user-doc/tutorials/a-master-ISDD-1.txt b/user-doc/tutorials/a-master-ISDD-1.txt index f786ad0ef8..f9e62a933b 100644 --- a/user-doc/tutorials/a-master-ISDD-1.txt +++ b/user-doc/tutorials/a-master-ISDD-1.txt @@ -16,7 +16,6 @@ Once this tutorial is completed, users will be able to: - Write a simple PLUMED input file and use it with the PLUMED \ref driver to analyze a trajectory. - Print collective variables such as distances (\ref DISTANCE), torsional angles (\ref TORSION), and gyration radius (\ref GYRATION) using the \ref PRINT action. - Use \ref MOLINFO shortcuts. -- Define and use virtual atoms, such as \ref CENTER. \section master-ISDD-1-software Software @@ -324,62 +323,11 @@ You can use `gnuplot` to visualize the trajectory of the two CVs calculated with and written in the `COLVAR` file. __Are the two trajectories identical?__ -\subsection master-ISDD-1-ex-3 Exercise 3: Virtual atoms - -Sometimes, when calculating a CV, you may not want to use the positions of a number of atoms directly. -Instead you may want to define a virtual atom whose position is generated based on the positions -of a collection of other atoms. For example you might want to use the center of mass (\ref COM) or -the geometric center (\ref CENTER) of a group of atoms. - -In this exercise, you will learn how to specify virtual atoms and later use them to define a CV. -Let's start by having a look at the PLUMED input file below. - -\plumedfile -# Geometric center of first residue -first: CENTER ATOMS=1,2,3,4,5,6,7,8 -# Geometric center of last residue -last: CENTER ATOMS=427-436 - -# Distance between centers of first and last residues, with PBCs -d1: DISTANCE ATOMS=first,last -# Distance between centers of first and last residues, without PBCs -d2: DISTANCE ATOMS=first,last NOPBC - -# Print the two distances on COLVAR file every step -PRINT ARG=__FILL__ FILE=COLVAR STRIDE=__FILL__ -\endplumedfile - -The file above instructs PLUMED to: - -1. calculate the position of the virtual atom `first` as the \ref CENTER of atoms from 1 to 8; -2. calculate the position of the virtual atom `last` as the \ref CENTER of atoms from 427 to 436; -3. calculate the distance between the two virtual atoms `first` and `last` and saves it in `d1`; -4. calculate the distance (ignoring periodic boundary conditions) between the two virtual atom `first` and `last` and saves it in `d2`; -5. print the content of `d1` and `d2` in the file `COLVAR` for every frame of the trajectory. - -Notice that in the input above we have used two different ways of writing the atoms used in the \ref CENTER calculation: - -1. `ATOMS=1,2,3,4,5,6,7,8` is the explicit list of the atoms we need; -2. `ATOMS=427-436` is the range of atoms needed. - -Once you have prepared a PLUMED input file containing the above instructions, you can execute it on the trajectory `traj-broken.xtc` -by making use of the following command: - -\verbatim -plumed driver --mf_xtc traj-broken.xtc --plumed plumed.dat -\endverbatim - -Let's now analyze the output of the calculation by plotting the time series of the two CVs. -__Are they identical? What do you think is happening in those frames in which the two CVs are different?__ - -You can repeat the same analysis on `traj-whole.xtc` and compare with the previous trajectory. -__Are the results identical?__ - \section master-ISDD-1-conclusions Conclusions In summary, in this tutorial you should have learned how to use PLUMED to: - Analyze previously calculated trajectories using the \ref driver utility. -- Define virtual atoms and using \ref MOLINFO shortcuts. +- Define \ref MOLINFO shortcuts. */ From ffeb740f1fae36d214fed311dedb47ed4742e253 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Mon, 24 Apr 2023 08:32:48 +0200 Subject: [PATCH 6/6] Using ubuntu 22 in tests --- .github/workflows/ci.yml | 4 +++- src/maketools/nmcheck | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ba2f492e9..5ad8724f6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ env: jobs: linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -46,6 +46,8 @@ jobs: echo "LIBRARY_PATH=$HOME/opt/lib:$LIBRARY_PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PYTHONPATH=$HOME/opt/lib/plumed/python:$PYTHONPATH" >> $GITHUB_ENV + # this is to avoid errors on ubuntu 22. this is overridden in intel build + echo "FC=gfortran -fallow-argument-mismatch" >> $GITHUB_ENV - name: Install generic packages run: | sudo apt-get update -qq diff --git a/src/maketools/nmcheck b/src/maketools/nmcheck index f1e55b4adb..160f6efcaa 100755 --- a/src/maketools/nmcheck +++ b/src/maketools/nmcheck @@ -2,8 +2,9 @@ # NOTE: boost have unique global symbols and using them would make plumed lib not unloadable # NOTE: also shared_ptr in some GNU library version has the same problem :-( This seems not solvable. +# NOTE: ubuntu 22 have something in the std library, I remove std:: from the checks (GB) -LIST=$(nm -C "$@" 2>/dev/null | grep " u " | grep -v "boost::" | grep -v "std::_Sp_make_shared_tag") +LIST=$(nm -C "$@" 2>/dev/null | grep " u " | grep -v "boost::" | grep -v "std::_Sp_make_shared_tag" | grep -v " std::") if test -n "$LIST" ; then