next up previous contents index
Next: Compilation of Gromacs Up: Gromacs/CPMD QM/MM Calculations Previous: Gromacs/CPMD QM/MM Calculations   Contents   Index

Technical Introduction

The whole interface code is divided into two parts: one part is embedded in the Gromacs code and the other in CPMD. Both, the modified Gromacs and the CPMD codes are compiled independently and communicate via files in the current working directory.

Since the Gromacs code acts as the driver, you first have to set up a regular Gromacs classical MD simulation in the usual way by building/providing a .pdf/.gro file and a .top file. Before running grompp, you also need to create an index file (usually named index.ndx) that lists the atoms of the QM subsystem and provide further parameters for the CPMD calculation like the size of QM-simulation box, plane-wave cutoff for CPMD, Coulomb cutoff, if any, etc (for details, see the rgmx script in the QM/MM examples).

During mdrun, the interface is controlled by two function calls:
a) init_cpmd() prepares the ground for the QM/MM interface. It sets the flags for the QM and MM atoms finds LINK atoms from the topology and prepares temporary structures to process the QM/MM data etc.
b) call_cpmd() first creates the CPMD input file CPMD_inp.run using a template CPMD_inp.tmpl and then kickstarts the CPMD code via a ``fork()/exec()'' or ``system()'' call. The interface is set to use ``fork''. If system call is preferred, you need to set the defined variable NOFORK to 1. call_cpmd() gets forces and energy from CPMD and appends them to Gromacs structures. Gromacs then moves the atoms and while evaluating the forces, calls CPMD again (this is the QM/MM loop). Thus this interface essentially performs a QM/MM Born-Oppenheimer MD simulation.


next up previous contents index
Next: Compilation of Gromacs Up: Gromacs/CPMD QM/MM Calculations Previous: Gromacs/CPMD QM/MM Calculations   Contents   Index
Costas Bekas 2008-09-04