"docs/UsersGuide/References.Data/tdb/csort.MYD" did not exist on "2b3aa37d5c7c2b73a0f3e3faa6f56c458ba11987"
Commit 61d5cc0f authored by Peter's avatar Peter
Browse files

Merge branch 'master' into applecl

parents e2999354 afae4bc8
......@@ -2,6 +2,12 @@ language: cpp
compiler:
- clang
env:
global:
# encrypted AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to push docs to s3
- secure: "VVKz+yOMbKsskR+PfU1HfKBWdGYYrmIXNWQz4nqXCjtg2MRCQmjDulFZaPVDvsBzis9BUhnzAQrBYUrAtN8bZSTYRg7ADFVGdPFicg3Sv0owcghTQwokIvbw3G+HDz/WAnFmqEhqm3t5pNVWNinyHpMM3zYZOVKagyj53cwAM0M="
- secure: "W2iPU6ooMujfzJNw9ElaEB8Go1rlNFJ5zEldr3FaH7SDRwqtqNOEp9CegCeG/hHtjg1j8TMyytQtvW+OaMKFIbq7Qqu7nIfwIFTV45vBHW6uwT/jAq/J3EgZ8K7JGyysVVHk86D8jT+xu90YVH5Tx/w97luxHOQGfSK8alhCszw="
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libpcre3 libpcre3-dev gromacs
......@@ -15,8 +21,10 @@ script:
- make -j2
- make -j2 install
- sudo make PythonInstall
- # run all of the tests
- ctest -j2 -V
- # Run the testInstallation script
- python -m simtk.testInstallation
- # run all of the tests, making sure failures at this stage don't cause travis failures
- ctest -j2 -V || true
- # get a list of all of the failed tests into this stupid ctest format
- python -c 'fn = "Testing/Temporary/LastTestsFailed.log"; import os; os.path.exists(fn) or exit(0); l = [line.split(":")[0] for line in open(fn)]; triplets = zip(l, l, [","]*len(l)); print "".join(",".join(t) for t in triplets)' > FailedTests.log
- # rerun all of the failed tests
......@@ -24,3 +32,12 @@ script:
- # run the python tests too
- cd python/tests
- nosetests -vv --processes=-1 --process-timeout=200
after_success:
# Get libraries necessary for building docs and pushing
# them to S3
- sudo apt-get install python-sphinx python-yaml
- sudo pip install sphinxcontrib-bibtex boto
- make DoxygenApiDocs
- make sphinxhtml
- python devtools/ci/push-docs-to-s3.py
......@@ -78,7 +78,7 @@ ENDIF(${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT})
# The source is organized into subdirectories, but we handle them all from
# this CMakeLists file rather than letting CMake visit them as SUBDIRS.
SET(OPENMM_SOURCE_SUBDIRS . openmmapi olla libraries/jama libraries/quern libraries/lepton libraries/sfmt libraries/lbfgs libraries/hilbert libraries/csha1 platforms/reference serialization libraries/validate)
SET(OPENMM_SOURCE_SUBDIRS . openmmapi olla libraries/jama libraries/quern libraries/lepton libraries/sfmt libraries/lbfgs libraries/hilbert libraries/csha1 platforms/reference serialization libraries/validate libraries/irrxml)
IF(WIN32)
SET(OPENMM_SOURCE_SUBDIRS ${OPENMM_SOURCE_SUBDIRS} libraries/pthreads)
ADD_CUSTOM_TARGET(PthreadsLibraries ALL)
......@@ -89,8 +89,12 @@ IF(WIN32)
INSTALL(FILES ${lib} DESTINATION "lib/")
ENDFOREACH(lib)
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(PTHREADS_LIB pthreadVC2_x64)
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(PTHREADS_LIB pthreadVC2)
SET(PTHREADS_LIB_STATIC pthreadVC2_static_mt)
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
ELSE(WIN32)
IF (NOT ANDROID)
SET(PTHREADS_LIB pthread)
......@@ -116,12 +120,12 @@ ELSE( CMAKE_SIZEOF_VOID_P EQUAL 8 )
ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
IF (APPLE AND (NOT PNACL))
# Build universal binaries compatible with OS X 10.7
# Build 64 bit binaries compatible with OS X 10.7
IF (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
SET (CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE STRING "The minimum version of OS X to support" FORCE)
ENDIF (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
IF (NOT CMAKE_OSX_ARCHITECTURES)
SET (CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "The processor architectures to build for" FORCE)
SET (CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "The processor architectures to build for" FORCE)
ENDIF (NOT CMAKE_OSX_ARCHITECTURES)
# Improve the linking behavior of Mac libraries
......@@ -160,10 +164,10 @@ ENDIF (NOT CMAKE_CXX_FLAGS_RELEASE)
SET(OPENMM_LIBRARY_NAME OpenMM)
SET(OPENMM_MAJOR_VERSION 6)
SET(OPENMM_MINOR_VERSION 1)
SET(OPENMM_MINOR_VERSION 3)
SET(OPENMM_BUILD_VERSION 0)
SET(OPENMM_COPYRIGHT_YEARS "2008-2014")
SET(OPENMM_COPYRIGHT_YEARS "2008-2015")
# underbar separated list of dotted authors, no spaces or commas
SET(OPENMM_AUTHORS "Peter.Eastman")
......@@ -269,6 +273,14 @@ IF (ANDROID OR PNACL)
ELSE (ANDROID OR PNACL)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/libraries/sfmt/src/SFMT.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_SSE2=1")
ENDIF(ANDROID OR PNACL)
IF (NOT (ANDROID OR PNACL))
FILE(GLOB src_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*/*.cpp)
FILE(GLOB incl_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*.h)
SET(SOURCE_FILES ${SOURCE_FILES} ${src_files})
SET(SOURCE_INCLUDE_FILES ${SOURCE_INCLUDE_FILES} ${incl_files})
INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit")
SET(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DLEPTON_USE_JIT")
ENDIF (NOT (ANDROID OR PNACL))
# If API wrappers are being generated, and add them to the build.
SET(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS ON CACHE BOOL "Build wrappers for C and Fortran")
......@@ -282,9 +294,16 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src)
SET(OPENMM_BUILD_SHARED_LIB ON CACHE BOOL "Whether to build shared OpenMM libraries")
SET(EXTRA_LINK_FLAGS ${EXTRA_COMPILE_FLAGS})
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
IF (NOT ANDROID)
SET(EXTRA_LINK_FLAGS "${EXTRA_LINK_FLAGS} -Wl,--no-as-needed -lrt")
ENDIF (NOT ANDROID)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(OPENMM_BUILD_SHARED_LIB)
ADD_LIBRARY(${SHARED_TARGET} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_COMPILE_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_VALIDATE_BUILDING_SHARED_LIBRARY")
SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_VALIDATE_BUILDING_SHARED_LIBRARY")
IF(WIN32)
ADD_DEPENDENCIES(${SHARED_TARGET} PthreadsLibraries)
ENDIF(WIN32)
......@@ -294,7 +313,7 @@ SET(OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL "Whether to build static OpenMM libra
IF(OPENMM_BUILD_STATIC_LIB)
ADD_LIBRARY(${STATIC_TARGET} STATIC ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
SET(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_USE_STATIC_LIBRARIES -DLEPTON_USE_STATIC_LIBRARIES -DPTW32_STATIC_LIB")
SET_TARGET_PROPERTIES(${STATIC_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_COMPILE_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DOPENMMM_VALIDATE_BUILDING_STATIC_LIBRARY -DOPENMM_VALIDATE_BUILDING_STATIC_LIBRARY")
SET_TARGET_PROPERTIES(${STATIC_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DOPENMMM_VALIDATE_BUILDING_STATIC_LIBRARY -DOPENMM_VALIDATE_BUILDING_STATIC_LIBRARY")
ENDIF(OPENMM_BUILD_STATIC_LIB)
IF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
......@@ -324,7 +343,9 @@ ELSE(DL_LIBRARY)
ENDIF(OPENMM_BUILD_SHARED_LIB)
ENDIF(DL_LIBRARY)
ADD_SUBDIRECTORY(platforms/reference/tests)
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(platforms/reference/tests)
ENDIF(BUILD_TESTING)
# Which hardware platforms to build
......@@ -441,6 +462,21 @@ IF(OPENMM_BUILD_PME_PLUGIN)
ADD_SUBDIRECTORY(plugins/cpupme)
ENDIF(OPENMM_BUILD_PME_PLUGIN)
# CUDA compiler plugin
GET_FILENAME_COMPONENT(CUDA_LIB_DIR "${CUDA_cufft_LIBRARY}" PATH)
FIND_LIBRARY(CUDA_nvrtc_LIBRARY nvrtc "${CUDA_LIB_DIR}")
IF(CUDA_nvrtc_LIBRARY)
SET(OPENMM_BUILD_CUDA_COMPILER_PLUGIN ON CACHE BOOL "Build CUDA runtime compiler plugin")
ELSE(CUDA_nvrtc_LIBRARY)
SET(OPENMM_BUILD_CUDA_COMPILER_PLUGIN OFF CACHE BOOL "Build CUDA runtime compiler plugin")
ENDIF(CUDA_nvrtc_LIBRARY)
SET(OPENMM_BUILD_CUDACOMPILER_PATH)
IF(OPENMM_BUILD_CUDA_COMPILER_PLUGIN)
SET(OPENMM_BUILD_CUDACOMPILER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/plugins/cudacompiler)
ADD_SUBDIRECTORY(plugins/cudacompiler)
ENDIF(OPENMM_BUILD_CUDA_COMPILER_PLUGIN)
IF(OPENMM_BUILD_SHARED_LIB)
INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${SHARED_TARGET})
ENDIF(OPENMM_BUILD_SHARED_LIB)
......@@ -506,7 +542,9 @@ ELSE (EXECUTABLE_OUTPUT_PATH)
ENDIF (EXECUTABLE_OUTPUT_PATH)
ADD_SUBDIRECTORY(docs-source)
ADD_SUBDIRECTORY(tests)
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(tests)
ENDIF(BUILD_TESTING)
ADD_SUBDIRECTORY(examples)
ENDIF(NOT cmv EQUAL "2.4") # This whole file...
## OpenMM: A High Performance Molecular Dynamics Library
[![Build Status](https://travis-ci.org/SimTk/openmm.png?branch=master)](https://travis-ci.org/SimTk/openmm)
[![Build Status](https://travis-ci.org/pandegroup/openmm.png?branch=master)](https://travis-ci.org/pandegroup/openmm)
Introduction
------------
......
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "chef/centos-6.5"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# If true, then any SSH connections made will enable agent forwarding.
# Default value: false
# config.ssh.forward_agent = true
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# # Use VBoxManage to customize the VM. For example to change memory:
# vb.customize ["modifyvm", :id, "--memory", "1024"]
# end
#
# View the documentation for the provider you're using for more
# information on available options.
# Enable provisioning with CFEngine. CFEngine Community packages are
# automatically installed. For example, configure the host as a
# policy server and optionally a policy file to run:
#
# config.vm.provision "cfengine" do |cf|
# cf.am_policy_hub = true
# # cf.run_file = "motd.cf"
# end
#
# You can also configure and bootstrap a client to an existing
# policy server:
#
# config.vm.provision "cfengine" do |cf|
# cf.policy_server_address = "10.0.2.15"
# end
# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
# You will need to create the manifests directory and a manifest in
# the file default.pp in the manifests_path directory.
#
# config.vm.provision "puppet" do |puppet|
# puppet.manifests_path = "manifests"
# puppet.manifest_file = "site.pp"
# end
config.vm.provision "shell",
inline: "su -c 'source /vagrant/setup_centos_vm.sh' vagrant"
end
export PATH=$HOME/miniconda/bin:$PATH
export SWIG_LIB=$HOME/miniconda/share/swig/
export CC="clang++"
git clone -b vagrant https://github.com/simtk/openmm.git
cd openmm
conda install --file tools/ci/requirements-conda.txt --yes
conda build tools/conda-recipe
# Prepare a vagrant CentOS 6.5 VM for building OpenMM
# Needs latest version of vagrant to auto-download the chef package
#vagrant init chef/centos-6.5
#vagrant up
#vagrant ssh
# Download and enable the EPEL RedHat EL extras repository
mkdir ~/Software
cd Software
sudo yum install wget -y
wget http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -i epel-release-6-8.noarch.rpm
sudo yum update -y
# Several of these come from the EPEL repo
sudo yum install clang-3.4 cmake28 graphviz perl flex bison rpm-build texlive texlive-latex ghostscript gcc gcc-c++ git vim -y
# Probably can't use RHEL6 version of doxygen because it's very old.
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.7.src.tar.gz
rpmbuild -ta doxygen-1.8.7.src.tar.gz
sudo rpm -i ~/rpmbuild/RPMS/x86_64/doxygen-1.8.7-1.x86_64.rpm
rm ~/rpmbuild -r
sudo yum clean headers
sudo yum clean packages
# Install CUDA6 for RHEL6
cd ~/Software
wget http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-6.0-37.x86_64.rpm
sudo rpm -i cuda-repo-rhel6-6.0-37.x86_64.rpm
sudo yum clean expire-cache
sudo yum install cuda -y
rm cuda-repo-rhel6-6.0-37.x86_64.rpm
# Install Conda
cd ~/Software
wget http://repo.continuum.io/miniconda/Miniconda-3.0.5-Linux-x86_64.sh
bash Miniconda-3.0.5-Linux-x86_64.sh -b
# So there is a bug in some versions of anaconda where the path to swig files is HARDCODED. Below is workaround. See https://github.com/ContinuumIO/anaconda-issues/issues/48
sudo ln -s ~/miniconda/ /opt/anaconda1anaconda2anaconda3
export PATH=$HOME/miniconda/bin:$PATH
conda config --add channels http://conda.binstar.org/omnia
conda install --yes fftw3f jinja2 swig sphinx conda-build cmake
# Download AMD APP SDK from here, requires click agreement: http://developer.amd.com/amd-license-agreement-appsdk/
# Ideally we could cache this on AWS or something...
mkdir ~/Software/AMD
cd ~/Software/AMD
# Copy the tarball to this directory from wherever you got it.
cp /vagrant/AMD-APP-SDK-v2.9-lnx64.tgz ./
tar -zxvf /vagrant/AMD-APP-SDK-v2.9-lnx64.tgz
sudo ./Install-AMD-APP.sh
from __future__ import print_function
import os
import boto
import simtk
from boto.s3.key import Key
# The secret key is available as a secure environment variable
# on travis-ci to push the build documentation to Amazon S3.
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']
BUCKET_NAME = 'docs.openmm.org'
bucket_name = AWS_ACCESS_KEY_ID.lower() + '-' + BUCKET_NAME
conn = boto.connect_s3(AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY)
bucket = conn.get_bucket(BUCKET_NAME)
def upload(path, root=None, prefix='', versioned=True):
if root is None:
root = path
for dirpath, dirnames, filenames in os.walk(path):
for filename in filenames:
fn = os.path.join(dirpath, filename)
k = Key(bucket)
k.key = os.path.join(prefix, os.path.relpath(fn, root))
if versioned:
k.key = os.path.join(simtk.version.short_version, k.key)
print('Uploading', k.key, '...')
k.set_contents_from_filename(fn)
upload('api-c++/', 'build')
upload('api-python/', 'build')
upload('sphinx-docs/developerguide/html', prefix='developerguide')
upload('sphinx-docs/userguide/html', prefix='userguide')
This diff is collapsed.
# Manifests for automated packaging of source and binary distributions
A detailed explanation of packaging protocols can be found on the developer wiki:
https://github.com/pandegroup/openmm/wiki/Packaging-OpenMM-installers
## Contents
* `source/` - directories and files to be copied from the GitHub repo for a source distribution
* `binary/` - directories and files to be copied from install directory after build for a binary distribution
docs
examples
include
lib
licenses
cmake_modules
CMakeLists.txt
docs-source
examples
libraries
olla
openmmapi
platforms
plugins
serialization
tests
wrappers
#!/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+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+=" -DCUDA_CUDART_LIBRARY=/usr/local/cuda-6.5/lib64/libcudart.so"
CMAKE_FLAGS+=" -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-6.5/bin/nvcc"
CMAKE_FLAGS+=" -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-6.5/"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-6.5/include"
CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-6.5/"
CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=/usr/local/cuda-6.5/include"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/usr/local/cuda-6.5/lib64/libOpenCL.so"
# 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 DoxygenApiDocs sphinxpdf
# Install.
make install
#!/bin/bash
# Packaging script for Linux distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
# CONFIGURE HERE
export PACKAGE_DIR="packaging" # directory to stuff packaged source distribution
export VERSION=$(sed -nr "s/OPENMM_VERSION:STRING=(.*)/\1/p" build/CMakeCache.txt)
export PACKAGE_SUBDIR="OpenMM-${VERSION}-Linux" # directory where distribution will be unpacked
export DISTRO_PREFIX="OpenMM-${VERSION}-Linux" # prefix for source distribution (e.g. ${DISTRIBUTION_NAME}.zip)
# Perform all work in a work directory.
cd work
# Clean up.
rm -rf $PACKAGE_DIR
# Make a directory to contain packaged source distribution
mkdir $PACKAGE_DIR
mkdir $PACKAGE_DIR/$PACKAGE_SUBDIR
for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt ); do
CMD="cp -r install/$filename $PACKAGE_DIR/$PACKAGE_SUBDIR"
echo $CMD
`$CMD`
done
# Add the install.sh script
CMD="cp -r openmm/install.sh $PACKAGE_DIR/$PACKAGE_SUBDIR"
echo $CMD
`$CMD`
# Make Python source distribution.
echo "Building Python source distribution..."
pushd .
cd build
make PythonSdist
cd python/dist
tar zxf OpenMM-${VERSION}.tar.gz
mv OpenMM-${VERSION} python
popd
cp -r build/python/dist/python $PACKAGE_DIR/$PACKAGE_SUBDIR
# Create archives.
cd $PACKAGE_DIR
mkdir compressed
tar zcf compressed/${DISTRO_PREFIX}.tgz $PACKAGE_SUBDIR
zip -r compressed/${DISTRO_PREFIX}.zip $PACKAGE_SUBDIR
cd ..
#!/bin/tcsh
# Prepare for build by ensuring necessary prerequisites are locally installed.
# Set relative workspace path.
export WORKSPACE=`pwd`
# Install miniconda
export VERSION="3.7.0"
export PLATFORM="Linux"
export ARCH="x86_64"
export MINICONDA="Miniconda-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f 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
PIP_ARGS="-U"
fi
# Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH
# Ensure configuration is up to date.
conda config --add channels http://conda.binstar.org/omnia
conda install --yes --quiet swig fftw3f pip
pip install sphinxcontrib-bibtex
#!/bin/bash
# Build script for Mac OS X 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
# Set install directory.
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+=" -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+=" -DOPENMM_BUILD_OPENCL_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_DRUDE_OPENCL_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_RPMD_OPENCL_LIB=OFF"
CMAKE_FLAGS+=" -DOPENMM_BUILD_OPENCL_TESTS=FALSE"
CMAKE_FLAGS+=" -DOPENMM_BUILD_OPENCL_DOUBLE_PRECISION_TESTS=FALSE"
# Build in subdirectory.
# Set location for FFTW3
PREFIX="$WORKSPACE/miniconda"
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.dylib"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.dylib"
# Build in subdirectory.
if [ -e build ]; then
rm -rf build
fi
mkdir build
cd build
cmake ../openmm $CMAKE_FLAGS
make -j4 all DoxygenApiDocs sphinxpdf
# Install.
make install
#!/bin/bash
# Packaging script for Mac OS X distribution, for use in automated packaging.
# Note that this must be run from outside the checked-out openmm/ directory.
# CONFIGURE HERE
export PACKAGE_DIR="packaging" # directory to stuff packaged source distribution
export VERSION=$(grep "OPENMM_VERSION:STRING" build/CMakeCache.txt | sed -E "s/OPENMM_VERSION:STRING=(.*)/\1/")
export PACKAGE_SUBDIR="OpenMM-${VERSION}-Mac" # directory where distribution will be unpacked
export DISTRO_PREFIX="OpenMM-${VERSION}-Mac" # prefix for source distribution (e.g. ${DISTRIBUTION_NAME}.zip)
# Clean up.
rm -rf $PACKAGE_DIR
# Make a directory to contain packaged source distribution
mkdir $PACKAGE_DIR
mkdir $PACKAGE_DIR/$PACKAGE_SUBDIR
for filename in $( cat openmm/devtools/packaging/manifests/binary/manifest.txt ); do
CMD="cp -r install/$filename $PACKAGE_DIR/$PACKAGE_SUBDIR"
echo $CMD
`$CMD`
done
# Add the install.sh script
CMD="cp -r openmm/install.sh $PACKAGE_DIR/$PACKAGE_SUBDIR"
echo $CMD
`$CMD`
# Make Python source distribution.
echo "Building Python source distribution..."
pushd .
cd build
make PythonSdist
cd python/dist
tar zxf OpenMM-${VERSION}.tar.gz
mv OpenMM-${VERSION} python
popd
cp -r build/python/dist/python $PACKAGE_DIR/$PACKAGE_SUBDIR
# Create archives.
cd $PACKAGE_DIR
mkdir compressed
tar zcf compressed/${DISTRO_PREFIX}.tgz $PACKAGE_SUBDIR
zip -r compressed/${DISTRO_PREFIX}.zip $PACKAGE_SUBDIR
cd ..
#!/bin/tcsh
# Prepare for build by ensuring necessary prerequisites are locally installed.
# Set relative workspace path.
export WORKSPACE=`pwd`
# Install miniconda
export VERSION="3.7.0"
export PLATFORM="MacOSX"
export ARCH="x86_64"
export MINICONDA="Miniconda-$VERSION-$PLATFORM-$ARCH.sh"
if [ -f 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
PIP_ARGS="-U"
fi
# Add to path.
export PATH=$WORKSPACE/miniconda/bin:$PATH
# Ensure configuration is up to date.
conda config --add channels http://conda.binstar.org/omnia
conda install --yes --quiet swig fftw3f pip
pip install sphinxcontrib-bibtex
......@@ -2,16 +2,16 @@ OpenMM was developed by Simbios, the NIH National Center for Physics-Based
Simulation of Biological Structures at Stanford, funded under the NIH Roadmap
for Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright © 2008-2009 Stanford University and the Authors.
Portions copyright � 2008-2015 Stanford University and the Authors.
There are several licenses which cover different parts of OpenMM as described
below.
1. API and Reference Platform
1. API, Reference Platform, CPU Platform
The OpenMM API and the Reference Platform may be used under the terms of the
MIT License:
The OpenMM API, the Reference Platform, and the CPU platform may be used under
the terms of the MIT License:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
......@@ -99,10 +99,52 @@ name of the person performing the modification, the date of modification,
and the reason for such modification.
5. GPU-BBSort
5. AsmJit
The CUDA platform uses the GPU-BBSort library written by Chen Shifu. It
includes the following license statement:
OpenMM uses the AsmJit library which is copyright 2008-2014 by Petr Kobalicek.
It may be used under the following terms:
The code is distributed under BSD license, you are allowed to use, modify
or sell this code, but a statement is required if you used this code any where.
\ No newline at end of file
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
6. PdbxReader
OpenMM uses the PDBx/mmCIF parser written by John Westbrook. It is distributed
under the Creative Commons Attribution 3.0 Unported license. For details, see
https://creativecommons.org/licenses/by/3.0. This library was modified to move
it inside the simtk.openmm.app.internal module.
7. irrXML
OpenMM uses the irrXML library which is copyright 2002-2005 Nikolaus Gebhardt.
It may be used under the following terms:
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
......@@ -43,15 +43,13 @@ troubleshooting guide that describes common problems and how to fix them
Installing on Mac OS X
**********************
OpenMM works on Mac OS X 10.7 or later. GPU acceleration is currently only
supported on Nvidia GPUs, not on AMD or Intel GPUs.
OpenMM works on Mac OS X 10.7 or later.
.. warning::
A serious bug was introduced in Mac OS X 10.7.5 that prevents
OpenMMs OpenCL platform from working correctly. At the time of this writing,
the bug is present in all versions from 10.7.5 onward. The CUDA platform (see
below) is not affected by the bug, so if you have an affected version of OS X,
you should use it instead of the OpenCL platform.
.. note::
The OpenCL implementations on all recent versions of Mac OS X contain serious
bugs that make them unsuitable for use with OpenMM. GPU acceleration is
therefore only supported with the CUDA platform. This limits it to only Nvidia
GPUs, not AMD or Intel GPUs.
1. Download the pre-compiled binary of OpenMM for Mac OS X, then double click
the .zip file to expand it.
......@@ -63,7 +61,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.)
3. (Optional) If you have an Nvidia GPU and want to use the CUDA platform,
download CUDA 6.0 from https://developer.nvidia.com/cuda-downloads. Be sure to
download CUDA 6.5 from https://developer.nvidia.com/cuda-downloads. Be sure to
install both the drivers and toolkit.
4. (Optional) If you plan to use the CPU platform, it is recommended that you
......@@ -107,14 +105,12 @@ example,
export OPENMM_CUDA_COMPILER=/opt/CUDA/cuda-6.0/bin/nvcc
7. Verify your installation by running the :file:`testInstallation.py` script found in
the :file:`examples` folder of your OpenMM installation. To run it, cd to the
examples folder and type
7. Verify your installation by typing the following command:
::
python testInstallation.py
python -m simtk.testInstallation
This script confirms that OpenMM is installed, checks whether GPU acceleration
This command confirms that OpenMM is installed, checks whether GPU acceleration
is available (via the OpenCL and/or CUDA platforms), and verifies that all
platforms produce consistent results.
......@@ -139,7 +135,7 @@ into a console window.
3. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL.
* If you have an Nvidia GPU, download CUDA 6.0 from
* If you have an Nvidia GPU, download CUDA 6.5 from
https://developer.nvidia.com/cuda-downloads. Be sure to install both the
drivers and toolkit. OpenCL is included with the CUDA drivers.
* If you have an AMD GPU, download the latest version of the Catalyst driver
......@@ -188,15 +184,13 @@ example,
export OPENMM_CUDA_COMPILER=/opt/CUDA/cuda-6.0/bin/nvcc
7. Verify your installation by running the :file:`testInstallation.py` script found in
the :file:`examples` folder of your OpenMM installation. To run it, :command:`cd` to the
:file:`examples` folder and type
7. Verify your installation by typing the following command:
::
python testInstallation.py
python -m simtk.testInstallation
This script confirms that OpenMM is installed, checks whether GPU acceleration
is available (via that OpenCL and/or CUDA platforms), and verifies that all
This command confirms that OpenMM is installed, checks whether GPU acceleration
is available (via the OpenCL and/or CUDA platforms), and verifies that all
platforms produce consistent results.
.. _installing-on-windows:
......@@ -222,11 +216,9 @@ and ignore it.)
4. (Optional) If you want to run OpenMM on a GPU, install CUDA and/or OpenCL.
* If you have an Nvidia GPU, download CUDA 6.0 from
* If you have an Nvidia GPU, download CUDA 6.5 from
https://developer.nvidia.com/cuda-downloads. Be sure to install both the
drivers and toolkit. For 64-bit machines, you should install the 64-bit driver,
but download the 32-bit version of the toolkit since the OpenMM binary is
32-bit. 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
from http://support.amd.com.
......@@ -276,15 +268,13 @@ your PATH.
not set, it will assume plugins are in the default location (:file:`C:\\Program
Files\\OpenMM\\lib\\plugins` or :file:`C:\\Program Files (x86)\\OpenMM\\lib\\plugins`).
7. Verify your installation by running the :file:`testInstallation.py` script found in
the :file:`examples` folder of your OpenMM installation. To run it, open a command
window, :command:`cd` to the :file:`examples` folder, and type
7. Verify your installation by typing the following command:
::
python testInstallation.py
python -m simtk.testInstallation
This script confirms that OpenMM is installed, checks whether GPU acceleration
is available (via that OpenCL and/or CUDA platforms), and verifies that all
This command confirms that OpenMM is installed, checks whether GPU acceleration
is available (via the OpenCL and/or CUDA platforms), and verifies that all
platforms produce consistent results.
.. _running-simulations:
......@@ -370,7 +360,8 @@ molecular topology and atom positions. Your file need not be called
:file:`input.pdb`. Feel free to change this line to specify any file you want,
though it must contain all of the atoms needed by the force field.
(More information on how to add missing atoms and residues using OpenMM tools can be found in Chapter :ref:`model-building-and-editing`.)
Make sure you include the single quotes around the file name.
Make sure you include the single quotes around the file name. OpenMM also can load
files in the newer PDBx/mmCIF format: just change :class:`PDBFile` to :class:`PDBxFile`.
::
forcefield = ForceField('amber99sb.xml', 'tip3p.xml')
......@@ -581,7 +572,7 @@ with the name :file:`simulateGromacs.py`.
from sys import stdout
gro = GromacsGroFile('input.gro')
top = GromacsTopFile('input.top', unitCellDimensions=gro.getUnitCellDimensions(),
top = GromacsTopFile('input.top', periodicBoxVectors=gro.getPeriodicBoxVectors(),
includeDir='/usr/local/gromacs/share/gromacs/top')
system = top.createSystem(nonbondedMethod=PME, nonbondedCutoff=1*nanometer,
constraints=HBonds)
......@@ -602,10 +593,10 @@ This script is nearly identical to the previous one, just replacing
:class:`AmberInpcrdFile` and :class:`AmberPrmtopFile` with :class:`GromacsGroFile` and :class:`GromacsTopFile`.
Note that when we create the :class:`GromacsTopFile`, we specify values for two extra
options. First, we specify
:code:`unitCellDimensions=gro.getUnitCellDimensions()`\ . Unlike OpenMM and
AMBER, which can store periodic unit cell dimensions with the topology, Gromacs
only stores them with the coordinates. To let :class:`GromacsTopFile` create a :class:`Topology`
object, we therefore need to tell it the unit cell dimensions that were loaded
:code:`periodicBoxVectors=gro.getPeriodicBoxVectors()`\ . Unlike OpenMM and
AMBER, which can store periodic unit cell information with the topology, Gromacs
only stores it with the coordinates. To let :class:`GromacsTopFile` create a :class:`Topology`
object, we therefore need to tell it the periodic box vectors that were loaded
from the :file:`gro` file. You only need to do this if you are simulating a periodic
system. For implicit solvent simulations, it usually can be omitted.
......@@ -809,8 +800,12 @@ you would type:
forcefield = ForceField('amber99sb.xml', 'amber99_obc.xml')
Note that the GBSA-OBC parameters in these files are those used in TINKER.\ :cite:`Tinker`
They are designed for use with Amber force fields, but they are different from
the parameters found in the AMBER application.
If you are running a vacuum simulation, you do not need to specify a water
model. The following line specifies the AMBER10 force field and no water model.
model. The following line specifies the Amber10 force field and no water model.
If you try to use it with a PDB file that contains explicit water, it will
produce an error since no water parameters are defined:
::
......@@ -1196,6 +1191,22 @@ change size.
system.addForce(MonteCarloAnisotropicBarostat((1, 1, 1)*bar, 300*kelvin,
False, True, False))
There is a third barostat designed specifically for simulations of membranes.
It assumes the membrane lies in the XY plane, and treats the X and Y axes of the
box differently from the Z axis. It also applies a uniform surface tension in
the plane of the membrane. The following line adds a membrane barostat that
applies a pressure of 1 bar and a surface tension of 200 bar*nm. It specifies
that the X and Y axes are treated isotropically while the Z axis is free to
change independently.
::
system.addForce(MonteCarloMembraneBarostat(1*bar, 200*bar*nanometer,
MonteCarloMembraneBarostat.XYIsotropic, MonteCarloMembraneBarostat.ZFree, 300*kelvin))
See the API documentation for details about the allowed parameter values and
their meanings.
Energy Minimization
===================
......
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