Molssi Driver Interface Library
Molssi Driver Interface Library Documentation


The MolSSI Driver Interface (MDI) project provides a standardized API for fast, on-the-fly communication between computational chemistry codes. This greatly simplifies the process of implementing methods that require the cooperation of multiple software packages and enables developers to write a single implementation that works across many different codes. The API is sufficiently general to support a wide variety of techniques, including QM/MM, ab initio MD, machine learning, advanced sampling, and path integral MD, while also being straightforwardly extensible. Communication between codes is handled by the MDI Library, which enables tight coupling between codes using either the MPI or TCP/IP methods.

MDI uses a driver/engine paradigm in which drivers orchestrate complex simulations by controlling engines through the use of an API-like command set that is defined by the MDI Standard. A driver will typically implement one or more high-level methods, such as advanced sampling or QM/MM, while relying on one or more engines to perform lower-level operations, such as energy and force evaluation.

In total, MDI consists of the following components:

  • Drivers, which are codes that control the high-level program flow of one or more other codes.
  • Engines, which are codes capable of responding to commands from an external driver.
  • The MDI Standard, which is an API-like definition of a set of commands that can be sent from a driver to an engine, and that cause the engine to respond in a clearly defined way.
  • The MDI Library, which is a library that enables inter-code communication in compliance with the MDI Standard.


MDI is designed to support a wide variety of different calculation types, with the MDI Standard defining a variety of simple commands that can be used to develop many drivers for many purposes. Potential application areas for MDI include ab initio molecular dynamics (AIMD), path integral molecular dynamics (PIMD), advanced sampling, forcefield development, and QM/MM. More specifically, here are some examples of what can be accomplished using MDI:

  • Run an ab initio molecular dynamics (AIMD) calculation in which a quantum mechanics (QM) code evaluates nuclear forces and a molecular mechanics (MM) code performs time integration.
  • Run an MD simulation in which the nuclear forces include contributions from two different MM codes.
  • Implement an advanced sampling technique (i.e. metadynamics, replica exchange, etc.) in a self-contained driver that can use other codes to compute forces.
  • Implement a new forcefield in a self-contained engine that is compatible with multiple MM codes.
  • Run QM/MM simulations.

More generally, MDI can support any use case that can be implemented using the command set defined by the MDI Standard. For use cases that require additional commands, unofficial extensions to the MDI Standard can be straightforwardly developed. Feel free to contact us if your use case requires additions to the MDI Standard, and we may be able to provide advice about the process. Extensions that prove useful to the broader community may be considered for official incorporation into the MDI Standard.

Getting Started

For guidance on running simulations using MDI-based drivers and engines, please first complete the User Tutorial. Afterwards, please read Launching Codes with the MDI Library.

If you intend to develop an MDI-based driver or engine, first do the above. Then, complete the Driver Development Tutorial and familiarize yourself with the MDI Library Functions.

For lists of available MDI-based drivers and engines, see Drivers and Engines.

Source Code

The source code of the MDI library is available at GitHub at

Main Documentation


The following codes can be directly run as MDI engines:

Through QCEngine, it is additionally possible to control the following codes via MDI:

The following codes support i-PI, with which MDI is compatible (see the -ipi option). Note that the i-PI command set is different from that of the MDI Standard.


Reporting Bugs, Issues, and Improvements

Bugs and suggestions for improvements can be reported via GitHub Issues or by emailing the main author directly.


The MDI Library is primarily written by Taylor Barnes <tbarn.nosp@m.es1@.nosp@m.vt.ed.nosp@m.u>, a Software Scientist at MolSSI.


The MDI Library is released under the 3-Clause BSD License. See the LICENSE file for more details.


This work was supported by the Molecular Sciences Software Institute under U.S. National Science Foundation grant ACI-1547580.

MDI builds upon the work of numerous development groups, without whom it could not exist. The syntactical structure of the MDI Standard, including the fundamental command-response communication pattern, is modelled after that used by the i-PI project, as is the string-based representation of commands. The Node System draws inspiration from the techniques used by several molecular mechanics packages, especially LAMMPS and OpenMM, to enable modular code additions. The unit conversions available through the MDI Library were provided by the QCElemental project. Certain details of the communication protocols implemented by the MDI Library, especially pertaining to MPI-based communication in the MPMD regime, were informed by the accomplishments of the CSlib library. The library-based communication protocol was developed in response to discussions with the EXAALT team. The interface, error handling, data types, and numerous other elements of the MDI Library are modelled after the MPI Standard. A distribution of the MDI Library for Python is provided by Conda Forge.