Commit 58b6e3b6 authored by Andy Simmonett's avatar Andy Simmonett
Browse files

Merge branch 'master' of github.com:pandegroup/openmm into dpme

parents 7b66ba19 02e7a5d6
......@@ -183,9 +183,9 @@ script:
deploy:
- provider: s3
access_key_id:
secure: "AjE3nuj6kVuf21mOf0aZydW/3S/uCWsaoXC/huRxkxrmsNlnHBNGHZ9N48san1IxZAQM5pyaf7Yo9gkHur9obgq+e3lNgGvPp2mfkNXtLYcLJ46JF4kYliAtutjLWskrLg25Gu3xzF4EQkqSe0Le/oWldWWbTgvvH+KRq/vTHzI="
secure: "OEY0sp5FlM4kixFNVAktN6YHwKm5ieMswWCHj3MU+rWsAeGCULl/0kyKTfwCPknVlQv+SXBaPP3I4m1fv9FwHt0bbwy5EfmO4crrW8cE4ofq4vnwHi9UG77oEKKRrbxFUZD1y7ywI2W9SyVI6qfggZlJowRy9GV9Lin5vGzhqsw="
secret_access_key:
secure: "ISDQNSG2t0666PULtffo4wsKLFdu622EzuZxmiTxvLkjQGQlqm5+qn1Gd5UMLk7Ts2E0psdnmSrf6LVVCfrrQO/hcZHiJw3ZslMPDBBlRr8Epwdldn98ULhVoyQKtjXjCPzroa2UZCl1RFs4Nwb/VdDlI490XV0Lp4Woj1AT8tY="
secure: "P7DOYn77bH5Gg1obIwCxanhH0Kgh22Pv1pCGvmI6gHXOE1dxf5pnCSQGFKO6g1K6eaN5TbTjh+BmMXmxgkqByvQ4uZtkTGlPq3HI9YeRjZE2H7bRpIYjXXRwA1RMOA3ofLDw1FXNmwMo8BtRIl4jljR5Iw5rytUZmLlk3zgtcr4="
bucket: "docs.openmm.org"
skip_cleanup: true
region: us-west-1
......
# Packaging OpenMM into ZIP installers
## Source
Start the docker container:
```bash
docker run -i -t --rm -v `pwd`:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
```
Inside the docker container:
```bash
# Clone the OpenMM beta or release candidate tag $TAG
git clone https://github.com/pandegroup/openmm.git
cd openmm; git checkout $TAG; cd ..
# Build and package
source openmm/devtools/packaging/scripts/source/prepare.sh
source openmm/devtools/packaging/scripts/source/build.sh
source openmm/devtools/packaging/scripts/source/package.sh
# Recover the packages to host directory
cp packaging/compressed/* /io
```
## Linux
Start the docker container:
```bash
docker run -i -t --rm -v `pwd`:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
```
Inside the docker container:
```bash
# Clone the OpenMM beta or release candidate tag $TAG
git clone https://github.com/pandegroup/openmm.git
cd openmm; git checkout $TAG; cd ..
# Build and package
source openmm/devtools/packaging/scripts/linux/prepare.sh
source openmm/devtools/packaging/scripts/linux/build.sh
source openmm/devtools/packaging/scripts/linux/package.sh
# Recover the packages to host directory
cp packaging/compressed/* /io
```
## OS X
On an `osx` machine with XCode and the OS X 10.9 frameworks installed:
```bash
# Clone the OpenMM beta or release candidate tag $TAG
git clone https://github.com/pandegroup/openmm.git
cd openmm; git checkout $TAG; cd ..
# Build and package
source openmm/devtools/packaging/scripts/osx/prepare.sh
source openmm/devtools/packaging/scripts/osx/build.sh
source openmm/devtools/packaging/scripts/osx/package.sh
```
#!/bin/bash
# Build script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
# Set relative workspace path.
export WORKSPACE=`pwd`
# Add conda binaries to path.
PATH=$WORKSPACE/miniconda/bin:$PATH
INSTALL=`pwd`/install
if [ -e $INSTALL ]; then
rm -rf $INSTALL
fi
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0/lib64/libcudart.so"
CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc"
CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-8.0/include"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3
PREFIX="$WORKSPACE/miniconda"
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.so"
# Build in subdirectory.
if [ -e build ]; then
rm -rf build
fi
mkdir build
cd build
cmake ../openmm $CMAKE_FLAGS
make -j4 all install
make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make install
cd ..
......@@ -3,6 +3,52 @@
# Build script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
#
# For Docker build
#
# Fix hbb issues.
# If statements needed because multiple Python versions are built in same docker image.
if [ ! -e /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux ]; then
ln -s /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-CentOS-linux/ /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux
fi
if [ ! -e /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux ]; then
ln -s /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-CentOS-linux/ /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux
fi
# Clang paths
export CLANG_PREFIX="/opt/clang"
export PATH=$PATH:$CLANG_PREFIX/bin
# enable devtoolset-2
# will return an error return code because of python 3.x incompatible code, but this error is inconsequential
#source /opt/rh/devtoolset-2/enable || true
export PATH=/opt/rh/devtoolset-2/root/usr/bin${PATH:+:${PATH}}
export MANPATH=/opt/rh/devtoolset-2/root/usr/share/man:$MANPATH
export INFOPATH=/opt/rh/devtoolset-2/root/usr/share/info${INFOPATH:+:${INFOPATH}}
export PCP_DIR=/opt/rh/devtoolset-2/root
# Some perl Ext::MakeMaker versions install things under /usr/lib/perl5
# even though the system otherwise would go to /usr/lib64/perl5.
export PERL5LIB=/opt/rh/devtoolset-2/root//usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/opt/rh/devtoolset-2/root/usr/lib/perl5:/opt/rh/devtoolset-2/root//usr/lib/perl5/vendor_perl/5.8.8${PERL5LIB:+:${PERL5LIB}}
# bz847911 workaround:
# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time
# or else /etc/ld.so.conf.d files?
rpmlibdir=`rpm --eval "%{_libdir}"`
# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.
if [ "$rpmlibdir" != "${rpmlibdir/lib64/}" ]; then
rpmlibdir32=":/opt/rh/devtoolset-2/root${rpmlibdir/lib64/lib}"
fi
export LD_LIBRARY_PATH=/opt/rh/devtoolset-2/root$rpmlibdir$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
# duplicate python site.py logic for sitepackages
pythonvers=`python -c 'import sys; print(sys.version[:3])'`
export PYTHONPATH=/opt/rh/devtoolset-2/root/usr/lib64/python$pythonvers/site-packages:/opt/rh/devtoolset-2/root/usr/lib/python$pythonvers/site-packages${PYTHONPATH:+:${PYTHONPATH}}
# CFLAGS
export MINIMAL_CFLAGS="-g -O3"
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
# Set relative workspace path.
export WORKSPACE=`pwd`
......@@ -16,22 +62,35 @@ fi
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
# Don't build tests
CMAKE_FLAGS+=" -DBUILD_TESTING=OFF"
# Use clang 3.8.1 inside omnia-build-box docker image
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=$CLANG_PREFIX/bin/clang -DCMAKE_CXX_COMPILER=$CLANG_PREFIX/bin/clang++"
# 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=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
# Use NVIDIA CUDA 8.0
CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0/lib64/libcudart.so"
CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc"
CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-8.0/include"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/"
# Use AMD APP SDK 3.0
CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
# Generate API docs
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3
PREFIX="$WORKSPACE/miniconda"
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.so"
# Necessary to find GL headers
CMAKE_FLAGS+=" -DCMAKE_CXX_FLAGS_RELEASE=-I/usr/include/nvidia/"
# Build in subdirectory.
if [ -e build ]; then
......@@ -41,6 +100,11 @@ mkdir build
cd build
cmake ../openmm $CMAKE_FLAGS
make -j4 all install
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
......
File mode changed from 100755 to 100644
......@@ -24,6 +24,9 @@ fi
# Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH
# Workaround for missing libgcrypt
yum install -y libgcrypt
# Ensure configuration is up to date.
conda config --add channels omnia
conda install --yes --quiet swig fftw3f pip doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake
......@@ -21,7 +21,7 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
CMAKE_FLAGS+=" -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
CMAKE_FLAGS+=" -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Build in subdirectory.
......@@ -43,3 +43,6 @@ make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make install
# Return to directory
cd $WORKSPACE
......@@ -6,18 +6,18 @@
export WORKSPACE=`pwd`
# Install miniconda
export VERSION="Latest"
export VERSION="latest"
export PLATFORM="MacOSX"
export ARCH="x86_64"
export MINICONDA="Miniconda-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f miniconda ];
export MINICONDA="Miniconda3-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f $WORKSPACE/miniconda ];
then
echo "miniconda already exists"
else
echo "Downloading miniconda..."
rm -rf Miniconda-*
wget --quiet http://repo.continuum.io/miniconda/${MINICONDA}
bash ${MINICONDA} -b -p miniconda
rm -rf $WORKSPACE/Miniconda3-*
wget https://repo.continuum.io/miniconda/${MINICONDA}
bash ${MINICONDA} -b -p $WORKSPACE/miniconda
PIP_ARGS="-U"
fi
......
......@@ -3,6 +3,52 @@
# Build script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
#
# For Docker build
#
# Fix hbb issues.
# If statements needed because multiple Python versions are built in same docker image.
if [ ! -e /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux ]; then
ln -s /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-CentOS-linux/ /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux
fi
if [ ! -e /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux ]; then
ln -s /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-CentOS-linux/ /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux
fi
# Clang paths
export CLANG_PREFIX="/opt/clang"
export PATH=$PATH:$CLANG_PREFIX/bin
# enable devtoolset-2
# will return an error return code because of python 3.x incompatible code, but this error is inconsequential
#source /opt/rh/devtoolset-2/enable || true
export PATH=/opt/rh/devtoolset-2/root/usr/bin${PATH:+:${PATH}}
export MANPATH=/opt/rh/devtoolset-2/root/usr/share/man:$MANPATH
export INFOPATH=/opt/rh/devtoolset-2/root/usr/share/info${INFOPATH:+:${INFOPATH}}
export PCP_DIR=/opt/rh/devtoolset-2/root
# Some perl Ext::MakeMaker versions install things under /usr/lib/perl5
# even though the system otherwise would go to /usr/lib64/perl5.
export PERL5LIB=/opt/rh/devtoolset-2/root//usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/opt/rh/devtoolset-2/root/usr/lib/perl5:/opt/rh/devtoolset-2/root//usr/lib/perl5/vendor_perl/5.8.8${PERL5LIB:+:${PERL5LIB}}
# bz847911 workaround:
# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time
# or else /etc/ld.so.conf.d files?
rpmlibdir=`rpm --eval "%{_libdir}"`
# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.
if [ "$rpmlibdir" != "${rpmlibdir/lib64/}" ]; then
rpmlibdir32=":/opt/rh/devtoolset-2/root${rpmlibdir/lib64/lib}"
fi
export LD_LIBRARY_PATH=/opt/rh/devtoolset-2/root$rpmlibdir$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
# duplicate python site.py logic for sitepackages
pythonvers=`python -c 'import sys; print(sys.version[:3])'`
export PYTHONPATH=/opt/rh/devtoolset-2/root/usr/lib64/python$pythonvers/site-packages:/opt/rh/devtoolset-2/root/usr/lib/python$pythonvers/site-packages${PYTHONPATH:+:${PYTHONPATH}}
# CFLAGS
export MINIMAL_CFLAGS="-g -O3"
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
# Set relative workspace path.
export WORKSPACE=`pwd`
......@@ -16,25 +62,35 @@ fi
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
# Don't build tests
CMAKE_FLAGS+=" -DBUILD_TESTING=OFF"
# Use clang 3.8.1 inside omnia-build-box docker image
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=$CLANG_PREFIX/bin/clang -DCMAKE_CXX_COMPILER=$CLANG_PREFIX/bin/clang++"
# 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=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+=" -DOPENMM_BUILD_AMOEBA_CUDA_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CPU_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CUDA_COMPILER_PLUGIN=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CUDA_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_CUDA_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_OPENCL_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_RPMD_CUDA_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF"
# Use NVIDIA CUDA 8.0
CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0/lib64/libcudart.so"
CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc"
CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-8.0/include"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/"
# Use AMD APP SDK 3.0
CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
# Generate API docs
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3
#PREFIX="$WORKSPACE/miniconda"
#CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
#CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
#CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.so"
PREFIX="$WORKSPACE/miniconda"
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.so"
# Necessary to find GL headers
CMAKE_FLAGS+=" -DCMAKE_CXX_FLAGS_RELEASE=-I/usr/include/nvidia/"
# Build in subdirectory.
if [ -e build ]; then
......@@ -44,7 +100,14 @@ mkdir build
cd build
cmake ../openmm $CMAKE_FLAGS
make -j4 all install
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install.
make install
cd ..
......@@ -5,19 +5,18 @@
# Set relative workspace path.
export WORKSPACE=`pwd`
# Install miniconda
export VERSION="latest"
export PLATFORM="Linux"
export ARCH="x86_64"
export MINICONDA="Miniconda2-$VERSION-$PLATFORM-$ARCH.sh"
export MINICONDA="Miniconda3-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f miniconda ];
then
echo "miniconda already exists"
else
echo "Downloading miniconda..."
rm -rf Miniconda-* miniconda ~/.condarc
wget --quiet http://repo.continuum.io/miniconda/${MINICONDA}
wget --quiet https://repo.continuum.io/miniconda/${MINICONDA}
bash ${MINICONDA} -b -p miniconda
PIP_ARGS="-U"
fi
......@@ -25,7 +24,9 @@ fi
# Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH
# Workaround for missing libgcrypt
yum install -y libgcrypt
# Ensure configuration is up to date.
conda config --add channels omnia
conda install --yes --quiet swig fftw3f pip doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake
cd C:\Users\vagrant
# Install everything we can with choco.
choco install -y doxygen.portable swig cmake doxygen.install vcbuildtools git jom
# Install CUDA.
wget https://developer.nvidia.com/compute/cuda/8.0/prod/network_installers/cuda_8.0.44_win10_network-exe -UseBasicParsing -OutFile cuda_8.0.44_win10_network.exe
......@@ -21,5 +17,9 @@ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe -U
# Install software with conda.
& "C:\Miniconda3\Scripts\conda.exe" install -y -c omnia fftw3f jinja2 lxml sphinx sphinxcontrib-autodoc_doxygen sphinxcontrib-lunrsearch conda-build
& "C:\Miniconda3\Scripts\pip.exe" install sphinxcontrib.bibtex
\ No newline at end of file
& "C:\Miniconda3\Scripts\conda.exe" install -y -c omnia fftw3f jinja2 lxml sphinx sphinxcontrib-autodoc_doxygen sphinxcontrib-lunrsearch conda-build anaconda-client
& "C:\Miniconda3\Scripts\pip.exe" install sphinxcontrib.bibtex
# Install software with choco.
choco install -y doxygen.portable swig cmake doxygen.install vcbuildtools git jom
......@@ -2,7 +2,7 @@ import re
def process_docstring(app, what, name, obj, options, lines):
"""This hook edits the docstrings to replace "<tt><pre>" html tags
with sphinx directives.
and deprecated markers with sphinx directives.
"""
def repl(m):
s = m.group(1)
......@@ -10,15 +10,19 @@ def process_docstring(app, what, name, obj, options, lines):
s = linesep + s
newline = '.. code-block:: c++' + linesep
return newline + ' ' + s.replace(linesep, linesep + ' ')
if name == 'simtk.openmm.openmm.CustomTorsionForce':
print(lines)
def repl2(m):
s = m.group(1)
if not s.startswith(linesep):
s = linesep + s
newline = '|LINEBREAK|.. admonition:: Deprecated' + linesep
return newline + ' ' + s.replace(linesep, linesep + ' ')
linesep = '|LINEBREAK|'
joined = linesep.join(lines)
joined = re.sub(r'<tt><pre>((|LINEBREAK|)?.*?)</pre></tt>', repl, joined)
joined = re.sub(r'<tt>(.*?)</tt>', repl, joined)
joined = re.sub(r'@deprecated(.*?\|LINEBREAK\|)', repl2, joined, flags=re.IGNORECASE)
lines[:] = [(l if not l.isspace() else '') for l in joined.split(linesep)]
......
......@@ -164,7 +164,7 @@ Installing on Linux
https://simtk.org/project/xml/downloads.xml?group_id=161, then double click the
.zip file to expand it.
2. Make sure you have Python 2.6 or higher (earlier versions will not work) and
2. Make sure you have Python 2.7 or higher (earlier versions will not work) and
a C++ compiler (typically :program:`gcc` or :program:`clang`) installed on your computer. You can
check what version of Python is installed by typing :code:`python` |--|\ :code:`version`
into a console window.
......
......@@ -395,9 +395,9 @@ downloading the Xcode Tools from the App Store.
Windows: Visual Studio
----------------------
On Windows systems, use the C++ compiler in Visual Studio version 10 (2010) or
later. You can download a free version of Visual C++ Express Edition from
http://www.microsoft.com/express/vc/. If you plan to use use OpenMM from
On Windows systems, use the C++ compiler in Visual Studio 2015 or later. You
can download a free version of the Visual Studio C++ build tools from
http://landinghub.visualstudio.com/visual-cpp-build-tools. If you plan to use OpenMM from
Python, it is critical that both OpenMM and Python be compiled with the same
version of Visual Studio.
......@@ -446,13 +446,13 @@ CMake.
* For compiling C and Fortran API wrappers, you need:
* Python 2.6 or later (http://www.python.org)
* Python 2.7 or later (http://www.python.org)
* Doxygen (http://www.doxygen.org)
* A Fortran compiler
* For compiling the Python API wrappers, you need:
* Python 2.6 or later (http://www.python.org)
* Python 2.7 or later (http://www.python.org)
* SWIG (http://www.swig.org)
* Doxygen (http://www.doxygen.org)
......@@ -2568,23 +2568,21 @@ install binary packages).
Installing on Windows
---------------------
OpenMM on Windows only works with Python 3.3, so make sure that version is
OpenMM on Windows only works with Python 3.5, so make sure that version is
installed before you try installing. For Python installation packages and
instructions, go to http://python.org. Note that if you have a 64-bit machine,
you should still install the 32-bit version of Python since the OpenMM Python
API binary is 32-bit. We suggest that you install Python using the default
options.
instructions, go to http://python.org. We suggest that you install Python using
the default options.
Double click on the Python API Installer icon, located in the top level
directory for the OpenMM installation (by default, this is C:\Program
Files\OpenMM). This will install the OpenMM package into the Python
installation area. If you have more than one Python installation, you will be
asked which Python to use—make sure to select Python 3.3.
asked which Python to use—make sure to select Python 3.5.
Installing on Linux and Mac
---------------------------
Make sure you have Python 2.6 or later installed. For Python installation
Make sure you have Python 2.7 or later installed. For Python installation
packages and instructions, go to http://python.org. If you do not have the
correct Python version, install a valid version using the default options. Most
versions of Linux and Mac OS X have a suitable Python preinstalled. You can
......@@ -2593,7 +2591,8 @@ check by typing “\ :code:`python` |--|\ :code:`version`\ ” in a terminal win
You must have a C++ compiler to install the OpenMM Python API. If you are using
a Mac, install Apple's Xcode development tools
(http://developer.apple.com/TOOLS/Xcode) to get the needed compiler. On other
Unix-type systems, install gcc or clang.
Unix-type systems, install gcc or clang. We recommend clang, since it produces
faster code than gcc.
The install.sh script installs the Python API automatically as part of the
installation process, so you probably already have it installed. If for some
......
......@@ -59,6 +59,9 @@ class OPENMM_EXPORT TabulatedFunction {
public:
virtual ~TabulatedFunction() {
}
/**
* @deprecated This will be removed in a future release.
*/
virtual TabulatedFunction* Copy() const = 0;
};
......@@ -99,6 +102,8 @@ public:
void setFunctionParameters(const std::vector<double>& values, double min, double max);
/**
* Create a deep copy of the tabulated function.
*
* @deprecated This will be removed in a future release.
*/
Continuous1DFunction* Copy() const;
private:
......@@ -158,6 +163,8 @@ public:
void setFunctionParameters(int xsize, int ysize, const std::vector<double>& values, double xmin, double xmax, double ymin, double ymax);
/**
* Create a deep copy of the tabulated function
*
* @deprecated This will be removed in a future release.
*/
Continuous2DFunction* Copy() const;
private:
......@@ -233,6 +240,8 @@ public:
void setFunctionParameters(int xsize, int ysize, int zsize, const std::vector<double>& values, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
/**
* Create a deep copy of the tabulated function
*
* @deprecated This will be removed in a future release.
*/
Continuous3DFunction* Copy() const;
private:
......@@ -268,6 +277,8 @@ public:
void setFunctionParameters(const std::vector<double>& values);
/**
* Create a deep copy of the tabulated function
*
* @deprecated This will be removed in a future release.
*/
Discrete1DFunction* Copy() const;
private:
......@@ -310,6 +321,8 @@ public:
void setFunctionParameters(int xsize, int ysize, const std::vector<double>& values);
/**
* Create a deep copy of the tabulated function
*
* @deprecated This will be removed in a future release.
*/
Discrete2DFunction* Copy() const;
private:
......@@ -356,6 +369,8 @@ public:
void setFunctionParameters(int xsize, int ysize, int zsize, const std::vector<double>& values);
/**
* Create a deep copy of the tabulated function
*
* @deprecated This will be removed in a future release.
*/
Discrete3DFunction* Copy() const;
private:
......
......@@ -56,12 +56,13 @@ const static char CHECKPOINT_MAGIC_BYTES[] = "OpenMM Binary Checkpoint\n";
ContextImpl::ContextImpl(Context& owner, const System& system, Integrator& integrator, Platform* platform, const map<string, string>& properties) :
owner(owner), system(system), integrator(integrator), hasInitializedForces(false), hasSetPositions(false), integratorIsDeleted(false),
lastForceGroups(-1), platform(platform), platformData(NULL) {
if (system.getNumParticles() == 0)
int numParticles = system.getNumParticles();
if (numParticles == 0)
throw OpenMMException("Cannot create a Context for a System with no particles");
// Check for errors in virtual sites and massless particles.
for (int i = 0; i < system.getNumParticles(); i++) {
for (int i = 0; i < numParticles; i++) {
if (system.isVirtualSite(i)) {
if (system.getParticleMass(i) != 0.0)
throw OpenMMException("Virtual site has nonzero mass");
......@@ -71,14 +72,23 @@ ContextImpl::ContextImpl(Context& owner, const System& system, Integrator& integ
throw OpenMMException("A virtual site cannot depend on another virtual site");
}
}
set<pair<int, int> > constraintAtoms;
for (int i = 0; i < system.getNumConstraints(); i++) {
int particle1, particle2;
double distance;
system.getConstraintParameters(i, particle1, particle2, distance);
if (particle1 == particle2)
throw OpenMMException("A constraint cannot connect a particle to itself");
if (particle1 < 0 || particle2 < 0 || particle1 >= numParticles || particle2 >= numParticles)
throw OpenMMException("Illegal particle index in constraint");
double mass1 = system.getParticleMass(particle1);
double mass2 = system.getParticleMass(particle2);
if ((mass1 == 0.0 && mass2 != 0.0) || (mass2 == 0.0 && mass1 != 0.0))
throw OpenMMException("A constraint cannot involve a massless particle");
pair<int, int> atoms = make_pair(min(particle1, particle2), max(particle1, particle2));
if (constraintAtoms.find(atoms) != constraintAtoms.end())
throw OpenMMException("The System has two constraints between the same atoms. This will produce a singular constraint matrix.");
constraintAtoms.insert(atoms);
}
// Validate the list of properties.
......@@ -170,7 +180,7 @@ ContextImpl::ContextImpl(Context& owner, const System& system, Integrator& integ
for (size_t i = 0; i < forceImpls.size(); ++i)
forceImpls[i]->initialize(*this);
integrator.initialize(*this);
updateStateDataKernel.getAs<UpdateStateDataKernel>().setVelocities(*this, vector<Vec3>(system.getNumParticles()));
updateStateDataKernel.getAs<UpdateStateDataKernel>().setVelocities(*this, vector<Vec3>(numParticles));
}
ContextImpl::~ContextImpl() {
......@@ -259,10 +269,14 @@ void ContextImpl::setPeriodicBoxVectors(const Vec3& a, const Vec3& b, const Vec3
}
void ContextImpl::applyConstraints(double tol) {
if (!hasSetPositions)
throw OpenMMException("Particle positions have not been set");
applyConstraintsKernel.getAs<ApplyConstraintsKernel>().apply(*this, tol);
}
void ContextImpl::applyVelocityConstraints(double tol) {
if (!hasSetPositions)
throw OpenMMException("Particle positions have not been set");
applyConstraintsKernel.getAs<ApplyConstraintsKernel>().applyToVelocities(*this, tol);
}
......
......@@ -7324,8 +7324,10 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain)
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain) {
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
......
......@@ -29,7 +29,7 @@ extern "C" __global__ void findBlockBounds(int numAtoms, real4 periodicBoxSize,
real4 blockSize = 0.5f*(maxPos-minPos);
real4 center = 0.5f*(maxPos+minPos);
center.w = 0;
for (int i = base+1; i < last; i++) {
for (int i = base; i < last; i++) {
pos = posq[i];
real4 delta = posq[i]-center;
#ifdef USE_PERIODIC
......
......@@ -7385,8 +7385,10 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain)
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain) {
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
......
......@@ -29,7 +29,7 @@ __kernel void findBlockBounds(int numAtoms, real4 periodicBoxSize, real4 invPeri
real4 blockSize = 0.5f*(maxPos-minPos);
real4 center = 0.5f*(maxPos+minPos);
center.w = 0;
for (int i = base+1; i < last; i++) {
for (int i = base; i < last; i++) {
pos = posq[i];
real4 delta = posq[i]-center;
#ifdef USE_PERIODIC
......@@ -99,7 +99,7 @@ __kernel void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodi
__local real3 posBuffer[GROUP_SIZE];
__local volatile int workgroupTileIndex[GROUP_SIZE/32];
__local bool includeBlockFlags[GROUP_SIZE];
__local short2 atomCountBuffer[GROUP_SIZE];
__local volatile short2 atomCountBuffer[GROUP_SIZE];
__local int* buffer = workgroupBuffer+BUFFER_SIZE*(warpStart/32);
__local int* exclusionsForX = warpExclusions+MAX_EXCLUSIONS*(warpStart/32);
__local volatile int* tileStartIndex = workgroupTileIndex+(warpStart/32);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment