MCMCSimulationLib is a C++ library that simplifies setting up Markov Chain Monte Carlo algorithms. It implements the following basic features:
- Markov chain Monte Carlo simulations for arbitrary models/theories/systems in C++
- A modular structure allowing for a brute force and simple implementation of your MCMC system
- Computation of expectation values, autocorrelation times and the time the system needs to be in equilibrium
- Storing and tracking of simulation parameters and results based on configuration files and text files
- A sophisticated evaluation and processing of simulation results in Python, in particular, also with respect to a simple integration of the simulation outcomes in the Deep Learning framework PyTorch
Further, it simplifies setting up and running simulations by providing support for:
- A Python wrapper for executing and evaluating simulations solely from Python
- A bash console/terminal interface allowing for running and preparing simulations based on configuration files
- Submitting and preparing simulations for an execution on a CPU/GPU cluster
In short, the library takes care of all the annoying parts of a Markov Chain Monte Carlo algorithm and leaves to you the implementation of the actual considered problem.
A detailed documentation of the MCMCSimulationLib can be found here.
Building MCMCSimulationLib requires the following software installed:
- A C++17-compliant compiler (for g++>=9)
- CMake >= 3.15
- Python >= 3.6 for building Python bindings and for running the evaluation scripts of the library
- Cookiecutter, e.g. by doing
pip install cookiecutter
(needed for auto-generating new projects) - Doxygen (optional, documentation building is skipped if missing)
as well as the following Python dependencies for supporting the evaluation and processing of simulation results:
- LatticeModelSimulationLib (https://github.com/statphysandml/LatticeModelSimulationLib)
- LatticeModelImplementations (https://github.com/statphysandml/LatticeModelImplementations)
Note that, currently, the two libraries use an older version of the MCMCSimulationLib. An update compatible with the newest version is in progress.
The project was generated with the help of the cookiecutter-cpp-project of the Scientific Software Center, IWR, Heidelberg University.
Furthermore, the library uses JSON for Modern C++ for reading and writing .json files and the tqdm single header c++ pretty progress bar by aminnj.
For bug reports/suggestions/complaints please file an issue on GitHub.
Or start a discussion on our mailing list: statphysandml@thphys.uni-heidelberg.de.