diff --git a/prereqs/Makefile b/prereqs/Makefile index 304f1b007b..a3f0ef6d61 100644 --- a/prereqs/Makefile +++ b/prereqs/Makefile @@ -56,7 +56,7 @@ endif .NOTPARALLEL: # keep in alphabetical order, dependencies go below -SUBDIRS += ambertools openmm pips PyQt Python +SUBDIRS += ambertools pips PyQt Python # All needed subdirectories must be set by now. diff --git a/prereqs/openmm/Makefile b/prereqs/openmm/Makefile deleted file mode 100644 index 2d26534e0e..0000000000 --- a/prereqs/openmm/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -PREREQ_MAKE = 1 -TOP = ../.. -include $(TOP)/mk/config.make - -# Using OpenMM builds from https://anaconda.org/conda-forge/openmm/files -VERSION = 8.0.0 - -ifeq ($(OS),Darwin) -PLATFORM = mac -ifeq ($(MACOS_ARCH),arm64) -DISTRIBUTION = openmm-8.0.0-mac-py311h68ae2cc_1_apple.tar.bz2 -else -DISTRIBUTION = openmm-8.0.0-mac-py311hf4819f2_1_apple.tar.bz2 -endif -# Tristan Croll provided these optional Mac Metal libraries used with OpenMM platform HIP -MAC_METAL_PLUGIN = openmm-8.0.0-mac-metal.tar.bz2 -endif -ifeq ($(OS),Linux) -PLATFORM = linux -# The Linux distribution comes from Tristan Croll -# compiled Oct 31, 2022 with the same compiler as ChimeraX. -# Using CUDA 11.2 -DISTRIBUTION = openmm-8.0.0-linux-py311_cuda112.tar.bz2 -endif -ifeq ($(OS),Windows) -PLATFORM = windows -# Using CUDA 11.2 -DISTRIBUTION = openmm-8.0.0-win-py311h9957787_1.tar.bz2 -endif - -SOURCE = $(tmpdir)/OpenMM-$(VERSION)-$(PLATFORM) -OPENMM_LIB_INSTALL = $(libdir)/openmm - -# Beware the Windows OpenMM has the Python code in a different location -# than Mac and Linux, so one patch for OpenMM Python code won't find the -# Python file on all 3 platforms. Also the Windows Python has /r/n DOS -# line endings and patches expecting /n line endings will fail. -# Probably easiest to make a separate Windows patch. -PATCHES = $(wildcard OpenMM-$(OS)-*.patch) - -ifeq ($(OS),Windows) - -install: $(SOURCE) - cd $(SOURCE) ; \ - $(RSYNC) Lib/site-packages/openmm $(PYSITEDIR) ; \ - $(RSYNC) Library/lib/ --exclude site-packages $(OPENMM_LIB_INSTALL) - -else - -install: $(SOURCE) - cd $(SOURCE) ; \ - $(RSYNC) lib/python$(PYTHON_VERSION)/site-packages/openmm $(PYSITEDIR) ; \ - $(RSYNC) lib/ --exclude python$(PYTHON_VERSION) $(OPENMM_LIB_INSTALL) - -endif - -app-install: install - $(RSYNC) $(OPENMM_LIB_INSTALL)/* $(app_shlibdir) - $(RSYNC) $(PYSITEDIR)/openmm $(APP_PYSITEDIR) -ifeq ($(OS),Windows) - cd $(app_shlibdir); mv OpenMM*.lib libs/ -endif - -$(SOURCE): $(DISTRIBUTION) $(MAC_METAL_PLUGIN) - -mkdir $(SOURCE) - tar xf $(DISTRIBUTION) -C $(SOURCE) --no-same-owner -ifneq (,$(PATCHES)) - for p in $(PATCHES); do \ - (cd $(SOURCE) && patch -f -p0) < $$p ; \ - done -endif -ifeq ($(OS),Windows) - cd $(SOURCE)/Lib ; \ - chmod a+x site-packages/openmm/*.pyd ; \ - chmod a+x site-packages/openmm/app/internal/*.pyd - cd $(SOURCE)/Library/lib ; \ - chmod a+x *dll *.lib plugins/*.dll plugins/*.lib -endif -ifeq ($(OS),Darwin) - tar xf $(MAC_METAL_PLUGIN) -C $(SOURCE)/lib/plugins -endif - -$(DISTRIBUTION): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/openmm/$(DISTRIBUTION) - -ifeq ($(OS),Darwin) -$(MAC_METAL_PLUGIN): - $(FETCH_PREREQ) $(PREREQS_ARCHIVE)/openmm/$(MAC_METAL_PLUGIN) -endif - -upload_new_version: - $(RSYNC) $(DISTRIBUTION) $(MAC_METAL_PLUGIN) $(PREREQS_UPLOAD)/openmm - -clean: - rm -rf $(SOURCE) $(DISTRIBUTION) diff --git a/prereqs/openmm/OpenMM-Windows-plugins.patch b/prereqs/openmm/OpenMM-Windows-plugins.patch deleted file mode 100644 index b34981bca5..0000000000 --- a/prereqs/openmm/OpenMM-Windows-plugins.patch +++ /dev/null @@ -1,24 +0,0 @@ -*** Lib/site-packages/openmm/__init__.py~ Wed May 10 16:58:02 2017 ---- Lib/site-packages/openmm/__init__.py Fri May 12 16:54:05 2017 -*************** -*** 24,30 **** - if os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path): - pluginLoadedLibNames = Platform.loadPluginsFromDirectory(os.path.join(version.openmm_library_path, 'plugins')) - else: -! pluginLoadedLibNames = Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory()) - - if sys.platform == 'win32': - os.environ['PATH'] = _path ---- 24,35 ---- - if os.getenv('OPENMM_PLUGIN_DIR') is None and os.path.isdir(version.openmm_library_path): - pluginLoadedLibNames = Platform.loadPluginsFromDirectory(os.path.join(version.openmm_library_path, 'plugins')) - else: -! # Assume that openmm is installed in LIB/site-packages -! # and plugins are in LIB/plugins. We are in -! # site-packages/openmm -! import os.path -! pluginDir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "plugins") -! pluginLoadedLibNames = Platform.loadPluginsFromDirectory(pluginDir) - - if sys.platform == 'win32': - os.environ['PATH'] = _path diff --git a/prereqs/openmm/README.txt b/prereqs/openmm/README.txt deleted file mode 100644 index 46a41c20d1..0000000000 --- a/prereqs/openmm/README.txt +++ /dev/null @@ -1,41 +0,0 @@ -Build notes for OpenMM ----------------------- - -The 7.6 builds came from https://anaconda.org/conda-forge/openmm/files -The linux build comes from Tristan Croll using the compiler used by ChimeraX. - -On Linux, we need OpenMM built with the same C++ compiler as the rest -of ChimeraX so that ISOLDE can link to both ChimeraX and OpenMM libraries. -At this time, that is CentOS 7 with devtoolset-9. And it is -devtoolset-9 so OpenMM can use newer C++ constructs. See ticket #3756. -In the openmm_build3.zip file with a build script and a singularity -definition file that is used to create the .tar.gz file. And that -.tar.gz is placed on the chimerax web site for downloading. - -Old Build notes for OpenMM --------------------------- - -On Mac, Linux and Windows using the OpenMM builds from -https://anaconda.org/omnia/openmm/files -- Version: 7.3.0 Label: main. - -The files are renamed from PLATFORM/openmm-VERSION-PYVER.tar.bz2 to - openemm-VERSION-PLATFORM-PYVER.tar.bz where PLATFORM changes - { win-64: windows, osx-64: mac, linux-64: linux } - -Even Older Build notes for OpenMM ---------------------------------- - -Formerly used the OpenMM 7.0.1 binary installers on Mac and Linux that -include precompiled C++ libraries. The SWIG Python wrapper is compiled by -the install.sh script on our machine. The C++ ABI used by our compiler -must match the ABI used in the OpenMM C++ libraries. Specifically on -Linux the OpenMM libraries use a G++ version 4.9(?) compiler and G++ -5.x uses a different ABI. - -On Windows the OpenMM 7.0.1 binary installers only support Python 3.3 and -3.4 and use Visual Studio 10 while we use Visual Studio Community 2015 -(not sure if these have compatible ABIs). So instead we use the OpenMM -conda install on Windows for Python 3.5 and copy the resulting binaries -to a tar file to use in our builds. These will need to be updated when -we update to Python 3.6. - diff --git a/prereqs/openmm/openmm_linux_compile/README.txt b/prereqs/openmm/openmm_linux_compile/README.txt deleted file mode 100644 index f89bb297c3..0000000000 --- a/prereqs/openmm/openmm_linux_compile/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -These scripts provided by Tristan Croll to compile OpenMM using a CentOS 7 Docker Singularity image -using a C++ compiler compatible with the ChimeraX distribution compiler. This allows ISOLDE -to link to both OpenMM and ChimeraX atomic_lib using the same C++ compiler. - -These scripts were provided in ChimeraX ticket #3756 and the compiled build was provided -in ticket #4661. diff --git a/prereqs/openmm/openmm_linux_compile/build.sh b/prereqs/openmm/openmm_linux_compile/build.sh deleted file mode 100755 index 6fa6c78219..0000000000 --- a/prereqs/openmm/openmm_linux_compile/build.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -set -e - -cd /tmp -git clone https://github.com/openmm/openmm.git -cd openmm -git checkout 7.5_branch -cd .. - - -# CFLAGS -export MINIMAL_CFLAGS="-g -O3" -export CFLAGS="$MINIMAL_CFLAGS" -export CXXFLAGS="$MINIMAL_CFLAGS" -export LDFLAGS="$LDPATHFLAGS" - -INSTALL=`pwd`/install -if [ -e $INSTALL ]; then - rm -rf $INSTALL -fi - -CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL" - -# Don't build tests -CMAKE_FLAGS+=" -DBUILD_TESTING=OFF" - -# Ensure we build a release -CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Release" - -# setting the rpath so that libOpenMMPME.so finds the right libfftw3 -#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.." -# Use NVIDIA CUDA -CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so" -CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/nvcc" -CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda/" -CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda/include" -CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/" -# So that FindCuda correctly finds libcuda.os -CMAKE_FLAGS+=" -DCMAKE_LIBRARY_PATH=/usr/local/cuda/compat/" -echo "CMAKE_FLAGS = $CMAKE_FLAGS" -# Use AMD APP SDK 3.0 -#CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/" -CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so" -# Generate API docs -CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON" -# Set location for FFTW3 -CMAKE_FLAGS+=" -DFFTW_INCLUDES=/usr/include" -CMAKE_FLAGS+=" -DFFTW_LIBRARY=/usr/lib64/libfftw3f.so" -CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=/usr/lib64/libfftw3f_threads.so" -# Necessary to find GL headers -# CMAKE_FLAGS+=" -DCMAKE_CXX_FLAGS_RELEASE=-I/usr/include/nvidia/" - -if [ -e build ]; then - rm -rf build -fi -mkdir build -cd build -cmake3 ../openmm $CMAKE_FLAGS -make -j12 all install - -export CFLAGS="$MINIMAL_CFLAGS" - -export CXXFLAGS="$MINIMAL_CFLAGS" -export LDFLAGS="$LDPATHFLAGS" - -make -j20 PythonInstall - -make install - -export OPENMM_INCLUDE_PATH=$INSTALL/include -export OPENMM_LIB_PATH=$INSTALL/lib -PYTHON_VER=$(python3 -c 'import sys; print("%s.%s" % sys.version_info[0:2])') -(cd python && python3 setup.py install --install-lib $INSTALL/lib/python${PYTHON_VER}/site-packages) -find $INSTALL/lib -name \*.so -exec chrpath -d {} \; - -cd .. - -(cd install/lib && for so in plugins/*.so; do ln -s $so .; done && strip *.so) - -OPENMM_VER=$(python3 -c 'vtxt = open("build/python/simtk/openmm/version.py").read(); exec(vtxt); print(short_version)') -PYTHON_VER_NODOT=$(python3 -c 'import sys; print("%s%s" % sys.version_info[0:2])') -CUDA_VER=$(nvcc --version | awk '$4 == "release" {print $5}' | sed 's/[,.]//g') -TAR_FILE=openmm-${OPENMM_VER}-linux-py${PYTHON_VER_NODOT}_cuda${CUDA_VER}_1.tar.bz2 -tar -jcf ${TAR_FILE} -C install . - -cp ${TAR_FILE} /host -cd /tmp -rm -fr openmm -rm -fr build -rm -fr $INSTALL - diff --git a/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def b/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def deleted file mode 100644 index e1c2a53136..0000000000 --- a/prereqs/openmm/openmm_linux_compile/centos-7-devtoolset-9-cuda.def +++ /dev/null @@ -1,73 +0,0 @@ -Bootstrap: docker -From: nvidia/cuda:11.2.1-devel-centos7 - -%setup - # Runs on host. The path to the image is $SINGULARITY_ROOTFS - -%post - # Post setup, runs inside the image - - #Host directory mount point - mkdir /host - - #Add CUDA paths - echo "\n #Cuda paths \n" >> /environment - echo 'export CPATH="/usr/local/cuda/include:$CPATH"' >> /environment - echo 'export PATH="/usr/local/cuda/bin:$PATH"' >> /environment - echo 'export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"' >> /environment - echo 'export CUDA_HOME="/usr/local/cuda"' >> /environment - - # for Python source install - for some reason /usr/local/lib isn't on the library path by default - echo 'export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"' >> /environment - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" - # install dependencies - - yum install -y centos-release-scl epel-release - yum groupinstall -y "Development Tools" - # OpenMM requires swig3 and cmake3. Remove the old versions installed by the group install - yum remove -y swig cmake - yum install -y \ - devtoolset-9 \ - swig3 \ - cmake3 \ - wget \ - bzip2 bzip2-devel\ - chrpath \ - git \ - doxygen \ - fftw-devel -# rh-python39 rh-python39-python-devel rh-python39-python-pip \ -# rh-python39-python-numpy rh-python39-python-Cython rh-python39-python-wheel \ -# Python 3.9 not yet available as rh package. Need to build from source - -# scl enable rh-python39 "pip install sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake" - - yum -y install gcc openssl-devel libffi-devel - - wget https://github.com/python/cpython/archive/refs/tags/v3.9.6.tar.gz - tar xvf v3.9.6.tar.gz - cd cpython-3.9.6 - ./configure --enable-shared --with-ensurepip=install - make -j20 - make install - - cd .. - - pip3 install lxml numpy Cython - - - - - -%runscript - #Executes when the "singularity run" command is used - #Useful when you want the container to run as an executable - - - scl enable devtoolset-9 /host/build.sh - - -%test - #Test script to verify that the image is built and running correctly - - diff --git a/prereqs/openmm/openmm_linux_compile/run.sh b/prereqs/openmm/openmm_linux_compile/run.sh deleted file mode 100755 index 0a98cda74e..0000000000 --- a/prereqs/openmm/openmm_linux_compile/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -singularity run --fakeroot --bind .:/host centos-7-devtoolset-9-py39-cuda-openmm.sif diff --git a/prereqs/pips/app_requirements.txt b/prereqs/pips/app_requirements.txt index 49653b86fb..c4194aac42 100644 --- a/prereqs/pips/app_requirements.txt +++ b/prereqs/pips/app_requirements.txt @@ -33,6 +33,7 @@ netCDF4==1.6.5 networkx==3.3 numpy==1.26.4 openvr==1.26.701 +openmm==8.2.0 packaging==23.2 # as per Tristan's request in ticket #3055 ParmEd==4.2.2