Commit 047934e2 authored by Rafal P. Wiewiora's avatar Rafal P. Wiewiora
Browse files

Merge remote-tracking branch 'upstream/master'

parents ce3a5dc0 d12c9bd1
...@@ -105,11 +105,17 @@ before_install: ...@@ -105,11 +105,17 @@ before_install:
- wget https://anaconda.org/omnia/ccache/3.2.4/download/${TRAVIS_OS_NAME}-64/ccache-3.2.4-0.tar.bz2 - wget https://anaconda.org/omnia/ccache/3.2.4/download/${TRAVIS_OS_NAME}-64/ccache-3.2.4-0.tar.bz2
- mkdir -p $HOME/ccache && tar xf ccache-3.2.4-0.tar.bz2 -C $HOME/ccache - mkdir -p $HOME/ccache && tar xf ccache-3.2.4-0.tar.bz2 -C $HOME/ccache
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install doxygen fftw; brew install fftw;
brew install -y https://raw.githubusercontent.com/Homebrew/homebrew-core/5b680fb58fedfb00cd07a7f69f5a621bb9240f3b/Formula/doxygen.rb;
sudo easy_install pytest; sudo easy_install pytest;
fi fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz";
mkdir $HOME/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C $HOME/cmake;
export PATH=${HOME}/cmake/bin:${PATH};
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 +189,9 @@ script: ...@@ -183,9 +189,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
......
...@@ -21,39 +21,18 @@ IF( NOT PROJECT_NAME ) ...@@ -21,39 +21,18 @@ IF( NOT PROJECT_NAME )
PROJECT (OpenMM) PROJECT (OpenMM)
ENDIF( NOT PROJECT_NAME ) ENDIF( NOT PROJECT_NAME )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
if("${CMAKE_VERSION}" VERSION_GREATER "3.0" OR "${CMAKE_VERSION}" VERSION_EQUAL "3.0") CMAKE_POLICY(SET CMP0042 OLD)
CMAKE_POLICY(SET CMP0042 OLD) CMAKE_POLICY(SET CMP0003 NEW)
endif() CMAKE_POLICY(SET CMP0005 NEW)
CMAKE_POLICY(SET CMP0011 NEW)
#SET(CMAKE_VERBOSE_MAKEFILE 1)
# CMake 2.4 on dart server only needs to know about Dart
INCLUDE(Dart) INCLUDE(Dart)
MARK_AS_ADVANCED(DART_ROOT) MARK_AS_ADVANCED(DART_ROOT)
# Avoid dart server problem with cmake 2.4 --cmb
set(cmv "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
IF(NOT cmv EQUAL "2.4") # This whole file...
# We have custom cmake modules for FindOpenMM and running python tests # We have custom cmake modules for FindOpenMM and running python tests
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
# Older cmake versions do not have cmake_policy command
# Cmake 2.4.5, the default cmake on red hat linux, has the
# cmake_policy command, but it does not work
# "if(POLICY ..." does not work with cmake 2.4.[56] on red hat
# (cmake 2.4.7 is OK)
if(COMMAND cmake_policy)
if(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 5)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 NEW)
endif(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 5)
if(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 6 OR CMAKE_PATCH_VERSION GREATER 2)
cmake_policy(SET CMP0011 NEW)
endif(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 6 OR CMAKE_PATCH_VERSION GREATER 2)
endif(COMMAND cmake_policy)
# Where to install # Where to install
IF(WIN32) IF(WIN32)
IF(NOT OPENMM_INSTALL_PREFIX) IF(NOT OPENMM_INSTALL_PREFIX)
...@@ -69,6 +48,9 @@ IF(WIN32) ...@@ -69,6 +48,9 @@ IF(WIN32)
ADD_DEFINITIONS(-DWIN32) ADD_DEFINITIONS(-DWIN32)
ENDIF(WIN32) ENDIF(WIN32)
# What type of libraries to build
SET(OPENMM_BUILD_SHARED_LIB ON CACHE BOOL "Whether to build shared OpenMM libraries")
SET(OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL "Whether to build static OpenMM libraries")
# Include CPU-Features for Android # Include CPU-Features for Android
IF (ANDROID) IF (ANDROID)
...@@ -98,22 +80,7 @@ ELSE(WIN32) ...@@ -98,22 +80,7 @@ ELSE(WIN32)
ENDIF (NOT ANDROID) ENDIF (NOT ANDROID)
ENDIF(WIN32) ENDIF(WIN32)
# The build system will set ARCH64 for 64 bit builds, which require SET (CMAKE_CXX_STANDARD 11)
# use of the lib64/ library directories rather than lib/.
#SET( ARCH64 OFF CACHE BOOL "ON for 64bit builds, OFF for 32bit builds")
#MARK_AS_ADVANCED( ARCH64 )
#IF (ARCH64)
# SET(LIB64 64)
#ELSE (ARCH64)
# SET(LIB64) # nothing
#ENDIF (ARCH64)
IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
SET( LIB64 64 )
ELSE( CMAKE_SIZEOF_VOID_P EQUAL 8 )
SET( LIB64 )
ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
IF (APPLE AND (NOT PNACL)) IF (APPLE AND (NOT PNACL))
# Build 64 bit binaries compatible with OS X 10.7 # Build 64 bit binaries compatible with OS X 10.7
...@@ -174,40 +141,14 @@ ENDIF (NOT CMAKE_CXX_FLAGS_RELEASE) ...@@ -174,40 +141,14 @@ 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")
# underbar separated list of dotted authors, no spaces or commas
SET(OPENMM_AUTHORS "Peter.Eastman")
ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME} ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME}
-DOPENMM_MAJOR_VERSION=${OPENMM_MAJOR_VERSION} -DOPENMM_MAJOR_VERSION=${OPENMM_MAJOR_VERSION}
-DOPENMM_MINOR_VERSION=${OPENMM_MINOR_VERSION} -DOPENMM_MINOR_VERSION=${OPENMM_MINOR_VERSION}
-DOPENMM_BUILD_VERSION=${OPENMM_BUILD_VERSION}) -DOPENMM_BUILD_VERSION=${OPENMM_BUILD_VERSION})
# CMake quotes automatically when building Visual Studio projects but we need
# to add them ourselves for Linux or Cygwin. Two cases to avoid duplicate quotes
# in Visual Studio which end up in the binary.
IF (MSVC)
SET(NEED_QUOTES FALSE)
ELSE (MSVC)
SET(NEED_QUOTES TRUE)
ENDIF (MSVC)
##TODO: doesn't work without quotes in nightly build
SET(NEED_QUOTES TRUE)
IF(NEED_QUOTES)
ADD_DEFINITIONS(-DOPENMM_COPYRIGHT_YEARS="${OPENMM_COPYRIGHT_YEARS}"
-DOPENMM_AUTHORS="${OPENMM_AUTHORS}")
ELSE(NEED_QUOTES)
ADD_DEFINITIONS(-DOPENMM_COPYRIGHT_YEARS=${OPENMM_COPYRIGHT_YEARS}
-DOPENMM_AUTHORS=${OPENMM_AUTHORS})
ENDIF(NEED_QUOTES)
# -DOPENMM_TYPE has to be defined in the target subdirectories. # -DOPENMM_TYPE has to be defined in the target subdirectories.
# -Dsimbody_EXPORTS defined automatically when Windows DLL build is being done. # -Dsimbody_EXPORTS defined automatically when Windows DLL build is being done.
...@@ -283,14 +224,14 @@ IF (ANDROID OR PNACL) ...@@ -283,14 +224,14 @@ IF (ANDROID OR PNACL)
ELSE (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") SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/libraries/sfmt/src/SFMT.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_SSE2=1")
ENDIF(ANDROID OR PNACL) ENDIF(ANDROID OR PNACL)
IF (NOT (ANDROID OR PNACL)) IF (NOT (ANDROID OR PNACL OR (WIN32 AND OPENMM_BUILD_STATIC_LIB)))
FILE(GLOB src_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*/*.cpp) FILE(GLOB src_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*/*.cpp)
FILE(GLOB incl_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*.h) FILE(GLOB incl_files ${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit/*.h)
SET(SOURCE_FILES ${SOURCE_FILES} ${src_files}) SET(SOURCE_FILES ${SOURCE_FILES} ${src_files})
SET(SOURCE_INCLUDE_FILES ${SOURCE_INCLUDE_FILES} ${incl_files}) SET(SOURCE_INCLUDE_FILES ${SOURCE_INCLUDE_FILES} ${incl_files})
INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit") INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/libraries/asmjit")
SET(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DLEPTON_USE_JIT") SET(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DLEPTON_USE_JIT")
ENDIF (NOT (ANDROID OR PNACL)) ENDIF (NOT (ANDROID OR PNACL OR (WIN32 AND OPENMM_BUILD_STATIC_LIB)))
# If API wrappers are being generated, and add them to the build. # 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") SET(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS ON CACHE BOOL "Build wrappers for C and Fortran")
...@@ -302,8 +243,6 @@ ENDIF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS) ...@@ -302,8 +243,6 @@ ENDIF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src) 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}) SET(EXTRA_LINK_FLAGS ${EXTRA_COMPILE_FLAGS})
IF (CMAKE_SYSTEM_NAME MATCHES "Linux") IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
IF (NOT ANDROID) IF (NOT ANDROID)
...@@ -319,7 +258,6 @@ IF(OPENMM_BUILD_SHARED_LIB) ...@@ -319,7 +258,6 @@ IF(OPENMM_BUILD_SHARED_LIB)
SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_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 -DPTHREAD_BUILDING_SHARED_LIBRARY")
ENDIF(OPENMM_BUILD_SHARED_LIB) ENDIF(OPENMM_BUILD_SHARED_LIB)
SET(OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL "Whether to build static OpenMM libraries")
IF(OPENMM_BUILD_STATIC_LIB) IF(OPENMM_BUILD_STATIC_LIB)
ADD_LIBRARY(${STATIC_TARGET} STATIC ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES}) 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(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_USE_STATIC_LIBRARIES -DLEPTON_USE_STATIC_LIBRARIES -DPTW32_STATIC_LIB")
...@@ -363,63 +301,19 @@ IF(BUILD_TESTING AND OPENMM_BUILD_REFERENCE_TESTS) ...@@ -363,63 +301,19 @@ IF(BUILD_TESTING AND OPENMM_BUILD_REFERENCE_TESTS)
ADD_SUBDIRECTORY(platforms/reference/tests) ADD_SUBDIRECTORY(platforms/reference/tests)
ENDIF(BUILD_TESTING AND OPENMM_BUILD_REFERENCE_TESTS) ENDIF(BUILD_TESTING AND OPENMM_BUILD_REFERENCE_TESTS)
# Which hardware platforms to build # CUDA platform
# A bit of tedium because we are using custom FindCUDA files that happen to work...
SET(FINDCUDA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/FindCUDA")
SET(CUDA_BUILD_CUBIN OFF)
FIND_PACKAGE(CUDA QUIET) FIND_PACKAGE(CUDA QUIET)
IF(CUDA_FOUND) IF(CUDA_FOUND)
IF(NOT CUDA_NVCC_FLAGS)
SET(FLAGS "")
# Note that cmake will insert semicolons between these item automatically...
SET(FLAGS ${FLAGS} -gencode arch=compute_11,code=sm_11)
SET(FLAGS ${FLAGS} -gencode arch=compute_12,code=sm_12)
SET(FLAGS ${FLAGS} -gencode arch=compute_13,code=sm_13)
SET(FLAGS ${FLAGS} -gencode arch=compute_20,code=sm_20)
SET(FLAGS ${FLAGS} -use_fast_math)
IF(MSVC)
# Unfortunately the variables CUDA_NVCC_FLAGS_RELEASE and CUDA_NVCC_FLAGS_DEBUG
# appear to be unused, at least in CMake 2.6
# Release /MD linkage
set(FLAGS ${FLAGS} "-Xcompiler \"/MD\" -DOPENMMCUDA_BUILDING_SHARED_LIBRARY")
ENDIF(MSVC)
SET(CUDA_NVCC_FLAGS "${FLAGS}"
CACHE STRING "Semicolon delimit multiple arguments")
ENDIF(NOT CUDA_NVCC_FLAGS)
SET(OPENMM_BUILD_CUDA_LIB ON CACHE BOOL "Build OpenMMCuda library for Nvidia GPUs") SET(OPENMM_BUILD_CUDA_LIB ON CACHE BOOL "Build OpenMMCuda library for Nvidia GPUs")
# I wish I was not hardcoding /MD here
# Avoid strange windows link error with cuda free energy
# plugin by specifying /MD to CUDA_NVCC_FLAGS
MARK_AS_ADVANCED(CLEAR CUDA_NVCC_FLAGS)
IF(MSVC)
# Unfortunately the variables CUDA_NVCC_FLAGS_RELEASE and CUDA_NVCC_FLAGS_DEBUG
# appear to be unused, at least in CMake 2.6
# Release /MD linkage
SET(HAS_NVCC_FLAG FALSE)
IF(CUDA_NVCC_FLAGS MATCHES "-Xcompiler")
SET(HAS_NVCC_FLAG TRUE)
ENDIF(CUDA_NVCC_FLAGS MATCHES "-Xcompiler")
IF(NOT HAS_NVCC_FLAG)
set(new_flags "-Xcompiler \"/MD\" -DOPENMMCUDA_BUILDING_SHARED_LIBRARY")
if(CUDA_NVCC_FLAGS)
set(new_flags "${CUDA_NVCC_FLAGS};${new_flags}")
endif(CUDA_NVCC_FLAGS)
SET(CUDA_NVCC_FLAGS "${new_flags}"
CACHE STRING "Semicolon delimit multiple arguments" FORCE)
ENDIF(NOT HAS_NVCC_FLAG)
ENDIF(MSVC)
ELSE(CUDA_FOUND) ELSE(CUDA_FOUND)
SET(OPENMM_BUILD_CUDA_LIB OFF CACHE BOOL "Build OpenMMCuda library for Nvidia GPUs") SET(OPENMM_BUILD_CUDA_LIB OFF CACHE BOOL "Build OpenMMCuda library for Nvidia GPUs")
ENDIF(CUDA_FOUND) ENDIF(CUDA_FOUND)
IF(OPENMM_BUILD_CUDA_LIB) IF(OPENMM_BUILD_CUDA_LIB)
ADD_SUBDIRECTORY(platforms/cuda) ADD_SUBDIRECTORY(platforms/cuda)
ENDIF(OPENMM_BUILD_CUDA_LIB) ENDIF(OPENMM_BUILD_CUDA_LIB)
MARK_AS_ADVANCED(CUDA_VERBOSE_BUILD)
MARK_AS_ADVANCED(CUDA_BUILD_CUBIN) # OpenCL platform
MARK_AS_ADVANCED(CUDA_BUILD_EMULATION)
MARK_AS_ADVANCED(CUDA_HOST_COMPILER CUDA_HOST_COMPILER_OPTIONS)
FIND_PACKAGE(OpenCL QUIET) FIND_PACKAGE(OpenCL QUIET)
IF(OPENCL_FOUND) IF(OPENCL_FOUND)
...@@ -517,7 +411,7 @@ INSTALL_FILES(/include/sfmt FILES ${SFMT_HEADERS}) ...@@ -517,7 +411,7 @@ INSTALL_FILES(/include/sfmt FILES ${SFMT_HEADERS})
ADD_SUBDIRECTORY(serialization) ADD_SUBDIRECTORY(serialization)
FILE(GLOB serialization_files ${CMAKE_SOURCE_DIR}/serialization/src/*.cpp) FILE(GLOB serialization_files ${CMAKE_SOURCE_DIR}/serialization/src/*.cpp)
SET_SOURCE_FILES_PROPERTIES(${serialization_files} PROPERTIES COMPILE_FLAGS "-DOPENMM_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL -DIEEE_8087") SET_SOURCE_FILES_PROPERTIES(${serialization_files} PROPERTIES COMPILE_FLAGS "-DOPENMM_BUILDING_SHARED_LIBRARY -DIEEE_8087")
# Python wrappers # Python wrappers
...@@ -535,23 +429,6 @@ IF(OPENMM_BUILD_PYTHON_WRAPPERS) ...@@ -535,23 +429,6 @@ IF(OPENMM_BUILD_PYTHON_WRAPPERS)
ADD_SUBDIRECTORY(wrappers/python) ADD_SUBDIRECTORY(wrappers/python)
ENDIF(OPENMM_BUILD_PYTHON_WRAPPERS) ENDIF(OPENMM_BUILD_PYTHON_WRAPPERS)
#
# Allow automated build and dashboard.
#
# redundant INCLUDE(Dart) statement
# INCLUDE (Dart)
#IF (UNIX AND NOT CYGWIN AND NOT APPLE)
# IF (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES Debug)
# ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)
# LINK_LIBRARIES(gcov)
# ENDIF (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES Debug)
#ENDIF (UNIX AND NOT CYGWIN AND NOT APPLE)
# #
# Testing # Testing
# #
...@@ -573,5 +450,3 @@ SET(OPENMM_BUILD_EXAMPLES ON CACHE BOOL "Build example executables") ...@@ -573,5 +450,3 @@ SET(OPENMM_BUILD_EXAMPLES ON CACHE BOOL "Build example executables")
IF(OPENMM_BUILD_EXAMPLES) IF(OPENMM_BUILD_EXAMPLES)
ADD_SUBDIRECTORY(examples) ADD_SUBDIRECTORY(examples)
ENDIF(OPENMM_BUILD_EXAMPLES) ENDIF(OPENMM_BUILD_EXAMPLES)
ENDIF(NOT cmv EQUAL "2.4") # This whole file...
[![Build Status](https://travis-ci.org/pandegroup/openmm.svg?branch=master)](https://travis-ci.org/pandegroup/openmm?branch=master)
[![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)
os: Windows Server 2012 R2 os: Visual Studio 2015
platform: x64
configuration: Release
shallow_clone: true shallow_clone: true
install: install:
# Setup shell for VS2010, x64, release mode # Setup shell for VS2015, x64
- > - call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
"%ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
# Set path to python, git-bash tools. # Set path to python, git-bash tools.
- "set PATH=C:\\Python34-x64;C:\\Python34-x64\\Scripts;%PATH%" - "set PATH=C:\\Python35-x64;C:\\Python35-x64\\Scripts;%PATH%"
- "set PATH=C:\\Program Files (x86)\\Git\\bin;%PATH%" - "set PATH=C:\\Program Files (x86)\\Git\\bin;%PATH%"
- pip install pytest - pip install pytest
- pip install numpy
# Use cclash for compiler caching (experimental) # Use cclash for compiler caching (experimental)
- ps: wget https://github.com/inorton/cclash/releases/download/0.3.14/cclash-0.3.14.zip -OutFile cclash-0.3.14.zip - ps: wget https://github.com/inorton/cclash/releases/download/0.3.14/cclash-0.3.14.zip -OutFile cclash-0.3.14.zip
......
# This script is executed via the line:
# source devtools/ci/jenkins/install.sh
# in a bash shell with the -lex options turned on
echo "Using the following SWIG (`which swig`) version:"
swig -version
echo "Using cmake (`which cmake`) version":
cmake --version
echo "Using clang (`which clang`) version:"
clang --version
module load cuda conda/jenkins
# Constants
CONDAENV=openmm-test-3.5
INSTALL_DIRECTORY="${WORKSPACE}/openmm-install"
SRC_DIRECTORY="${WORKSPACE}/openmm-src" # set in the Jenkins configuration
export OPENMM_CUDA_COMPILER=`which nvcc`
# Create a conda environment, but clean up after one first. If it doesn't exist, don't complain.
# But since we are invoking this shell with -e (exit on all errors), we need || true to prevent this
# command from crashing the whole shell
conda remove -yn ${CONDAENV} --all --quiet || true
conda create -yn ${CONDAENV} python=3.5 --no-default-packages --quiet
conda install -yn ${CONDAENV} numpy scipy pytest --quiet
source activate ${CONDAENV} # enter our new environment
# Build OpenMM
cd "${SRC_DIRECTORY}"
cmake -DCMAKE_INSTALL_PREFIX="${INSTALL_DIRECTORY}" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .
make -j4 install
make PythonInstall
# Now run the tests
python -m simtk.testInstallation
cd python/tests && py.test -v && cd ../..
python devtools/run-ctest.py --job-duration=120 --timeout 300
# Now remove the conda environment
source deactivate
conda remove -yn ${CONDAENV} --all --quiet
\ No newline at end of file
# 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)]
......
...@@ -317,16 +317,6 @@ that is the goal.) When implementing a new feature, it is recommended to create ...@@ -317,16 +317,6 @@ that is the goal.) When implementing a new feature, it is recommended to create
the reference implementation first, then use that as a model for the versions in the reference implementation first, then use that as a model for the versions in
other Platforms. other Platforms.
The reference Platform represents all floating point numbers with the type
RealOpenMM, which is defined in SimTKOpenMMRealType.h. This allows the entire
platform to be compiled in either single or double precision. By default it is
double precision, but it can be changed by modifying one flag at the top of that
file. The same file also defines lots of numerical constants and mathematical
functions, so the correct precision version will always be used. Vector
quantities (positions, velocities, etc.) are represented by RealVec objects.
This class is identical to Vec3, except that its components are of type
RealOpenMM instead of double.
When using the reference Platform, the “platform-specific data” stored in When using the reference Platform, the “platform-specific data” stored in
ContextImpl is of type ReferencePlatform::PlatformData, which is declared in ContextImpl is of type ReferencePlatform::PlatformData, which is declared in
ReferencePlatform.h. Several of the fields in this class are declared as void* ReferencePlatform.h. Several of the fields in this class are declared as void*
......
...@@ -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
...@@ -916,8 +916,9 @@ Value Meaning ...@@ -916,8 +916,9 @@ Value Meaning
:code:`NoCutoff` No cutoff is applied. :code:`NoCutoff` No cutoff is applied.
:code:`CutoffNonPeriodic` The reaction field method is used to eliminate all interactions beyond a cutoff distance. Not valid for AMOEBA. :code:`CutoffNonPeriodic` The reaction field method is used to eliminate all interactions beyond a cutoff distance. Not valid for AMOEBA.
:code:`CutoffPeriodic` The reaction field method is used to eliminate all interactions beyond a cutoff distance. Periodic boundary conditions are applied, so each atom interacts only with the nearest periodic copy of every other atom. Not valid for AMOEBA. :code:`CutoffPeriodic` The reaction field method is used to eliminate all interactions beyond a cutoff distance. Periodic boundary conditions are applied, so each atom interacts only with the nearest periodic copy of every other atom. Not valid for AMOEBA.
:code:`Ewald` Periodic boundary conditions are applied. Ewald summation is used to compute long range interactions. (This option is rarely used, since PME is much faster for all but the smallest systems.) Not valid for AMOEBA. :code:`Ewald` Periodic boundary conditions are applied. Ewald summation is used to compute long range Coulomb interactions. (This option is rarely used, since PME is much faster for all but the smallest systems.) Not valid for AMOEBA.
:code:`PME` Periodic boundary conditions are applied. The Particle Mesh Ewald method is used to compute long range interactions. :code:`PME` Periodic boundary conditions are applied. The Particle Mesh Ewald method is used to compute long range Coulomb interactions.
:code:`LJPME` Periodic boundary conditions are applied. The Particle Mesh Ewald method is used to compute long range interactions for both Coulomb and Lennard-Jones.
========================= =========================================================================================================================================================================================================================================== ========================= ===========================================================================================================================================================================================================================================
...@@ -926,7 +927,7 @@ cutoff distance. Be sure to specify units, as shown in the examples above. For ...@@ -926,7 +927,7 @@ cutoff distance. Be sure to specify units, as shown in the examples above. For
example, :code:`nonbondedCutoff=1.5*nanometers` or example, :code:`nonbondedCutoff=1.5*nanometers` or
:code:`nonbondedCutoff=12*angstroms` are legal values. :code:`nonbondedCutoff=12*angstroms` are legal values.
When using :code:`Ewald` or :code:`PME`\ , you can optionally specify an When using :code:`Ewald`, :code:`PME`, or :code:`LJPME`\ , you can optionally specify an
error tolerance for the force computation. For example: error tolerance for the force computation. For example:
:: ::
...@@ -2696,6 +2697,62 @@ must include an attribute called :code:`radius`\ . ...@@ -2696,6 +2697,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 +2773,7 @@ To add a CustomManyParticleForce to the System, include a tag that looks like th ...@@ -2716,7 +2773,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,16 +395,16 @@ downloading the Xcode Tools from the App Store. ...@@ -395,16 +395,16 @@ 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.
Install CMake Install CMake
============= =============
CMake is the build system used for OpenMM. You must install CMake version 2.8 CMake is the build system used for OpenMM. You must install CMake version 3.1
or higher before attempting to build OpenMM from source. You can get CMake from or higher before attempting to build OpenMM from source. You can get CMake from
http://www.cmake.org/. If you choose to build CMake from source on Linux, make http://www.cmake.org/. If you choose to build CMake from source on Linux, make
sure you have the curses library installed beforehand, so that you will be able sure you have the curses library installed beforehand, so that you will be able
...@@ -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)
...@@ -509,7 +509,7 @@ Windows ...@@ -509,7 +509,7 @@ Windows
On Windows, perform the following steps: On Windows, perform the following steps:
#. Click Start->All Programs->CMake 2.8->CMake #. Click Start->All Programs->CMake 3.1->CMake
#. In the box labeled "Where is the source code:" browse to OpenMM src directory #. In the box labeled "Where is the source code:" browse to OpenMM src directory
(containing top CMakeLists.txt) (containing top CMakeLists.txt)
#. In the box labeled "Where to build the binaries" browse to your build_openmm #. In the box labeled "Where to build the binaries" browse to your build_openmm
...@@ -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
......
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