QMMM Simulation Tutorial Using DFTB3

The molecular dynamics simulation software GROMACS includes the QM/MM module, in which quantum chemistry calculations need to be carried out through external programs. The quantum chemistry interfaces currently provided by GROMACS include: Gamess UK, Gaussian, Mopac and Orca. DFTB is based on density functional theory The latest version of DFTB3, developed in 2011, can be successfully used to describe organic and biomolecular systems, and is 100 to 1000 times faster than conventional DFT methods.

Installation tutorial

First, get the GROAMCS 5.0 version from the official GROMACS website.

At the same time, you need to combine GROMACS with PLUMED, therefore, you also need to obtain PLUMED 2.1 or 2.1.x version.

Install PLUMED, but don't patch GROMACS yet.

Obtain the BGROMACS patch that implements DFTB,

Use the file you just downloaded to patch GROMACS:
tar-xvzfgromacs-5.0-dftb-v6-plumed.patch.tgz patch-p0gromacs-5.0-dftb-v6a-plumed.patch

Manually correct the references to libplumed.so or libplumed.a in the GROMACS home directory, Plumed.cmake and Plumed.inc files to make them consistent with your installation.

Compile GROMACS. Choose dftb as the value of GMX_QMMM_PROGRAM, and turn off CUDA and all parallel options (MPI, THREAD_MPI and OPENMP). It is best to compile as a double-precision version (GMX_DOUBLE=ON). You may encounter problems when linking to the MKL linear algebra library to the problem. If you solve these problems, please let us know.

Get parameter set

The DFTB method involves some parameter sets. After registering on the website, you can get the parameter files for free. For organic and biomolecules, we recommend the DFTB3 method and 3OB parameter sets. It should be noted that at present Supported chemical elements only include: H, C, N, O, P, S, F, Cl, Br, I, Na, K and Ca.

The parameter file obtained from the website cannot be directly read by a C language program like GROMACS. Therefore, it must be converted into a suitable format. You can download a script to complete this work. However, it should be noted that it needs to be specified in the script The chemical element to be processed.

If you need to apply D3 dispersion correction in the DFTB calculation, download the necessary parameter file and unzip it to the folder where the DFTB parameter file is located.


Since the original GROMACS QM/MM interface is used, you need to understand this part of the official GROMACS instructions. It should be noted that the topology file must be modified when performing QM/MM simulation, and in the current implementation, the QM area must be completely in a molecule (from a topological point of view).

The options related to QM/MM in the run input file (.mdp) are summarized as follows:
QMMM=yes QMMM-grps=QMsystem;
QMMMscheme=normal QMmethod=RHF;
QMcharge=0; MMchargescalefactor=1.;
When using DFTB to run QM/MM, there are some additional options:

In addition, you need to pay attention to the following general settings when performing QM/MM simulation:
It is recommended to use cutoff-scheme=group, because we are not sure how the Verlet algorithm is used in QM/MM

In some simulations, if you do not specify the nstpcouple variable explicitly, you will often get wrong results when performing NPT simulation. We recommend setting nstpcouple=1 in the running input file, or using NVT simulation.

* For Research Use Only.