GOMC is an acronym for GPU Optimized Monte Carlo. GOMC is a parallel molecular simulation code designed for high-performance simulation of large systems that runs on both CPUs, with or without OpenMP, and NVIDIA GPUs.
Current Release: 2.80 (12/03/2025)
The latest stable release is available on the main branch. The development branch is used for staging changes that should be stable but have not been thoroughly tested. If you encounter a problem running GOMC using the main branch, please try the development branch to see if your problem has already been fixed. If not, please post a GitHub issue, with the requested documents and details, so we can investigate the problem.
You can find many example configurations for running GOMC in our GOMC Examples repository. We recommend the GOMC Project Website and the user manual for additional information and examples.
If using GOMC in your work, we ask that you cite the following article: Y. Nejahi, M. Soroush Barhaghi, J. Mick, B. Jackman, K. Rushaidat, Y. Li, L. Schwiebert, J. Potoff. SoftwareX, 9, 20-27 (2019). doi: 10.1016/j.softx.2018.11.005.
If you are using some more recent features of GOMC, such as the MultiParticle move, please consider also citing the following article: Y. Nejahi, M. Soroush Barhaghi, G. Schwing, L. Schwiebert, J. Potoff. SoftwareX, 13, 100627 (2021). doi: 10.1016/j.softx.2020.100627.
- Clone or download our code from GitHub:
git clone https://github.com/GOMC-WSU/GOMC.git
- Go into the GOMC directory:
cd GOMC - Give execution permission:
chmod u+x metamake.sh
- Run metamake file:
./metamake.sh
- Step 4 will place all the executables in the
bindirectory.
./metamake.sh accepts a list of which ensembles to compile. Default behavior, listing no ensembles, is to compile all CPU ensembles and, if CUDA is available, all GPU ensembles. Multiple ensemble names must be separated by spaces. Current accepted values are: CPU to compile all CPU ensembles, GPU to compile all GPU ensembles, or you can compile ensembles individually by using any of the following keywords:
NVT, NPT, GCMC, GEMC, GPU_NVT, GPU_NPT, GPU_GCMC, GPU_GEMC.
NOTE: Building GOMC requires CMake version 3.18 or newer. CMake is available in most Linux distributions (as cmake). If you wish to utilize NVIDIA graphics cards you will need to install the NVIDIA toolkit before compiling. The metamake file will automatically detect the location of your CUDA installation. More detailed info can be found in the user manual "User Manual".
- If building GPU executables and the CUDA version is older than CUDA 11, download the CUB library.
- If building GPU executables and the CUDA version is older than CUDA 11, extract the CUB library and copy the "cub" folder from the CUB library into the "lib" folder inside the GOMC directory.
- Open the Windows-compatible CMake GUI.
- Set the Source Folder to the GOMC root folder.
- Set the Build Folder to your build folder.
- Click
Configure, select your compiler/environment. - Click
Generateafter CMake finishes configurating the project. - Click
Open Projectafter CMake finishes generating the project. - Using the solution in the IDE, build GOMC per the IDE's standard release compilation/executable generation methods.
NOTE: You can also use CMake from the Windows command line if its directory is added to the PATH environment variable.
You can set the number of OpenMP threads using the +pN argument, where N is the number of threads. For example:
./GOMC_GPU_GEMC +p4 in.confruns a simulation with the Gibbs ensemble on the GPU using 4 OpenMP threads and loads configuration settings from the file "in.conf".