Skip to content

Installation

Juvenal Yosa edited this page Nov 20, 2026 · 4 revisions

Barranquilla MOPAC builds like MOPAC, with CMake, plus the CUDA toolkit for the GPU.

Requirements

  • Linux with an NVIDIA GPU of compute capability 7.0 or newer (V100, T4, A100, H100, RTX 20xx and later). The GPU code is double precision, so data-centre GPUs (A100, H100, H200) are much faster than gaming cards.
  • CUDA toolkit 12 or 13, CMake ≥ 3.14, gfortran, BLAS/LAPACK, Ninja (optional).
  • QM/MM only: Python ≥ 3.10, OpenMM ≥ 8.4, NumPy, SciPy; CuPy puts the PME grid on the GPU.

GPU build

sudo apt-get install -y cmake gfortran ninja-build libblas-dev liblapack-dev   # CUDA from NVIDIA
git clone https://github.com/juvenalyosa/mopac_gpu.git
cd mopac_gpu
cmake -S . -B build -G Ninja -DGPU=ON -DCUDA_ARCHS=native -DCMAKE_BUILD_TYPE=Release
cmake --build build --target mopac --parallel
./build/mopac --version

This builds build/mopac and the library build/libmopac.so (used by QM/MM). CUDA_ARCHS=native compiles for the GPU of this machine; use all or a list such as 70;80;90 when the binary runs elsewhere.

To use a released version: git checkout v1.2.1-gpu (or the newest tag on the releases page) before configuring.

CPU-only build

cmake -S . -B build-cpu -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build-cpu --target mopac --parallel

Every example of this wiki also runs on the CPU build (the new keywords and the chemistry check included), without the GPU speed. The CPU build also compiles on macOS.

Python packages for QM/MM

conda install -c conda-forge openmm numpy scipy
pip install cupy-cuda12x        # optional, PME grid on the GPU

Check the installation

cd tests
python3 check_mozyme_gpu_tolerance.py ../build/mopac \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn.mop \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn_opt.mop \
    --handback ../benchmarks/publication_inputs/mop/protein_crambin_1crn_denout.mop

It must end with all checks passed.

Google Colab

No GPU of your own: open a notebook from colab/, choose a GPU runtime (A100 if available) and run the cells; the build takes about 10 minutes.

Clone this wiki locally