The primary user-facing component is the
gmx Python module, which is implemented
in pure Python for consistency, transparency, and maintainability. It’s purpose is to
provide an idiomatic and stable interface to the API functionality.
Where functionality and behavior should mirror that of the C++ API, the Python module refers to the
gmx.core, which is a C++ extension that serves as a minimal wrapper to
The bindings in
gmx.core are written entirely in C++ using pybind11, a template header library,
to be easy to maintain along side the GROMACS C++ API.
Wrapper code in
gmx.core is contained in the
gmxpy C++ namespace.
gmxpy namespace contains implementation details only and should not be
used in other projects.
It is documented internally with doxygen syntax.
Wrapper code should only require linking to
Compilation should only require the public
The Python package CMake configuration uses
Gromacs::gmxapi CMake target provided by the GROMACS installation.
gmxapi library is provided in GROMACS 2019 and in a separate GROMACS fork at