MRMD is a stand-alone, open-source C++ package implementing the (Hamiltonian) adaptive resolution simulation ((H-)AdResS) method, which concurrently couples regions of different resolution — e.g. atomistic Lennard-Jones and ideal gas — to simulate open molecular systems that exchange particles and energy with a reservoir.
The software exposes all of its algorithms as composable building blocks, facilitating both running AdResS simulations and developing the method itself.
For exhaustive installation instructions see the documentation.
- A C++ compiler with C++20 support
- CMake >= 3.25
git clone https://github.com/XzzX/mrmd
cmake -S mrmd \
-B mrmd-build \
-DCMAKE_BUILD_TYPE=Release \
-DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_OPENMP=ON \
-DKokkos_ARCH_NATIVE=ON
cmake --build mrmd-build --parallel 8
cd mrmd-build/examples/00_IdealGas_NVE
./00_IdealGas_NVEcd mrmd-build
ctest --parallel 4 --output-on-failureMRMD can be installed and consumed as a library from other CMake projects:
cmake --install mrmd-build --prefix /path/to/installThe API documentation is published at https://xzzx.github.io/mrmd/. To build it locally, install Doxygen (and optionally Graphviz for diagrams) and run:
cmake -S mrmd -B mrmd-build -DMRMD_BUILD_DOCS=ON
cmake --build mrmd-build --target docsThe HTML output is written to mrmd-build/docs/html/index.html.
The examples directory contains a series of self-contained simulations that build on each other,
from a minimal, non-interacting system up to a full multi-resolution production workflow. Each example is built
as its own executable in mrmd-build/examples/<name>. Work through them in numerical order to get familiar with MRMD.
See the tutorials section in the documentation for further details.
Contributions are welcome! Please open an issue to discuss a bug or feature request before submitting a pull request. When contributing code, follow the existing code style (enforced via .clang-format) and ensure all tests pass.
format.sh formats all tracked C++ sources (*.cpp, *.hpp) in place according to
.clang-format. It is also wired up as a pre-commit hook in
.pre-commit-config.yaml, so formatting happens automatically on every commit.
Run it manually from the repository root:
./format.shEnable the commit hook once per clone:
pip install pre-commit
pre-commit installHard dependencies of the script:
clang-format-18— exactly this versioned binary name must be on yourPATH; a plainclang-formator a different version will not be picked up
The pre-commit hook additionally requires pre-commit itself.
If you use MRMD in your research, please cite it using the metadata in CITATION.cff or the following:
Sebastian Eibl and Julian Friedrich Hille. Multi Resolution Molecular Dynamics (MRMD). doi:10.5281/zenodo.17698862
MRMD is licensed under the Apache License 2.0. See LICENSE for details.