Performing QM/MM hybrid simulation of chorismate mutase enzyme using CP2K and PLUMED2
In this tutorial we will use the quantum chemistry code CP2K patched with PLUMED2 to setup and run a hybrid QM/MM simulation. Our model system will be the chorismate mustase enzyme that catalyzes the conversion of chorismate to prephenate. The enzyme and surrounding water will be described by classical MM force fields while the substrate is described at the QM level (using the semi-empirical PM3 method)
Generally CP2K works with an additive QM/MM Hamiltonian:
\[\begin{equation}\label{EQ:E1} E^{TOT}(\textbf{R}_I,\textbf{R}_{\alpha})= E^{QM}(\textbf{R}_{\alpha}) + E^{MM}(\textbf{R}_I) + E^{QM-MM}(\textbf{R}_I,\textbf{R}_{\alpha}) \end{equation}\]where \(E^{QM}(\textbf{R}_{\alpha})\) is the pure quantum energy, \(E^{MM}(\textbf{R}_I)\) is the classical energy, and \(E^{QM-MM}(\textbf{R}_I,\textbf{R}_{\alpha})\) is a coupling term representing the mutual interaction energy of the two subsystems. These energy terms depend parametrically on the positions of the nuclei in the QM region \(\textbf{R}_{\alpha}\) and the positions of the classical atoms in the MM region \(\textbf{R}_I\).
The quantum subsystem is described at the density functional theory (DFT) level using the Quickstep algorithm. In CP2K, the classical subsystem is described through the use of the MM driver called FIST. The interaction energy term \(E^{QM-MM}(\textbf{R}_I,\textbf{R}_{\alpha})\) contains all non-bonded contributions between the QM and the MM sub-system:
\[\begin{equation}\label{EQ:E2} E^{QM-MM}(\textbf{R}_I,\textbf{R}_{\alpha}) = \sum_{I \in MM} q_I \int \frac{\rho(\textbf{r})}{|\textbf{r}-\textbf{R}_I|}d\textbf{r} + \sum_{I \in MM} \sum_{\alpha \in QM} v_{vdW}(|\textbf{R}_{\alpha}-\textbf{R}_I|) \end{equation}\]where \(\textbf{R}_I\) is the position of the MM atom a with charge \(q_I\), \(\rho(\textbf{r})\) is the total (electronic plus nuclear) charge density of the quantum system, and \(v_{vdW}\) is the van der Waals interaction between classical atom \(I\) and quantum atom \(\alpha\). The long-range electrostatic coupling contribution to the interaction energy can be classified according to the sophistication of the coupling scheme.
In “mechanical embedding” schemes there is no influence of the MM charge distribution on the QM system, and the electrostatic coupling is either neglected or established using fixed effective charges to the QM nuclei, such as charges according to the MM force field. In CP2K mechanical embedding is specified by setting E_COUPL NONE
For semiempirical (SE) methods or DFTB we use “Coulomb” embedding where the field from the classical ions acts on the Gaussian basis functions
\[\begin{equation}\label{EQ:ECoulomb} E_{es}^{QM-MM} = - \sum_{I\in MM} ⟨\phi_a|\frac{q_I}{|\textbf{r}-\textbf{R}_I|}|\phi_b⟩ \end{equation}\]This allows for the QM region to be polarized by the MM environment. This electrostatic embedding is specified in CP2K with ECOUPL COULOMB
For DFT calculations, we can use the efficient GEEP method. In this electrostatic embedding scheme, the point charge MM atoms are replaced with Gaussian charge distributions
\[\begin{equation}\label{EQ:GEEP1} \rho(|\textbf{r}-\textbf{R}_I|)=\left(\frac{1}{\sqrt{\pi}r_{c,I}}\right)\exp{\left(\frac{|\textbf{r}-\textbf{R}_I|^2}{r_{c,I}^2}\right)} \end{equation}\]where \(r_{c,I}\) is the width of the Gaussian charge of the classical atom \(I\). The electrostatic potential originated by the Gaussian charge distribution can be evaluated analytically:
\[\begin{equation}\label{EQ:GEEP2} v_I(\textbf{r},\textbf{R}_I) = \frac{erf\left(\frac{|\textbf{r}-\textbf{R}_I|}{r_{c,I}}\right)}{|\textbf{r}-\textbf{R}_I|} \end{equation}\]where \(erf(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\ dt\) is the error function. In GEEP, the error function is expanded as a linear combination of Gaussians and a residual function \(R_{low}\) not represented by the Gaussians, and should be rather smooth
\[\begin{equation}\label{EQ:GEEP3} v_I(\textbf{r},\textbf{R}_I) = \sum_{N_g} A_g \exp{\left( \frac{|\textbf{r} - \textbf{R}_I |^2}{r_{c,I}^2}\right)}+R_{low}(|\textbf{r}-\textbf{R}_I|) \end{equation}\]The GEEP method is specified in CP2K by setting E_COUPL GAUSS. The number of terms in the sum \(N_g\) is set by the input variable USE_GEEP_LIB. The \(A_g\) are the amplitudes of the Gaussian functions. The short range part is put onto grids in much the same manner as in the Gaussian Plane Wave (GPW) method.
When performing a QM/MM simulation of biochemical systems, one often wants to partition the system such that some covalent bonds cross the QM/MM boundary. In this case, at least one covalent bond will involve an atom from the QM region and one from the MM region, and therefore the electronic system of the QM region must in some way be truncated as the QM/MM boundary is crossed along these so-called “link” bonds. One solutions is to introduce a “dummy atom” that caps the electronic system of the QM region. We will use the “Integrated Molecular Orbital and Molecular Mechanics” or the IMOMM method. It is important to realize that the capping atom (usually a hydrogen atom) is not part of the real system, but is simply an atom that is introduced to truncate the electronic system of the QM region. The extra degrees of freedom introduced by this extra “dummy atom” are not present in the real system. In the IMOMM method these extra degree of freedom are removed by defining the position of the MM atom that is part of the “real” link bond in terms of the QM atom it is bonded to and the capping atom that replaces it in the QM model system. Specifically, the MM link atom is constrained to lie along the bond vector of the capping atom bond, via the relation
\[\begin{equation}\label{EQ:link1} \textbf{X}_{MM-link} = \alpha \textbf{X}_{capping} + (1-\alpha)\textbf{X}_{QM-link} \end{equation}\]Where \(\textbf{X}\) refer to the Cartesian coordinates of the subscripted atoms. Since the capping atom is often at a shorter distance than the real MM atom,\(\alpha\) is usually greater than unity. For example, when a hydrogen capping atom is used to cap a C-C single bond, \(\alpha\) is around 1.38
A depiction of the relationship between the three atoms (QM-link atom, capping atom and MM-link atom) is shown below.
Before we can run the simulation in CP2K, we will typically need to prepare the proper input files. In this case we will perform a QM/MM simulation of the chorismate mutase system. The coordinates for this system can be obtained from the protein data bank under PDB ID 2CHT.
The active complex is a trimer, forming three active sites, each of which catalyzes the reaction separately from the others. The PDB structure, however, contains twelve units with twelve inhibitors bound. We first need to remove the excess protein subunits and their inhibitors. As a first step, you can load the entire 2cht.pdb file into pymol and write only chains J, K, and L to a pdb file called protein.pdb
Now we will split the PDB into 5 different files: the protein, the three TSA inhibitors, and water molecules as we need to treat them separately.
It is important to consider the experimental conditions we want to simulate such as the pH and salt concentration. In this case we will assume a pH=7.4. In the crystal structure all the histidines are protonated, so we need to determine the protonation state for each histidine. See Assessing the protonations states of proteins. In this case, I have changed HIS 36 and 106 in each chain to HIE (histidine protonated at the epsilon position) and HIS 54 in each chain to be in the protonated state HIP, and saved a version of the pdb file that can be used in Ambertools as protein-amber.pdb.
In addition, before we can parameterize the ligand, we need to replace the inhibitors bound to the crystal structure with copies of the substrate, chorismate. This can be done using a molecular editor. A pdb file for each ligand was prepared for you using the Jmol editor. These files are named LigandA.pdb, LigandB.pdb, and LigandC.pdb.
We will now use the antechamber and parmchk2 tools from Ambertools to generate Amber force fields for our system. For the ligands we will use the “general Amber force field 2” (GAFF2) parameters. To assign partial charges we will use the AM1-bcc method. Remember that during production runs the ligands will be in the QM region and so we do not need to worry too much about the limitations of the AM1-BCC2 method of determining the partial charges since this is used only during the equilibration stages. Since the active complex has three ligands, we will perform this parameterization for each of them:
Here the -c bcc signals to use the AM1-BCC2 charge method, the net charge of the ligand is set with -nc -2, the name of the new residue we are generating is -rn CHA/CHB/CHC and we are spcifying to use the GAFF2 force field (-at gaff2). The parmchk2 tool checks the parameter file for possible missing firce field parameters and generates a parameter file that can be loaded into Leap in order to add these missing parameters. If possible, it will fill in the missing parameters by analogy to similar parameters. You should check these parameters before running a simulations. In the case where antechamber cannot empirically calculate a value or has no analogy it will add the comment: “ATTN: needs revision.” In this case you will have to manually parameterize this yourself.
We now can build the system with tLEap. First we load the default force fields (amberff14SB, tip3p, and GAFF2):
Now we load our three ligand moleucles, our protein, and water molecules:
Now we join all these pieces of our system into one with the combine command:
It is good practice to save a pdb of your system with the savePDB command and to perform a quick check of your system with the check command. At this stage, it is normal to have warnings for close contacts between atoms since we have added hydrogens and to have a net charge on the molecule since we have not added counter ions. If the final line is “Unit is OK,” we can continue. Now we need to solvate our system and add counter ions to neutralize our system.
Here we have set the size around our protein as 14 nm and specify to use a cubic box with the iso flag. Now we can save our topology and coordinates file with saveamberparm.
All of the above commands are provided in a leapin file. To execute it, you can type the following:
Before moving to CP2K, we will first minimize our system using the sander tool fro AmberTools. To run sander, one needs to specify the initial coordinates (-c system.rst7) and the topology file (-p system.parm7) and an input file containing the details of the minimization (-i sander_min.in). For our energy minimization, we will perform 4000 steps using two different methods: 2000 of gradient descent and 2000 of conjugate gradient. The sander input file looks like:
Run the minimization by executing the following command:
This will take a while. You can watch the progress of the minimization by typing
Finally, we convert the output restart file to an input coordinate file that can be read by CP2K using cpptraj. First load the topology file:
Then, we provide an input trajectory with trajin
We now have a topology file system.parm7 and energy minimized coordinates file system.min.0.rst7 that we can use in CP2K.
We will first run a quick energy minimization in CP2K. The CP2K input file cp2k_em.inp contains the information for our equilibration. A CP2K input is divided into different sections. The first section is the &GLOBAL section that contains general information regarding the kind of simulation to perform. Here we specify that we will do a geometry optimization (energy minimization) and set the output verbosity to low.
The next section is the &FORCE_EVAL section that contains the parameters needed to calculate the energy and forces. Molecular mechanics in CP2K is performed using the FIST algorithm:
Next, within the &FORCE_EVAL section we have the subsection &MM which includes the parameters to run a MM calculation. Here we specify to use the Amber force fields and to use our input topology file system.parm7. We specify how to handle the long-range electrostatics using the Ewald Summation method in the &POISSON subsection. Here we specify to use the smooth particle mesh using beta-Euler spines (SPME) method.
The next subsection is &SUBSYS which specifies the information of the system box size and coordinates. It is very important to use the current size of your simulation box in &FORCE_EVAL > &SUBSYS > &CELL. To get this information, you can type the following:
and add the X Y Z values in the ABC section and alpha beta gamma to the ALPHA_BETA_GAMMA section.
For an energy minimization run we include the section &MOTION to specify the parameters for the geometry optimization:
The full CP2K energy minimization file cp2k_em.inp is provided. Run this using CP2K:
First, check the em.out file for any warnings. In this case we have 2 warnings. The first warning is about missing forcefield terms. You could print this information using &FORCE_EVAL > &MM > &PRINT > &FF_INFO. In this case the non-critical missing terms are Urey-Bradley interactions which are not used in the Amber force fields, so we can ignore this warning. A second warning is that our CRD file lacks velocities and box information will not be read. This warning is not a problem either, since we do not have velocities yet, and box parameters were provided in the CP2K input file. At this stage you should also visualize the output structure file EM-pos-1.pdb to make sure nothing looks weird with the simulation box.
After the energy minimization step, we will equilibrate the temperature using a 5 ps classical MD simulations in the NVT ensemble. The CP2K input file for this run is called cp2k_equil_nvt.inp. One difference between this input file and the previous energy minimization file is that the &GLOBAL section now specifies that the RUN_TYPE will be MD
The main difference between this file and the previous energy minimization run is the &MD section which tells CP2K how to move the atomic nuclei. Here we are performing a MD simulation in the NVT ensemble.
In the above command we have specified the thermostat as canonical sampling through velocity rescaling with the &CSVR section. We will use our previous energy minimization restart file as the input coordinates specified with the &EXT_RESTART section
Have a look at the cp2k_equil_nvt.inp input file to make sure you understand what each section does. Then run the simulation with
The output file NVT-1.ener contains information about the energy and temperature during the simulation and can be used to check that the temperature is properly equilibrated.
After the NVT simulation has completed, we will perform a 50 ps NPT equilibration to let the pressure and density equilibrate by allowing the box volume to fluctuate. The CP2K input file for this run is called cp2k_equil_npt.inp. The main addition to this file from before is the introduction of a barostat to the &MD section:
After looking at the cp2k_equil_npt.inp input file, run the NPT simulation with
At the end of this NPT equilibration we are now ready to move to a QM/MM simulation. Make sure to update your CP2k input files to use the final equilibrated box coordinates from the NPT equilibration. The cell dimensions are printed in the NPT-1.cell file.
In the classical Amber MM forcefields, some hydrogen atoms do not have Lennard-Jones parameters. Before running any QM/MM simulation, we need to provide these parameters. We are going to add the values of the hydrogen atom that corresponds to the hydroxyl (alcohol group) in the GAFF forcefield to TIP3P water (:WAT@H1 and :WAT@H2) and to the hydroxyl groups from serine (:SER@HG), tyrosine (:TYR@HH), and threonine (:THR@HG1) residues. (threonine).
To do this we will use the parmed tool of the Ambertools package. First load the topology file:
We can check if there are missing parameters by printing an atom index (5724 corresponds to the hydrogen atom on the first water molecule) using the printDetails command:
which gives as the output
Here we see that the LJ Radius and LJ Depth values are set to 0. To see similar details for all the HO group hydrogens:
It is important to modify these missing parameters before running a QM/MM simulation to prevent unphysical interacts between the hydrogen atoms without LJ parameters and the QM subsystem. After this topology correction, the thermostat should stay stable during the QM/MM calculation. We use the changeLJSingleType command on different atom types to modify the force field parameters:
which gives as the output
Finally, we save a new topology using the command outparm and exit
You can also run parmed with the provided input file parmed.in
Usually, we will want to include relevant side chain amino acids in the QM region and link them to the MM region as described above. In the classical amber force fields, each atom is given a partial charge and the sum over all the partial charges equal the total charge on the residue. For example in Arg90 of our system, the total partial charges sum up to +1. When we move a side chain to the QM region, the QM calculation will always distribute a whole (integer) charge over all atoms (QM atoms plus a link atom). If the sum of partial charges of the atoms that were moved to the QM region is not initially a whole number, it will be forced into a whole number after the first QM step, where the charge of the link atom is distributed over the QM region. This will create a mismatch between QM and MM charges, changing the total charge of the entire system (QM plus MM regions). An example of Arg90 is shown here:
If the bond between \(C_\alpha\) and \(C_\beta\) is chosen for the link bond, the charge of the MM region would be -0.0362, while the charge of the QM region would be 1.0362. Since the QM calculation would place a pre-determined whole charge on the region (+1, in this case), the updated charge of the QM region after the first simulation step would change the total charge of the system to -0.0362, in this example. We can neutralize the MM region of the system by distributing an equal but opposite charge across the 6 main chain atoms of the residue in the MM region. For example the charge on the N is -0.3479. Adding 0.0362/6 to this value gives a new charge on the N atom of -0.3419. We can repeat this calculation for the remaining main chain atoms and check that the modified charges on the MM region add up to zero. Open parmed as before:
and apply the changes to the 6 main chain atoms:
When we move from MM to QM/MM hybrid simulations, the main changes are that we need to specify how the QM region will be handled in the &FORCE_EVAL section. We specify the electronic structure method to be employed by the QUIKSTEP algorithm within the &QS section. In this example, we specify the PM3 semiempirical method with a cutoff for the evaluation of the Coulomb term and the Exchange integrals in the SE calculation of 10.0 Angstroms. We also set the parameters needed to perform the SCF run within the &SCF section.
Notice that the charge in the QM system has been set to -1 with CHARGE -1 in the &DFT section. The chorismate enzyme has a total charge of -2 and we have added a +1 charge due to the addition of the Arg90 side chain to the QM region.
We will also have to specify how to embed the QM system and which atoms should be treaded at the QM level using the &QM_KIND section. For semiempirical methods we can use Coulombic electrostatic embedding. Here we include all the atom indices for the chorismate molecule and Arg90 side chain atoms from the topology file.
Notice that here we need to specify how to link the QM and MM subsystems. In this case we create a link between MM atom 1411 \((C_\alpha)\) and QM atom 1413 \((C_\beta)\) and we specify to use the IMOMM method for the link. The CP2K input file for this run is called cp2k_monitor.inp This will perform a 5 ps QM/MM simulation in the NVT ensemble. After looking at this file to make sure you understand what parameters are being set, you can run the QM/MM simulation as:
The output trajectory file is MONITOR-1.pos.dcd. If you look at the trajectory using VMD, you will see that no reaction occurred in this short amount of time. This is because of the significant energy barrier that must be overcome for the reaction to occur.
If CP2K is patched with plumed, we can monitor the time series of a collective variable. In this case we define the difference between the C-O bond distance (\(d_2\)) that will be breaking and the C-C bond (\(d_1\)) that will be forming as shown below:
Create a file called plumed-monitor.dat with the following:
In the above we are monitoring the C-C bond distance, the C-O bond distance, and the difference between them, and we are printing these values to the COLVAR file every 10 steps.
Now we need to add a &FREE_ENERGY section to the cp2k_monitor.inp file under the &MOTION section:
In order to observe the reaction in a reasonable amount of computational time, we will use metadynamics to bias the CV and explore new regions of CV space. To implement metadynamics, add the following lines to your plumed file and save the file as plumed.dat
Here we set the Gaussian hill height to 1.5 kcal/mol and the Gaussian width to be 0.2 Angstroms. A new Gaussian biasing kernel will be deposited every 100 steps.