Skip to content

Instantly share code, notes, and snippets.

@link89
Last active December 19, 2025 12:43
Show Gist options
  • Select an option

  • Save link89/038daca72165e5b38135ba9a79c9da3c to your computer and use it in GitHub Desktop.

Select an option

Save link89/038daca72165e5b38135ba9a79c9da3c to your computer and use it in GitHub Desktop.
Build gromacs with deepmd support
#!/bin/bash
set -e
source ./activate
module load gcc/9.3
module load cmake/3.21
# module unload gcc
[ -d gromacs-2020.2 ] || {
wget http://ftp.gromacs.org/pub/gromacs/gromacs-2020.2.tar.gz
tar -xvf gromacs-2020.2.tar.gz
}
[ -f patch.done ] || {
dp_gmx_patch -d gromacs-2020.2 -v 2020.2 -p
touch patch.done
}
pushd gromacs-2020.2
[ -f build.done ] || {
export CC=$(which gcc)
export CXX=$(which g++)
# export CMAKE_PREFIX_PATH="/path/to/fftw-3.3.9" # fftw libraries
rm -rf build || true
mkdir -p build
cd build
env | grep -i cuda
which cmake
# -DCMAKE_CXX_STANDARD=14 \
cmake .. \
-DGMX_MPI=ON \
-DGMX_GPU=CUDA \
-DGMX_CUDA_TARGET_SM=80 \
-DCMAKE_CUDA_ARCHITECTURES=80 \
-DCUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME \
-DCMAKE_INSTALL_PREFIX=../dist
make -j 4
make install
touch build.done
}
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment