Commit 3b6925ae authored by Andy Simmonett's avatar Andy Simmonett Committed by GitHub
Browse files

Merge pull request #1 from peastman/ljpme

Cleanup to LJ PME code
parents 5a8a8aa9 f7a102fb
...@@ -109,7 +109,7 @@ before_install: ...@@ -109,7 +109,7 @@ before_install:
sudo easy_install pytest; sudo easy_install pytest;
fi fi
- if [[ "$OPENCL" == "true" ]]; then - if [[ "$OPENCL" == "true" ]]; then
wget https://jenkins.choderalab.org/userContent/AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2; wget http://s3.amazonaws.com/omnia-ci/AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2;
tar -xjf AMD-APP-SDK*.tar.bz2; tar -xjf AMD-APP-SDK*.tar.bz2;
AMDAPPSDK=${HOME}/AMDAPPSDK; AMDAPPSDK=${HOME}/AMDAPPSDK;
export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors; export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors;
...@@ -183,9 +183,9 @@ script: ...@@ -183,9 +183,9 @@ script:
deploy: deploy:
- provider: s3 - provider: s3
access_key_id: access_key_id:
secure: "AjE3nuj6kVuf21mOf0aZydW/3S/uCWsaoXC/huRxkxrmsNlnHBNGHZ9N48san1IxZAQM5pyaf7Yo9gkHur9obgq+e3lNgGvPp2mfkNXtLYcLJ46JF4kYliAtutjLWskrLg25Gu3xzF4EQkqSe0Le/oWldWWbTgvvH+KRq/vTHzI=" secure: "OEY0sp5FlM4kixFNVAktN6YHwKm5ieMswWCHj3MU+rWsAeGCULl/0kyKTfwCPknVlQv+SXBaPP3I4m1fv9FwHt0bbwy5EfmO4crrW8cE4ofq4vnwHi9UG77oEKKRrbxFUZD1y7ywI2W9SyVI6qfggZlJowRy9GV9Lin5vGzhqsw="
secret_access_key: secret_access_key:
secure: "ISDQNSG2t0666PULtffo4wsKLFdu622EzuZxmiTxvLkjQGQlqm5+qn1Gd5UMLk7Ts2E0psdnmSrf6LVVCfrrQO/hcZHiJw3ZslMPDBBlRr8Epwdldn98ULhVoyQKtjXjCPzroa2UZCl1RFs4Nwb/VdDlI490XV0Lp4Woj1AT8tY=" secure: "P7DOYn77bH5Gg1obIwCxanhH0Kgh22Pv1pCGvmI6gHXOE1dxf5pnCSQGFKO6g1K6eaN5TbTjh+BmMXmxgkqByvQ4uZtkTGlPq3HI9YeRjZE2H7bRpIYjXXRwA1RMOA3ofLDw1FXNmwMo8BtRIl4jljR5Iw5rytUZmLlk3zgtcr4="
bucket: "docs.openmm.org" bucket: "docs.openmm.org"
skip_cleanup: true skip_cleanup: true
region: us-west-1 region: us-west-1
......
...@@ -174,7 +174,7 @@ ENDIF (NOT CMAKE_CXX_FLAGS_RELEASE) ...@@ -174,7 +174,7 @@ ENDIF (NOT CMAKE_CXX_FLAGS_RELEASE)
SET(OPENMM_LIBRARY_NAME OpenMM) SET(OPENMM_LIBRARY_NAME OpenMM)
SET(OPENMM_MAJOR_VERSION 7) SET(OPENMM_MAJOR_VERSION 7)
SET(OPENMM_MINOR_VERSION 0) SET(OPENMM_MINOR_VERSION 1)
SET(OPENMM_BUILD_VERSION 0) SET(OPENMM_BUILD_VERSION 0)
SET(OPENMM_COPYRIGHT_YEARS "2008-2015") SET(OPENMM_COPYRIGHT_YEARS "2008-2015")
......
[![Build Status](https://travis-ci.org/pandegroup/openmm.svg?branch=master)](https://travis-ci.org/pandegroup/openmm)
[![Anaconda Cloud Badge](https://anaconda.org/omnia/openmm/badges/downloads.svg)](https://anaconda.org/omnia/openmm)
## OpenMM: A High Performance Molecular Dynamics Library ## OpenMM: A High Performance Molecular Dynamics Library
Introduction Introduction
...@@ -10,15 +13,3 @@ Getting Help ...@@ -10,15 +13,3 @@ Getting Help
------------ ------------
Need Help? Check out the [documentation](http://docs.openmm.org/) and [discussion forums](https://simtk.org/forums/viewforum.php?f=161). Need Help? Check out the [documentation](http://docs.openmm.org/) and [discussion forums](https://simtk.org/forums/viewforum.php?f=161).
[C++ API Reference](http://docs.openmm.org/6.3.0/api-c++/namespaceOpenMM.html)
[Python API Reference](http://docs.openmm.org/6.3.0/api-python/annotated.html)
Badges
------
* Travis CI `linux` and `osx` integration tests:
* GitHub master [![Build Status](https://travis-ci.org/pandegroup/openmm.svg?branch=master)](https://travis-ci.org/pandegroup/openmm)
* `openmm-dev` recipe [![Build Status](https://travis-ci.org/omnia-md/conda-dev-recipes.svg?branch=master)](https://travis-ci.org/omnia-md/conda-dev-recipes)
* Anaconda Cloud `openmm` conda release: [![Binstar `openmm` conda release](https://anaconda.org/omnia/openmm/badges/version.svg)](https://anaconda.org/omnia/openmm)
* Anaconda Cloud `openmm-dev` conda package: [![Binstar `openmm-dev` conda package](https://anaconda.org/omnia/openmm-dev/badges/version.svg)](https://anaconda.org/omnia/openmm-dev)
# 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
```
...@@ -3,6 +3,52 @@ ...@@ -3,6 +3,52 @@
# Build script for Linux distribution, for use in automated packaging. # Build script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory. # 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. # Set relative workspace path.
export WORKSPACE=`pwd` export WORKSPACE=`pwd`
...@@ -16,23 +62,35 @@ fi ...@@ -16,23 +62,35 @@ fi
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL" 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 # setting the rpath so that libOpenMMPME.so finds the right libfftw3
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.." #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-7.5/lib64/libcudart.so" CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0/lib64/libcudart.so"
CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-7.5/bin/nvcc" CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc"
CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-7.5/" CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-7.5/include" CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-8.0/include"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-7.5/" 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_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so" CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
# Generate API docs
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON" CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3 # Set location for FFTW3
PREFIX="$WORKSPACE/miniconda" PREFIX="$WORKSPACE/miniconda"
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include" CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so" CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.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. # Build in subdirectory.
if [ -e build ]; then if [ -e build ]; then
...@@ -42,7 +100,14 @@ mkdir build ...@@ -42,7 +100,14 @@ mkdir build
cd build cd build
cmake ../openmm $CMAKE_FLAGS cmake ../openmm $CMAKE_FLAGS
make -j4 all install make -j4 all install
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install. # Install.
make install make install
cd ..
File mode changed from 100755 to 100644
...@@ -9,14 +9,14 @@ export WORKSPACE=`pwd` ...@@ -9,14 +9,14 @@ export WORKSPACE=`pwd`
export VERSION="latest" export VERSION="latest"
export PLATFORM="Linux" export PLATFORM="Linux"
export ARCH="x86_64" export ARCH="x86_64"
export MINICONDA="Miniconda2-$VERSION-$PLATFORM-$ARCH.sh" export MINICONDA="Miniconda3-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f miniconda ]; if [ -f miniconda ];
then then
echo "miniconda already exists" echo "miniconda already exists"
else else
echo "Downloading miniconda..." echo "Downloading miniconda..."
rm -rf Miniconda-* miniconda ~/.condarc 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 bash ${MINICONDA} -b -p miniconda
PIP_ARGS="-U" PIP_ARGS="-U"
fi fi
...@@ -24,7 +24,9 @@ fi ...@@ -24,7 +24,9 @@ fi
# Add to path. # Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH export PATH=$WORKSPACE/miniconda/bin:$PATH
# Workaround for missing libgcrypt
yum install -y libgcrypt
# Ensure configuration is up to date. # Ensure configuration is up to date.
conda config --add channels omnia conda config --add channels omnia
conda install --yes --quiet swig fftw3f pip doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake 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" ...@@ -21,7 +21,7 @@ CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL"
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.." #CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9" 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" CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Build in subdirectory. # Build in subdirectory.
...@@ -43,3 +43,6 @@ make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf ...@@ -43,3 +43,6 @@ make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install. # Install.
make install make install
# Return to directory
cd $WORKSPACE
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
export WORKSPACE=`pwd` export WORKSPACE=`pwd`
# Install miniconda # Install miniconda
export VERSION="Latest" export VERSION="latest"
export PLATFORM="MacOSX" export PLATFORM="MacOSX"
export ARCH="x86_64" export ARCH="x86_64"
export MINICONDA="Miniconda-$VERSION-$PLATFORM-$ARCH.sh" export MINICONDA="Miniconda3-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f miniconda ]; if [ -f $WORKSPACE/miniconda ];
then then
echo "miniconda already exists" echo "miniconda already exists"
else else
echo "Downloading miniconda..." echo "Downloading miniconda..."
rm -rf Miniconda-* rm -rf $WORKSPACE/Miniconda3-*
wget --quiet http://repo.continuum.io/miniconda/${MINICONDA} wget https://repo.continuum.io/miniconda/${MINICONDA}
bash ${MINICONDA} -b -p miniconda bash ${MINICONDA} -b -p $WORKSPACE/miniconda
PIP_ARGS="-U" PIP_ARGS="-U"
fi fi
......
...@@ -3,6 +3,52 @@ ...@@ -3,6 +3,52 @@
# Build script for Linux distribution, for use in automated packaging. # Build script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory. # 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. # Set relative workspace path.
export WORKSPACE=`pwd` export WORKSPACE=`pwd`
...@@ -16,25 +62,35 @@ fi ...@@ -16,25 +62,35 @@ fi
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$INSTALL" 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 # setting the rpath so that libOpenMMPME.so finds the right libfftw3
#CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.." #CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" # Use NVIDIA CUDA 8.0
CMAKE_FLAGS+=" -DOPENMM_BUILD_AMOEBA_CUDA_LIB=OFF" CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-8.0/lib64/libcudart.so"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CPU_LIB=OFF" CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0/bin/nvcc"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CUDA_COMPILER_PLUGIN=OFF" CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DOPENMM_BUILD_CUDA_LIB=OFF" CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-8.0/include"
CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_CUDA_LIB=OFF" CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/"
CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF" # Use AMD APP SDK 3.0
CMAKE_FLAGS+=" -DOPENMM_BUILD_OPENCL_LIB=OFF" CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/opt/AMDAPPSDK-3.0/include/"
CMAKE_FLAGS+=" -DOPENMM_BUILD_RPMD_CUDA_LIB=OFF" CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so"
CMAKE_FLAGS+=" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF" # Generate API docs
CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON" CMAKE_FLAGS+=" -DOPENMM_GENERATE_API_DOCS=ON"
# Set location for FFTW3 # Set location for FFTW3
#PREFIX="$WORKSPACE/miniconda" PREFIX="$WORKSPACE/miniconda"
#CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include" CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
#CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so" CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
#CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.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. # Build in subdirectory.
if [ -e build ]; then if [ -e build ]; then
...@@ -44,7 +100,14 @@ mkdir build ...@@ -44,7 +100,14 @@ mkdir build
cd build cd build
cmake ../openmm $CMAKE_FLAGS cmake ../openmm $CMAKE_FLAGS
make -j4 all install make -j4 all install
export CFLAGS="$MINIMAL_CFLAGS"
export CXXFLAGS="$MINIMAL_CFLAGS"
export LDFLAGS="$LDPATHFLAGS"
make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf make -j4 PythonInstall C++ApiDocs PythonApiDocs sphinxpdf
# Install. # Install.
make install make install
cd ..
...@@ -5,19 +5,18 @@ ...@@ -5,19 +5,18 @@
# Set relative workspace path. # Set relative workspace path.
export WORKSPACE=`pwd` export WORKSPACE=`pwd`
# Install miniconda # Install miniconda
export VERSION="latest" export VERSION="latest"
export PLATFORM="Linux" export PLATFORM="Linux"
export ARCH="x86_64" export ARCH="x86_64"
export MINICONDA="Miniconda2-$VERSION-$PLATFORM-$ARCH.sh" export MINICONDA="Miniconda3-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f miniconda ]; if [ -f miniconda ];
then then
echo "miniconda already exists" echo "miniconda already exists"
else else
echo "Downloading miniconda..." echo "Downloading miniconda..."
rm -rf Miniconda-* miniconda ~/.condarc 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 bash ${MINICONDA} -b -p miniconda
PIP_ARGS="-U" PIP_ARGS="-U"
fi fi
...@@ -25,7 +24,9 @@ fi ...@@ -25,7 +24,9 @@ fi
# Add to path. # Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH export PATH=$WORKSPACE/miniconda/bin:$PATH
# Workaround for missing libgcrypt
yum install -y libgcrypt
# Ensure configuration is up to date. # Ensure configuration is up to date.
conda config --add channels omnia conda config --add channels omnia
conda install --yes --quiet swig fftw3f pip doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake conda install --yes --quiet swig fftw3f pip doxygen sphinx sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen lxml cmake
Vagrant.configure("2") do |config|
config.vm.box = "gusztavvargadr/windows10ee"
config.vm.provision :shell, path: "prepare.ps1"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
mkdir build
cd build
set FFTW=C:\Miniconda3\pkgs\fftw3f-3.3.4-vc14_2\Library
set APPSDK=C:\Program Files (x86)\AMD APP SDK\2.9-1
"C:\Program Files\CMake\bin\cmake.exe" .. -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DOPENMM_GENERATE_API_DOCS=ON ^
-DOPENCL_INCLUDE_DIR="%APPSDK%\include" -DOPENCL_LIBRARY="%APPSDK%\lib\x86_64\OpenCL.lib" ^
-DFFTW_INCLUDES="%FFTW%/include" -DFFTW_LIBRARY="%FFTW%/lib/libfftw3f-3.lib"
jom
jom PythonInstall
jom C++ApiDocs
jom PythonApiDocs
REM jom sphinxpdf
jom install
jom PythonBdist
cd C:\Users\vagrant
# 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
.\cuda_8.0.44_win10_network.exe -s compiler_8.0 cudart_8.0 cufft_8.0 cufft_dev_8.0 nvrtc_8.0 nvrtc_dev_8.0 | Out-Null
# Install AMD APP SDK.
wget https://s3.amazonaws.com/omnia-ci/AMD-APP-SDK-v2.9-1.599.381-GA-Full-windows-64.exe -UseBasicParsing -OutFile AMD-APP-SDK-v2.9-1.599.381-GA-Full-windows-64.exe
.\AMD-APP-SDK-v2.9-1.599.381-GA-Full-windows-64.exe /S /v/qn | Out-Null
# Install Miniconda.
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe -UseBasicParsing -OutFile Miniconda3-latest-Windows-x86_64.exe
.\Miniconda3-latest-Windows-x86_64.exe /S /D=C:\Miniconda3 | Out-Null
# Install software with conda.
& "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 ...@@ -2,7 +2,7 @@ import re
def process_docstring(app, what, name, obj, options, lines): def process_docstring(app, what, name, obj, options, lines):
"""This hook edits the docstrings to replace "<tt><pre>" html tags """This hook edits the docstrings to replace "<tt><pre>" html tags
with sphinx directives. and deprecated markers with sphinx directives.
""" """
def repl(m): def repl(m):
s = m.group(1) s = m.group(1)
...@@ -10,15 +10,19 @@ def process_docstring(app, what, name, obj, options, lines): ...@@ -10,15 +10,19 @@ def process_docstring(app, what, name, obj, options, lines):
s = linesep + s s = linesep + s
newline = '.. code-block:: c++' + linesep newline = '.. code-block:: c++' + linesep
return newline + ' ' + s.replace(linesep, linesep + ' ') return newline + ' ' + s.replace(linesep, linesep + ' ')
def repl2(m):
if name == 'simtk.openmm.openmm.CustomTorsionForce': s = m.group(1)
print(lines) if not s.startswith(linesep):
s = linesep + s
newline = '|LINEBREAK|.. admonition:: Deprecated' + linesep
return newline + ' ' + s.replace(linesep, linesep + ' ')
linesep = '|LINEBREAK|' linesep = '|LINEBREAK|'
joined = linesep.join(lines) joined = linesep.join(lines)
joined = re.sub(r'<tt><pre>((|LINEBREAK|)?.*?)</pre></tt>', repl, joined) joined = re.sub(r'<tt><pre>((|LINEBREAK|)?.*?)</pre></tt>', repl, joined)
joined = re.sub(r'<tt>(.*?)</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)] lines[:] = [(l if not l.isspace() else '') for l in joined.split(linesep)]
......
...@@ -63,7 +63,7 @@ Anaconda or Miniconda. ...@@ -63,7 +63,7 @@ Anaconda or Miniconda.
2. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL. 2. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL.
* If you have an Nvidia GPU, download CUDA 7.5 from * If you have an Nvidia GPU, download CUDA 8.0 from
https://developer.nvidia.com/cuda-downloads. Be sure to install both the https://developer.nvidia.com/cuda-downloads. Be sure to install both the
drivers and toolkit. OpenCL is included with the CUDA drivers. drivers and toolkit. OpenCL is included with the CUDA drivers.
* If you have an AMD GPU and are using Linux or Windows, download the latest * If you have an AMD GPU and are using Linux or Windows, download the latest
...@@ -105,7 +105,7 @@ and tell it to install the command line tools. With Xcode 4.2 and earlier, the ...@@ -105,7 +105,7 @@ and tell it to install the command line tools. With Xcode 4.2 and earlier, the
command line tools are automatically installed when you install Xcode.) command line tools are automatically installed when you install Xcode.)
3. (Optional) If you have an Nvidia GPU and want to use the CUDA platform, 3. (Optional) If you have an Nvidia GPU and want to use the CUDA platform,
download CUDA 7.5 from https://developer.nvidia.com/cuda-downloads. Be sure to download CUDA 8.0 from https://developer.nvidia.com/cuda-downloads. Be sure to
install both the drivers and toolkit. install both the drivers and toolkit.
4. (Optional) If you plan to use the CPU platform, it is recommended that you 4. (Optional) If you plan to use the CPU platform, it is recommended that you
...@@ -164,14 +164,14 @@ Installing on Linux ...@@ -164,14 +164,14 @@ Installing on Linux
https://simtk.org/project/xml/downloads.xml?group_id=161, then double click the https://simtk.org/project/xml/downloads.xml?group_id=161, then double click the
.zip file to expand it. .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 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` check what version of Python is installed by typing :code:`python` |--|\ :code:`version`
into a console window. into a console window.
3. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL. 3. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL.
* If you have an Nvidia GPU, download CUDA 7.5 from * If you have an Nvidia GPU, download CUDA 8.0 from
https://developer.nvidia.com/cuda-downloads. Be sure to install both the https://developer.nvidia.com/cuda-downloads. Be sure to install both the
drivers and toolkit. OpenCL is included with the CUDA drivers. drivers and toolkit. OpenCL is included with the CUDA drivers.
* If you have an AMD GPU, download the latest version of the Catalyst driver * If you have an AMD GPU, download the latest version of the Catalyst driver
...@@ -243,7 +243,7 @@ and ignore it.) ...@@ -243,7 +243,7 @@ and ignore it.)
4. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL. 4. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL.
* If you have an Nvidia GPU, download CUDA 7.5 from * If you have an Nvidia GPU, download CUDA 8.0 from
https://developer.nvidia.com/cuda-downloads. Be sure to install both the https://developer.nvidia.com/cuda-downloads. Be sure to install both the
drivers and toolkit. OpenCL is included with the CUDA drivers. drivers and toolkit. OpenCL is included with the CUDA drivers.
* If you have an AMD GPU, download the latest version of the Catalyst driver * If you have an AMD GPU, download the latest version of the Catalyst driver
...@@ -2696,6 +2696,62 @@ must include an attribute called :code:`radius`\ . ...@@ -2696,6 +2696,62 @@ must include an attribute called :code:`radius`\ .
CustomGBForce also allows you to define tabulated functions. See section CustomGBForce also allows you to define tabulated functions. See section
:ref:`tabulated-functions` for details. :ref:`tabulated-functions` for details.
<CustomHbondForce>
=========================
To add a CustomHbondForce to the System, include a tag that looks like this:
.. code-block:: xml
<CustomHbondForce particlesPerDonor="3" particlesPerAcceptor="2" bondCutoff="2"
energy="scale*k*(distance(a1,d1)-r0)^2*(angle(a1,d1,d2)-theta0)^2">
<GlobalParameter name="scale" defaultValue="1"/>
<PerDonorParameter name="theta0"/>
<PerAcceptorParameter name="k"/>
<PerAcceptorParameter name="r0"/>
<Donor class1="H" class2="N" class3="C" theta0="2.1"/>
<Acceptor class1="O" class2="C" k="115.0" r0="0.2"/>
...
</CustomHbondForce>
The energy expression for the CustomHbondForce is specified by the
:code:`energy` attribute. This is a mathematical expression that gives the
energy of each donor-acceptor interaction as a function of various particle coordinates,
distances, and angles. See the API documentation for details. :code:`particlesPerDonor`
specifies the number of particles that make up a donor group, and :code:`particlesPerAcceptor`
specifies the number of particles that make up an acceptor group.
The expression may depend on an arbitrary list of global, per-donor, or
per-acceptor parameters. Use a :code:`<GlobalParameter>` tag to define a global
parameter, a :code:`<PerDonorParameter>` tag to define a per-donor parameter,
and a :code:`<PerAcceptorParameter>` tag to define a per-acceptor parameter.
Exclusions are created automatically based on the :code:`bondCutoff` attribute.
If any atom of a donor is within the specified distance (measured in bonds) of
any atom of an acceptor, an exclusion is added to prevent them from interacting
with each other. If a donor and an acceptor share any atom in common, that is a
bond distance of 0, so they are always excluded.
Every :code:`<Donor>` or :code:`<Acceptor>` tag defines a rule for creating donor
or acceptor groups. The number of atoms specified in each one must match the
value of :code:`particlesPerDonor` or :code:`particlesPerAcceptor` specified in the
parent tag. Each tag may identify the atoms either by type (using the attributes
:code:`type1`\ , :code:`type2`\ , ...) or by class (using the attributes
:code:`class1`\ , :code:`class2`\ , ...). The force field considers every atom
in the system (if the number of atoms is 1), every pair of bonded atoms (if the number
of atoms is 2), or every set of three atoms where the first is bonded to the second
and the second to the third (if the number of atoms is 3). For each one, it searches
for a rule whose atom types or atom classes match the atoms. If it finds one,
it calls :code:`addDonor()` or :code:`addAcceptor()` on the CustomHbondForce.
Otherwise, it ignores that set and continues. The remaining attributes are the
values to use for the per-donor and per-acceptor parameters. All parameters must
be specified for every tag, and the attribute name must match the name of the
parameter. For instance, if there is a per-donor parameter with the name “k”,
then every :code:`<Donor>` tag must include an attribute called :code:`k`\ .
CustomHbondForce also allows you to define tabulated functions. See section
:ref:`tabulated-functions` for details.
<CustomManyParticleForce> <CustomManyParticleForce>
========================= =========================
...@@ -2716,7 +2772,7 @@ To add a CustomManyParticleForce to the System, include a tag that looks like th ...@@ -2716,7 +2772,7 @@ To add a CustomManyParticleForce to the System, include a tag that looks like th
The energy expression for the CustomManyParticleForce is specified by the The energy expression for the CustomManyParticleForce is specified by the
:code:`energy` attribute. This is a mathematical expression that gives the :code:`energy` attribute. This is a mathematical expression that gives the
energy of each pairwise interaction as a function of various particle coordinates, energy of each interaction as a function of various particle coordinates,
distances, and angles. See the API documentation for details. :code:`particlesPerSet` distances, and angles. See the API documentation for details. :code:`particlesPerSet`
specifies the number of particles involved in the interaction and specifies the number of particles involved in the interaction and
:code:`permutationMode` specifies the permutation mode. :code:`permutationMode` specifies the permutation mode.
......
...@@ -395,9 +395,9 @@ downloading the Xcode Tools from the App Store. ...@@ -395,9 +395,9 @@ downloading the Xcode Tools from the App Store.
Windows: Visual Studio Windows: Visual Studio
---------------------- ----------------------
On Windows systems, use the C++ compiler in Visual Studio version 10 (2010) or On Windows systems, use the C++ compiler in Visual Studio 2015 or later. You
later. You can download a free version of Visual C++ Express Edition from can download a free version of the Visual Studio C++ build tools from
http://www.microsoft.com/express/vc/. If you plan to use use OpenMM 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 Python, it is critical that both OpenMM and Python be compiled with the same
version of Visual Studio. version of Visual Studio.
...@@ -446,13 +446,13 @@ CMake. ...@@ -446,13 +446,13 @@ CMake.
* For compiling C and Fortran API wrappers, you need: * 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) * Doxygen (http://www.doxygen.org)
* A Fortran compiler * A Fortran compiler
* For compiling the Python API wrappers, you need: * 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) * SWIG (http://www.swig.org)
* Doxygen (http://www.doxygen.org) * Doxygen (http://www.doxygen.org)
...@@ -2568,23 +2568,21 @@ install binary packages). ...@@ -2568,23 +2568,21 @@ install binary packages).
Installing on Windows 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 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, instructions, go to http://python.org. We suggest that you install Python using
you should still install the 32-bit version of Python since the OpenMM Python the default options.
API binary is 32-bit. We suggest that you install Python using the default
options.
Double click on the Python API Installer icon, located in the top level Double click on the Python API Installer icon, located in the top level
directory for the OpenMM installation (by default, this is C:\Program directory for the OpenMM installation (by default, this is C:\Program
Files\OpenMM). This will install the OpenMM package into the Python Files\OpenMM). This will install the OpenMM package into the Python
installation area. If you have more than one Python installation, you will be 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 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 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 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 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 ...@@ -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 You must have a C++ compiler to install the OpenMM Python API. If you are using
a Mac, install Apple's Xcode development tools a Mac, install Apple's Xcode development tools
(http://developer.apple.com/TOOLS/Xcode) to get the needed compiler. On other (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 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 installation process, so you probably already have it installed. If for some
......
...@@ -920,7 +920,8 @@ of four particles. That is, the interaction energy of each bond is given by ...@@ -920,7 +920,8 @@ of four particles. That is, the interaction energy of each bond is given by
where *f*\ (\ *...*\ ) is a user defined mathematical expression. It may where *f*\ (\ *...*\ ) is a user defined mathematical expression. It may
depend on an arbitrary set of positions {\ :math:`x_i`\ }, distances {\ :math:`r_i`\ }, depend on an arbitrary set of positions {\ :math:`x_i`\ }, distances {\ :math:`r_i`\ },
angles {\ :math:`\theta_i`\ }, and dihedral angles {\ :math:`\phi_i`\ }. angles {\ :math:`\theta_i`\ }, and dihedral angles {\ :math:`\phi_i`\ }
guaranteed to be in the range [-π, π].
Each distance, angle, or dihedral is defined by specifying a sequence of Each distance, angle, or dihedral is defined by specifying a sequence of
particles chosen from among the particles that make up the bond. A distance particles chosen from among the particles that make up the bond. A distance
......
...@@ -63,11 +63,13 @@ def runOneTest(testName, options): ...@@ -63,11 +63,13 @@ def runOneTest(testName, options):
else: else:
method = app.CutoffPeriodic method = app.CutoffPeriodic
cutoff = 1*unit.nanometers cutoff = 1*unit.nanometers
friction = 1*(1/unit.picoseconds)
else: else:
ff = app.ForceField('amber99sb.xml', 'amber99_obc.xml') ff = app.ForceField('amber99sb.xml', 'amber99_obc.xml')
pdb = app.PDBFile('5dfr_minimized.pdb') pdb = app.PDBFile('5dfr_minimized.pdb')
method = app.CutoffNonPeriodic method = app.CutoffNonPeriodic
cutoff = 2*unit.nanometers cutoff = 2*unit.nanometers
friction = 91*(1/unit.picoseconds)
if options.heavy: if options.heavy:
dt = 0.005*unit.picoseconds dt = 0.005*unit.picoseconds
constraints = app.AllBonds constraints = app.AllBonds
...@@ -77,7 +79,7 @@ def runOneTest(testName, options): ...@@ -77,7 +79,7 @@ def runOneTest(testName, options):
constraints = app.HBonds constraints = app.HBonds
hydrogenMass = None hydrogenMass = None
system = ff.createSystem(pdb.topology, nonbondedMethod=method, nonbondedCutoff=cutoff, constraints=constraints, hydrogenMass=hydrogenMass) system = ff.createSystem(pdb.topology, nonbondedMethod=method, nonbondedCutoff=cutoff, constraints=constraints, hydrogenMass=hydrogenMass)
integ = mm.LangevinIntegrator(300*unit.kelvin, 91*(1/unit.picoseconds), dt) integ = mm.LangevinIntegrator(300*unit.kelvin, friction, dt)
print('Step Size: %g fs' % dt.value_in_unit(unit.femtoseconds)) print('Step Size: %g fs' % dt.value_in_unit(unit.femtoseconds))
properties = {} properties = {}
initialSteps = 5 initialSteps = 5
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
Sparse_Matrix_CompRow(const Sparse_Matrix_CompRow &S); Sparse_Matrix_CompRow(const Sparse_Matrix_CompRow &S);
Sparse_Matrix_CompRow(int M, int N, int nz, const T *val, Sparse_Matrix_CompRow(int M, int N, int nz, const T *val,
const int *r, const int *c); int *r, int *c);
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
*/ */
template <class T> template <class T>
Sparse_Matrix_CompRow<T>::Sparse_Matrix_CompRow(int M, int N, int nz, Sparse_Matrix_CompRow<T>::Sparse_Matrix_CompRow(int M, int N, int nz,
const T *val, const int *r, const int *c) : val_(nz,val), const T *val, int *r, int *c) : val_(nz,val),
rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {} rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {}
......
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